Rename rcc_ppre1_frequency and rcc_ppre2_frequency

Rename rcc_ppre1_frequency and rcc_ppre2_frequency to rcc_apb1_frequency and rcc_apb2_frequency
Also add rcc_ahb_frequency (although it is not set correctly in all cases) which will be fixed by
the rcc commits later. Also fixup the only use in the library of these variables, the USART code.

And fix the typos that resulted
Make l1 generic too
This commit is contained in:
Chuck McManis
2014-12-13 18:11:37 -08:00
parent 2429159203
commit 9ddfcb0e53
15 changed files with 94 additions and 77 deletions

View File

@@ -48,16 +48,16 @@ usart_reg_base
void usart_set_baudrate(uint32_t usart, uint32_t baud)
{
uint32_t clock = rcc_ppre1_frequency;
uint32_t clock = rcc_apb1_frequency;
#if defined STM32F2 || defined STM32F4
if ((usart == USART1) ||
(usart == USART6)) {
clock = rcc_ppre2_frequency;
clock = rcc_apb2_frequency;
}
#else
if (usart == USART1) {
clock = rcc_ppre2_frequency;
clock = rcc_apb2_frequency;
}
#endif