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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user