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/nuvoton_m451/applications | |
| 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/nuvoton_m451/applications')
| -rw-r--r-- | bsp/nuvoton_m451/applications/application.c | 18 | ||||
| -rw-r--r-- | bsp/nuvoton_m451/applications/startup.c | 60 |
2 files changed, 39 insertions, 39 deletions
diff --git a/bsp/nuvoton_m451/applications/application.c b/bsp/nuvoton_m451/applications/application.c index ba1d5748c3..9c1e57f36d 100644 --- a/bsp/nuvoton_m451/applications/application.c +++ b/bsp/nuvoton_m451/applications/application.c @@ -24,18 +24,18 @@ static void led_thread_entry(void* parameter) { rt_hw_led_init(); - while(1) - { + while(1) + { rt_hw_led_on(); rt_thread_delay(RT_TICK_PER_SECOND); rt_hw_led_off(); rt_thread_delay(RT_TICK_PER_SECOND); - } + } } static void rt_init_thread_entry(void* parameter) { - rt_thread_t led_thread; + rt_thread_t led_thread; /* Initialization RT-Thread Components */ #ifdef RT_USING_COMPONENTS_INIT @@ -44,15 +44,15 @@ static void rt_init_thread_entry(void* parameter) /* Create led thread */ led_thread = rt_thread_create("led", - led_thread_entry, RT_NULL, - 256, 20, 20); + led_thread_entry, RT_NULL, + 256, 20, 20); if(led_thread != RT_NULL) - rt_thread_startup(led_thread); + rt_thread_startup(led_thread); } int rt_application_init() { - rt_thread_t init_thread; + rt_thread_t init_thread; #if (RT_THREAD_PRIORITY_MAX == 32) init_thread = rt_thread_create("init", @@ -64,7 +64,7 @@ int rt_application_init() 512, 80, 20); #endif if(init_thread != RT_NULL) - rt_thread_startup(init_thread); + rt_thread_startup(init_thread); return 0; } diff --git a/bsp/nuvoton_m451/applications/startup.c b/bsp/nuvoton_m451/applications/startup.c index b1f57ceb90..8e8422915e 100644 --- a/bsp/nuvoton_m451/applications/startup.c +++ b/bsp/nuvoton_m451/applications/startup.c @@ -51,11 +51,11 @@ extern int __bss_end; *******************************************************************************/ void assert_failed(uint8_t* file, uint32_t line) { - rt_kprintf("\n\r Wrong parameter value detected on\r\n"); - rt_kprintf(" file %s\r\n", file); - rt_kprintf(" line %d\r\n", line); + rt_kprintf("\n\r Wrong parameter value detected on\r\n"); + rt_kprintf(" file %s\r\n", file); + rt_kprintf(" line %d\r\n", line); - while (1) ; + while (1) ; } /** @@ -63,31 +63,31 @@ void assert_failed(uint8_t* file, uint32_t line) */ void rtthread_startup(void) { - /* init board */ - rt_hw_board_init(); + /* init board */ + rt_hw_board_init(); - /* show version */ - rt_show_version(); + /* show version */ + rt_show_version(); - /* init tick */ - rt_system_tick_init(); + /* init tick */ + rt_system_tick_init(); - /* init kernel object */ - rt_system_object_init(); + /* init kernel object */ + rt_system_object_init(); - /* init timer system */ - rt_system_timer_init(); + /* init timer system */ + rt_system_timer_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)M451_SRAM_BEGIN, (void*)M451_SRAM_END); #endif - /* init scheduler system */ - rt_system_scheduler_init(); + /* init scheduler system */ + rt_system_scheduler_init(); + + /* init application */ + rt_application_init(); - /* init application */ - rt_application_init(); - /* Set finsh device */ #ifdef RT_USING_FINSH finsh_system_init(); @@ -97,25 +97,25 @@ void rtthread_startup(void) /* init timer thread */ rt_system_timer_thread_init(); - /* init idle thread */ - rt_thread_idle_init(); + /* init idle thread */ + rt_thread_idle_init(); - /* start scheduler */ - rt_system_scheduler_start(); + /* start scheduler */ + rt_system_scheduler_start(); - /* never reach here */ - return ; + /* never reach here */ + return ; } int main(void) { - /* disable interrupt first */ - rt_hw_interrupt_disable(); + /* disable interrupt first */ + rt_hw_interrupt_disable(); - /* startup RT-Thread RTOS */ - rtthread_startup(); + /* startup RT-Thread RTOS */ + rtthread_startup(); - return 0; + return 0; } /*@}*/ |
