diff options
Diffstat (limited to 'bsp/nuvoton_m451/drivers/board.c')
| -rw-r--r-- | bsp/nuvoton_m451/drivers/board.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/bsp/nuvoton_m451/drivers/board.c b/bsp/nuvoton_m451/drivers/board.c index 39dbd04c62..9ab8d97b27 100644 --- a/bsp/nuvoton_m451/drivers/board.c +++ b/bsp/nuvoton_m451/drivers/board.c @@ -38,11 +38,11 @@ void NVIC_Configuration(void) */ static void delay(__IO uint32_t nCount) { - /* Decrement nCount value */ - while (nCount != 0) - { - nCount--; - } + /* Decrement nCount value */ + while (nCount != 0) + { + nCount--; + } } static void rt_hw_system_init(void) @@ -52,7 +52,7 @@ static void rt_hw_system_init(void) /*---------------------------------------------------------------------------------------------------------*/ /* Unlock protected registers */ SYS_UnlockReg(); - + /* Enable HIRC clock (Internal RC 22.1184MHz) */ CLK_EnableXtalRC(CLK_PWRCTL_HIRCEN_Msk); @@ -73,7 +73,7 @@ static void rt_hw_system_init(void) /* Set SysTick clock source to HCLK source divide 2 */ CLK_SetSysTickClockSrc(CLK_CLKSEL0_STCLKSEL_HCLK_DIV2); - + /* Lock protected registers */ SYS_LockReg(); } @@ -84,34 +84,34 @@ static void rt_hw_system_init(void) */ void SysTick_Handler(void) { - /* enter interrupt */ - rt_interrupt_enter(); + /* enter interrupt */ + rt_interrupt_enter(); - rt_tick_increase(); + rt_tick_increase(); - /* leave interrupt */ - rt_interrupt_leave(); + /* leave interrupt */ + rt_interrupt_leave(); } /** * This function will initial Nuvoton board. */ void rt_hw_board_init() { - /* NVIC Configuration */ - NVIC_Configuration(); + /* NVIC Configuration */ + NVIC_Configuration(); /* Configure the system clock */ rt_hw_system_init(); - /* Configure the SysTick */ - SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); + /* Configure the SysTick */ + SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); - /* Initial usart deriver, and set console device */ - rt_hw_usart_init(); + /* Initial usart deriver, and set console device */ + rt_hw_usart_init(); #ifdef RT_USING_CONSOLE - rt_console_set_device(RT_CONSOLE_DEVICE_NAME); + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif - /* Call components board initial (use INIT_BOARD_EXPORT()) */ + /* Call components board initial (use INIT_BOARD_EXPORT()) */ #ifdef RT_USING_COMPONENTS_INIT rt_components_board_init(); #endif |
