diff options
| author | Bernard Xiong <[email protected]> | 2021-05-28 16:20:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-28 16:20:08 +0800 |
| commit | 92beddf3bccf6346e26aa097f82464456fb8e6bd (patch) | |
| tree | 197e4a108118dda016ea02274172f0c40e7ee8ed /bsp/ls1cdev/drivers/board.c | |
| parent | b18a99b44240ec3152011e159cc24a5af8dff0ce (diff) | |
| parent | 03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff) | |
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'bsp/ls1cdev/drivers/board.c')
| -rw-r--r-- | bsp/ls1cdev/drivers/board.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/bsp/ls1cdev/drivers/board.c b/bsp/ls1cdev/drivers/board.c index b4b8403b49..5703a1baa6 100644 --- a/bsp/ls1cdev/drivers/board.c +++ b/bsp/ls1cdev/drivers/board.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -17,7 +17,7 @@ #include "drv_uart.h" #include "ls1c.h" -#define A_K0BASE 0x80000000 +#define A_K0BASE 0x80000000 extern unsigned char __bss_end; @@ -34,14 +34,14 @@ extern void invalidate_icache_all(void); */ void rt_hw_timer_handler(void) { - unsigned int count; + unsigned int count; - count = read_c0_compare(); - write_c0_compare(count); - write_c0_count(0); + count = read_c0_compare(); + write_c0_compare(count); + write_c0_count(0); - /* increase a OS tick */ - rt_tick_increase(); + /* increase a OS tick */ + rt_tick_increase(); } /** @@ -49,8 +49,8 @@ void rt_hw_timer_handler(void) */ void rt_hw_timer_init(void) { - write_c0_compare(CPU_HZ/2/RT_TICK_PER_SECOND); - write_c0_count(0); + write_c0_compare(CPU_HZ/2/RT_TICK_PER_SECOND); + write_c0_count(0); } @@ -83,35 +83,35 @@ void rt_hw_fpu_init(void) */ void rt_hw_board_init(void) { - /* init cache */ - rt_hw_cache_init(); - - /* init hardware interrupt */ - rt_hw_interrupt_init(); + /* init cache */ + rt_hw_cache_init(); - /* clear bev */ - write_c0_status(read_c0_status()&(~(1<<22))); + /* init hardware interrupt */ + rt_hw_interrupt_init(); - /* copy vector */ - rt_memcpy((void *)A_K0BASE, tlb_refill_exception, 0x80); - rt_memcpy((void *)(A_K0BASE + 0x180), general_exception, 0x80); - rt_memcpy((void *)(A_K0BASE + 0x200), irq_exception, 0x80); + /* clear bev */ + write_c0_status(read_c0_status()&(~(1<<22))); + + /* copy vector */ + rt_memcpy((void *)A_K0BASE, tlb_refill_exception, 0x80); + rt_memcpy((void *)(A_K0BASE + 0x180), general_exception, 0x80); + rt_memcpy((void *)(A_K0BASE + 0x200), irq_exception, 0x80); + + invalidate_writeback_dcache_all(); + invalidate_icache_all(); - invalidate_writeback_dcache_all(); - invalidate_icache_all(); - #ifdef RT_USING_HEAP - rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END); + rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END); #endif #ifdef RT_USING_SERIAL - /* init hardware UART device */ - rt_hw_uart_init(); + /* init hardware UART device */ + rt_hw_uart_init(); #endif #ifdef RT_USING_CONSOLE - /* set console device */ - rt_console_set_device(RT_CONSOLE_DEVICE_NAME); + /* set console device */ + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif /* init operating system timer */ rt_hw_timer_init(); |
