[BSP][ls1c]Add some code in board init.
This commit is contained in:
parent
c121d823fd
commit
5e102eeea9
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue