ch32_drivers: call rt_hw_pin_init explicitly
Signed-off-by: xiaofan <xfan1024@live.com>
This commit is contained in:
parent
2c1209db21
commit
8dee48fdaa
|
@ -576,6 +576,5 @@ int rt_hw_pin_init(void)
|
|||
|
||||
return rt_device_pin_register("pin", &_ch32_pin_ops, RT_NULL);
|
||||
}
|
||||
INIT_BOARD_EXPORT(rt_hw_pin_init);
|
||||
|
||||
#endif /* BSP_USING_GPIO */
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include "drv_usart.h"
|
||||
#include "drv_gpio.h"
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
@ -75,6 +76,10 @@ void rt_hw_board_init()
|
|||
/* System Tick Configuration, systick clock is HCLK/8 */
|
||||
_SysTick_Config(SystemCoreClock / 8 / RT_TICK_PER_SECOND);
|
||||
/* Call components board initial (use INIT_BOARD_EXPORT()) */
|
||||
#ifdef RT_USING_PIN
|
||||
/* pin must initialized before i2c */
|
||||
rt_hw_pin_init();
|
||||
#endif
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
rt_components_board_init();
|
||||
#endif
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "board.h"
|
||||
#include <stdint.h>
|
||||
#include "drv_usart.h"
|
||||
#include "drv_gpio.h"
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
|
@ -61,6 +62,10 @@ void rt_hw_board_init()
|
|||
#endif
|
||||
#ifdef RT_USING_CONSOLE
|
||||
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#ifdef RT_USING_PIN
|
||||
/* pin must initialized before i2c */
|
||||
rt_hw_pin_init();
|
||||
#endif
|
||||
/* Call components board initial (use INIT_BOARD_EXPORT()) */
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "board.h"
|
||||
#include <stdint.h>
|
||||
#include "drv_usart.h"
|
||||
#include "drv_gpio.h"
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
|
@ -47,6 +48,10 @@ void rt_hw_board_init()
|
|||
#endif
|
||||
#ifdef RT_USING_CONSOLE
|
||||
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#ifdef RT_USING_PIN
|
||||
/* pin must initialized before i2c */
|
||||
rt_hw_pin_init();
|
||||
#endif
|
||||
/* Call components board initial (use INIT_BOARD_EXPORT()) */
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
|
|
Loading…
Reference in New Issue