summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorzylx <[email protected]>2018-04-12 09:32:30 +0800
committerzylx <[email protected]>2018-04-12 10:09:23 +0800
commit3797867888ef813ca9ccdb7e3400c54a8fae3b89 (patch)
treee6e09973da8ecd4403c94c9234103905ad740b9a /bsp
parent27ff16a86ff400f202fc7ec89bb2be44e2738000 (diff)
[BSP][STM32F40X] Fix components init.
Diffstat (limited to 'bsp')
-rw-r--r--bsp/stm32f40x/applications/application.c2
-rw-r--r--bsp/stm32f40x/drivers/board.c12
2 files changed, 3 insertions, 11 deletions
diff --git a/bsp/stm32f40x/applications/application.c b/bsp/stm32f40x/applications/application.c
index 08b672628c..d0bffdc05e 100644
--- a/bsp/stm32f40x/applications/application.c
+++ b/bsp/stm32f40x/applications/application.c
@@ -34,10 +34,8 @@
void rt_init_thread_entry(void* parameter)
{
-#ifdef RT_USING_COMPONENTS_INIT
/* initialization RT-Thread Components */
rt_components_init();
-#endif
/* GDB STUB */
#ifdef RT_USING_GDB
diff --git a/bsp/stm32f40x/drivers/board.c b/bsp/stm32f40x/drivers/board.c
index 6abb8ccb23..a63682d779 100644
--- a/bsp/stm32f40x/drivers/board.c
+++ b/bsp/stm32f40x/drivers/board.c
@@ -93,17 +93,11 @@ void rt_hw_board_init()
/* Configure the SysTick */
SysTick_Configuration();
- stm32_hw_usart_init();
- stm32_hw_pin_init();
-
+ rt_components_board_init();
+
#ifdef RT_USING_CONSOLE
rt_console_set_device(CONSOLE_DEVICE);
-#endif
-
-#ifdef RT_USING_COMPONENTS_INIT
- rt_components_board_init();
-#endif
-
+#endif
}
/*@}*/