From 5e102eeea9a8c827381b5107955a3791cb4218ac Mon Sep 17 00:00:00 2001 From: sundm75 Date: Fri, 9 Feb 2018 09:22:25 +0800 Subject: [PATCH] [BSP][ls1c]Add some code in board init. --- bsp/ls1cdev/drivers/SConscript | 2 +- bsp/ls1cdev/drivers/board.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bsp/ls1cdev/drivers/SConscript b/bsp/ls1cdev/drivers/SConscript index 1dd9875087..2363e655a8 100644 --- a/bsp/ls1cdev/drivers/SConscript +++ b/bsp/ls1cdev/drivers/SConscript @@ -6,7 +6,7 @@ src = Glob('*.c') CPPPATH = [cwd] -if GetDepend('RT_USING_RTGUI')== False: +if GetDepend('RT_USING_RTGUI') == False: SrcRemove(src, 'touch.c') group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/ls1cdev/drivers/board.c b/bsp/ls1cdev/drivers/board.c index 9a54823fb4..90dff09c90 100644 --- a/bsp/ls1cdev/drivers/board.c +++ b/bsp/ls1cdev/drivers/board.c @@ -65,12 +65,12 @@ void rt_hw_fpu_init(void) rt_uint32_t c0_status = 0; rt_uint32_t c1_status = 0; - // 使能协处理器1--FPU + // 浣胯兘鍗忓鐞嗗櫒1--FPU c0_status = read_c0_status(); c0_status |= (ST0_CU1 | ST0_FR); write_c0_status(c0_status); - // 配置FPU + // 閰嶇疆FPU c1_status = read_c1_status(); c1_status |= (FPU_CSR_FS | FPU_CSR_FO | FPU_CSR_FN); // set FS, FO, FN c1_status &= ~(FPU_CSR_ALL_E); // disable exception @@ -96,6 +96,11 @@ void rt_hw_board_init(void) rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif +#ifdef RT_USING_CAN + /* init hardware CAN device */ + ls1c_bxcan_init(); +#endif + #ifdef RT_USING_I2C #ifdef RT_USING_I2C0 @@ -179,6 +184,7 @@ void rt_hw_board_init(void) #endif + /* init operating system timer */ rt_hw_timer_init();