diff options
| author | Nathan Conrad <[email protected]> | 2020-03-25 23:52:40 -0400 |
|---|---|---|
| committer | Nathan Conrad <[email protected]> | 2020-03-26 10:10:06 -0400 |
| commit | 705d43cda722c140b5267b4e0e2ea5dbb73e851a (patch) | |
| tree | 7074dff859e874a9e4df24dada9a7d33da9c3dfe /hw/bsp/stm32f072disco | |
| parent | 435485b524f7d5299f489b34555a0c9d5f616159 (diff) | |
Modify include of HAL, and remove CMSIS clock configuration code, and implement UART for STM32F407Disco
Diffstat (limited to 'hw/bsp/stm32f072disco')
| -rw-r--r-- | hw/bsp/stm32f072disco/stm32f072disco.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/bsp/stm32f072disco/stm32f072disco.c b/hw/bsp/stm32f072disco/stm32f072disco.c index e26c5628a..faf339849 100644 --- a/hw/bsp/stm32f072disco/stm32f072disco.c +++ b/hw/bsp/stm32f072disco/stm32f072disco.c @@ -26,8 +26,7 @@ #include "../board.h" -#include "stm32f0xx.h" -#include "stm32f0xx_hal_conf.h" +#include "stm32f0xx_hal.h" #define LED_PORT GPIOC #define LED_PIN GPIO_PIN_6 @@ -95,16 +94,14 @@ static void SystemClock_Config(void) void board_init(void) { + SystemClock_Config(); + all_rcc_clk_enable(); + #if CFG_TUSB_OS == OPT_OS_NONE // 1ms tick timer SysTick_Config(SystemCoreClock / 1000); #endif - SystemClock_Config(); - SystemCoreClockUpdate(); - - all_rcc_clk_enable(); - // LED GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.Pin = LED_PIN; |
