stm32f0: use usart-v2 instead of private usart
Use the usart-common base plus the usart-v2 code, instead of private implementations. Less code, more common apis across targets. Of note is the trick to make F0 look like it has an APB2 bus. It's the only stm32 that doesn't have a documented APB2 bus, but still has peripherals enabled via an "APB2" register, and they match how other targets have an APB2. Simply make APB2 an alias of APB1, as it's only used for clock speed detection.
This commit is contained in:
@@ -389,6 +389,10 @@ Control</b>
|
||||
/* --- Variable definitions ------------------------------------------------ */
|
||||
extern uint32_t rcc_ahb_frequency;
|
||||
extern uint32_t rcc_apb1_frequency;
|
||||
/** F0 doens't _realllly_ have apb2, but it has a bunch of things
|
||||
* enabled via the "APB2" enable register. Fake it out.
|
||||
*/
|
||||
#define rcc_apb2_frequency rcc_apb1_frequency
|
||||
|
||||
enum rcc_osc {
|
||||
RCC_HSI14, RCC_HSI, RCC_HSE, RCC_PLL, RCC_LSI, RCC_LSE, RCC_HSI48
|
||||
|
||||
Reference in New Issue
Block a user