diff options
| author | bernard <[email protected]> | 2014-04-05 23:56:29 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2014-04-05 23:56:29 +0800 |
| commit | 412d548f9cfb3bb89efe2828013eeb3e264fc0c1 (patch) | |
| tree | 1b33cdadad280eacf21b71d78d12f6068b57e830 /bsp | |
| parent | 54326fcb822f6c1480dc103d44aa991c16731df5 (diff) | |
[BSP] Remove rt_device_init_all() function invoking.
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/K60Fxxxx/applications/application.c | 33 | ||||
| -rw-r--r-- | bsp/K60Fxxxx/applications/startup.c | 5 | ||||
| -rw-r--r-- | bsp/at91sam9260/applications/application.c | 8 | ||||
| -rw-r--r-- | bsp/avr32uc3b0/startup.c | 1 | ||||
| -rw-r--r-- | bsp/bf533/startup.c | 3 | ||||
| -rw-r--r-- | bsp/dev3210/startup.c | 5 | ||||
| -rw-r--r-- | bsp/jz47xx/startup.c | 5 | ||||
| -rw-r--r-- | bsp/lpc1114/startup.c | 7 | ||||
| -rw-r--r-- | bsp/lpc122x/startup.c | 7 | ||||
| -rw-r--r-- | bsp/lpc2148/applications/startup.c | 3 | ||||
| -rw-r--r-- | bsp/ls1bdev/applications/application.c | 11 | ||||
| -rw-r--r-- | bsp/ls1bdev/applications/startup.c | 5 | ||||
| -rw-r--r-- | bsp/m16c62p/applications/startup.c | 19 | ||||
| -rw-r--r-- | bsp/mb9bf500r/application.c | 45 | ||||
| -rwxr-xr-x | bsp/microblaze/startup.c | 6 | ||||
| -rw-r--r-- | bsp/nuc140/startup.c | 5 | ||||
| -rw-r--r-- | bsp/sep6200/application/startup.c | 14 | ||||
| -rw-r--r-- | bsp/upd70f3454/applications/startup.c | 11 | ||||
| -rw-r--r-- | bsp/wh44b0/startup.c | 4 |
19 files changed, 46 insertions, 151 deletions
diff --git a/bsp/K60Fxxxx/applications/application.c b/bsp/K60Fxxxx/applications/application.c index c46ad36dac..df05397e30 100644 --- a/bsp/K60Fxxxx/applications/application.c +++ b/bsp/K60Fxxxx/applications/application.c @@ -35,27 +35,7 @@ void rt_init_thread_entry(void* parameter) { - /* LwIP Initialization */ -#ifdef RT_USING_LWIP - { - extern void lwip_sys_init(void); - - /* register ethernetif device */ - eth_system_device_init(); - - rt_hw_stm32_eth_init(); - /* re-init device driver */ - rt_device_init_all(); - - /* init lwip system */ - lwip_sys_init(); - rt_kprintf("TCP/IP initialized!\n"); - } -#endif - -//FS - -//GUI + /* nothing */ } float f_var1; @@ -70,7 +50,7 @@ static void rt_thread_entry_led1(void* parameter) { int n = 0; rt_hw_led_init(); - + while (1) { //rt_kprintf("LED\t%d\tis shining\r\n",n); @@ -92,16 +72,9 @@ int rt_application_init() { rt_thread_t init_thread; -#if (RT_THREAD_PRIORITY_MAX == 32) init_thread = rt_thread_create("init", rt_init_thread_entry, RT_NULL, - 2048, 8, 20); -#else - init_thread = rt_thread_create("init", - rt_init_thread_entry, RT_NULL, - 2048, 80, 20); -#endif - + 2048, RT_THREAD_PRIORITY_MAX/3, 20); if (init_thread != RT_NULL) rt_thread_startup(init_thread); diff --git a/bsp/K60Fxxxx/applications/startup.c b/bsp/K60Fxxxx/applications/startup.c index 49d72cff37..d9d499831c 100644 --- a/bsp/K60Fxxxx/applications/startup.c +++ b/bsp/K60Fxxxx/applications/startup.c @@ -85,9 +85,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - /* init all device */ - rt_device_init_all(); - /* init application */ rt_application_init(); @@ -112,7 +109,7 @@ void rtthread_startup(void) int main(void) { - + /* disable interrupt first */ rt_hw_interrupt_disable(); diff --git a/bsp/at91sam9260/applications/application.c b/bsp/at91sam9260/applications/application.c index fa2f06377b..16388d4aa7 100644 --- a/bsp/at91sam9260/applications/application.c +++ b/bsp/at91sam9260/applications/application.c @@ -138,8 +138,6 @@ void rt_init_thread_entry(void* parameter) /* register ethernetif device */ eth_system_device_init(); rt_hw_macb_init(); - /* re-init device driver */ - rt_device_init_all(); /* init lwip system */ lwip_sys_init(); } @@ -176,7 +174,7 @@ void rt_led_thread_entry(void* parameter) led_on(3); else led_off(3); - + } } #endif @@ -197,7 +195,7 @@ int rt_application_init() rt_led_thread_entry, RT_NULL, 512, 20, 20); #endif - + #else init_thread = rt_thread_create("init", rt_init_thread_entry, RT_NULL, @@ -207,7 +205,7 @@ int rt_application_init() rt_led_thread_entry, RT_NULL, 512, 200, 20); #endif - + #endif if (init_thread != RT_NULL) diff --git a/bsp/avr32uc3b0/startup.c b/bsp/avr32uc3b0/startup.c index 79098bd311..481ff1448a 100644 --- a/bsp/avr32uc3b0/startup.c +++ b/bsp/avr32uc3b0/startup.c @@ -39,7 +39,6 @@ int main(void) #endif rt_system_scheduler_init(); - rt_device_init_all(); rt_application_init(); #ifdef RT_USING_FINSH diff --git a/bsp/bf533/startup.c b/bsp/bf533/startup.c index a3cd60dd61..b1bf9884c2 100644 --- a/bsp/bf533/startup.c +++ b/bsp/bf533/startup.c @@ -62,9 +62,6 @@ void rtthread_startup(void) RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM, &uart0); - /* init all device */ - rt_device_init_all(); - rt_console_set_device("uart0"); #endif diff --git a/bsp/dev3210/startup.c b/bsp/dev3210/startup.c index fe679f468a..49cf5d4a09 100644 --- a/bsp/dev3210/startup.c +++ b/bsp/dev3210/startup.c @@ -65,11 +65,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/jz47xx/startup.c b/bsp/jz47xx/startup.c index 67779e996b..47c02def6b 100644 --- a/bsp/jz47xx/startup.c +++ b/bsp/jz47xx/startup.c @@ -55,11 +55,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/lpc1114/startup.c b/bsp/lpc1114/startup.c index 43f55cb3d9..80497d0e2c 100644 --- a/bsp/lpc1114/startup.c +++ b/bsp/lpc1114/startup.c @@ -76,11 +76,6 @@ void rtthread_startup(void) rt_thread_idle_sethook(rt_hw_led_flash); #endif -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); @@ -109,7 +104,7 @@ int main (void) /* invoke rtthread_startup */ rtthread_startup(); - + return 0; } diff --git a/bsp/lpc122x/startup.c b/bsp/lpc122x/startup.c index 43f55cb3d9..80497d0e2c 100644 --- a/bsp/lpc122x/startup.c +++ b/bsp/lpc122x/startup.c @@ -76,11 +76,6 @@ void rtthread_startup(void) rt_thread_idle_sethook(rt_hw_led_flash); #endif -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); @@ -109,7 +104,7 @@ int main (void) /* invoke rtthread_startup */ rtthread_startup(); - + return 0; } diff --git a/bsp/lpc2148/applications/startup.c b/bsp/lpc2148/applications/startup.c index b0f72afd42..5efc41fd80 100644 --- a/bsp/lpc2148/applications/startup.c +++ b/bsp/lpc2148/applications/startup.c @@ -100,9 +100,6 @@ void rtthread_startup(void) /* init hardware serial device */ rt_hw_serial_init(); - - /*init all registed devices*/ - rt_device_init_all(); #endif /* init application */ diff --git a/bsp/ls1bdev/applications/application.c b/bsp/ls1bdev/applications/application.c index d010f0f220..db345a1bb6 100644 --- a/bsp/ls1bdev/applications/application.c +++ b/bsp/ls1bdev/applications/application.c @@ -33,14 +33,11 @@ void rt_init_thread_entry(void *parameter) /* init Display Controller */ rt_hw_dc_init(); - - /* re-init device driver */ - rt_device_init_all(); - + /* find Display Controller device */ dc = rt_device_find("dc"); - - /* set Display Controller device as rtgui graphic driver */ + + /* set Display Controller device as rtgui graphic driver */ rtgui_graphic_set_device(dc); } #endif @@ -59,7 +56,7 @@ int rt_application_init(void) tid = rt_thread_create("init", rt_init_thread_entry, RT_NULL, 4096, 8, 20); - if (tid != RT_NULL) + if (tid != RT_NULL) rt_thread_startup(tid); return 0; diff --git a/bsp/ls1bdev/applications/startup.c b/bsp/ls1bdev/applications/startup.c index e73900485d..befa929d30 100644 --- a/bsp/ls1bdev/applications/startup.c +++ b/bsp/ls1bdev/applications/startup.c @@ -64,11 +64,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/m16c62p/applications/startup.c b/bsp/m16c62p/applications/startup.c index 3857b6cdad..2f6bede55a 100644 --- a/bsp/m16c62p/applications/startup.c +++ b/bsp/m16c62p/applications/startup.c @@ -42,7 +42,7 @@ void rtthread_startup(void) { /* init hardware interrupt */ rt_hw_interrupt_init(); - + /* init board */ rt_hw_board_init(); @@ -51,13 +51,13 @@ void rtthread_startup(void) /* init tick */ rt_system_tick_init(); - + /* init kernel object */ rt_system_object_init(); - + /* init timer system */ rt_system_timer_init(); - + #ifdef RT_USING_HEAP #ifdef __ICCM16C__ rt_system_heap_init(__segment_begin("DATA16_HEAP"), __segment_end("DATA16_HEAP")); @@ -68,11 +68,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif /* init application */ rt_application_init(); @@ -88,10 +83,10 @@ void rtthread_startup(void) /* init idle thread */ rt_thread_idle_init(); - + /* start scheduler */ rt_system_scheduler_start(); - + /* never reach here */ return ; } @@ -103,7 +98,7 @@ int main(void) /* init system setting */ system_init(); - + /* startup RT-Thread RTOS */ rtthread_startup(); diff --git a/bsp/mb9bf500r/application.c b/bsp/mb9bf500r/application.c index fe17f240ca..060be3cbd4 100644 --- a/bsp/mb9bf500r/application.c +++ b/bsp/mb9bf500r/application.c @@ -15,7 +15,7 @@ /** * @addtogroup FM3 */ - + /*@{*/ #include <rtthread.h> @@ -37,48 +37,45 @@ static char msg_pool[2048]; void rt_init_thread_entry(void *parameter) { - rt_device_t lcd; - + rt_device_t lcd; + rt_hw_led_init(); rt_hw_key_init(); rt_hw_adc_init(); - rt_hw_lcd_init(); + rt_hw_lcd_init(); rt_hw_cpu_init(); - - /* re-init device driver */ - rt_device_init_all(); - + #ifdef RT_USING_RTGUI extern void rtgui_system_server_init(void); /* find lcd device */ - lcd = rt_device_find("lcd"); - - /* set lcd device as rtgui graphic driver */ + lcd = rt_device_find("lcd"); + + /* set lcd device as rtgui graphic driver */ rtgui_graphic_set_device(lcd); /* init rtgui system server */ rtgui_system_server_init(); - + /* startup rtgui */ rtgui_startup(); #else { char buf[20] = {'\0'}; struct lcd_msg msg; - rt_device_t device; + rt_device_t device; device = rt_device_find("lcd"); rt_device_control(device, RT_DEVICE_CTRL_LCD_CLEAR_SCR, RT_NULL); x = 1; y = 1; - rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, "ADC"); + rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, "ADC"); x = 1; y = 20; rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, "CPU"); x = 1; y = 40; rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, "KEY"); - + while(1) { if (rt_mq_recv(&mq, &msg, sizeof(msg), RT_WAITING_FOREVER) == RT_EOK) @@ -90,14 +87,14 @@ void rt_init_thread_entry(void *parameter) y = 1; rt_memset(buf, 0, sizeof(buf)); rt_sprintf(buf, "%04d", msg.adc_value); - rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, buf); + rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, buf); break; case CPU_MSG: x = 40; y = 20; rt_memset(buf, 0, sizeof(buf)); rt_sprintf(buf, "%03d %03d", msg.major, msg.minor); - rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, buf); + rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, buf); break; case KEY_MSG: x = 40; @@ -110,22 +107,22 @@ void rt_init_thread_entry(void *parameter) break; case KEY_UP: rt_sprintf(buf, "UP KEY "); - break; + break; case KEY_RIGHT: rt_sprintf(buf, "RIGHT KEY"); break; case KEY_LEFT: rt_sprintf(buf, "LEFT KEY "); - break; + break; case KEY_ENTER: rt_sprintf(buf, "ENTER KEY"); break; default: rt_sprintf(buf, "NO KEY "); - break; + break; } - rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, buf); - break; + rt_device_control(device, RT_DEVICE_CTRL_LCD_PUT_STRING, buf); + break; } } } @@ -138,11 +135,11 @@ int rt_application_init(void) rt_thread_t init_thread; rt_mq_init(&mq, "mqt", &msg_pool[0], 128 - sizeof(void*), sizeof(msg_pool), RT_IPC_FLAG_FIFO); - + init_thread = rt_thread_create("init", rt_init_thread_entry, RT_NULL, 1024, 21, 20); if(init_thread != RT_NULL) rt_thread_startup(init_thread); - + return 0; } diff --git a/bsp/microblaze/startup.c b/bsp/microblaze/startup.c index c98098c03e..1b5067ea58 100755 --- a/bsp/microblaze/startup.c +++ b/bsp/microblaze/startup.c @@ -52,7 +52,7 @@ void rtthread_startup(void) /* init board */ rt_hw_board_init(); - + rt_show_version(); /* init tick */ @@ -86,8 +86,6 @@ void rtthread_startup(void) #ifdef RT_USING_DEVICE /* init hardware serial device */ rt_hw_serial_init(); - /* init all device */ - rt_device_init_all(); #endif /* init application */ @@ -113,7 +111,7 @@ int main (void) { /* invoke rtthread_startup */ rtthread_startup(); - + return 0; } diff --git a/bsp/nuc140/startup.c b/bsp/nuc140/startup.c index 0e3c695df3..9fd5bc8963 100644 --- a/bsp/nuc140/startup.c +++ b/bsp/nuc140/startup.c @@ -71,11 +71,6 @@ void rtthread_startup(void) rt_thread_idle_sethook(rt_hw_led_flash); #endif -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/sep6200/application/startup.c b/bsp/sep6200/application/startup.c index 6c9d390fa2..1514b1114b 100644 --- a/bsp/sep6200/application/startup.c +++ b/bsp/sep6200/application/startup.c @@ -78,20 +78,6 @@ void rtthread_startup() /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - -#ifdef RT_USING_DFS - /* Not implemented */ -#endif - -#ifdef RT_USING_LWIP - /* Not implemented */ -#endif - - /*init all registed devices */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); diff --git a/bsp/upd70f3454/applications/startup.c b/bsp/upd70f3454/applications/startup.c index f609fc7cbb..6434b85257 100644 --- a/bsp/upd70f3454/applications/startup.c +++ b/bsp/upd70f3454/applications/startup.c @@ -52,10 +52,10 @@ void rtthread_startup(void) /* init tick */ rt_system_tick_init(); - + /* init kernel object */ rt_system_object_init(); - + /* init timer system */ rt_system_timer_init(); @@ -68,11 +68,6 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); -#ifdef RT_USING_DEVICE - /* init all device */ - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); @@ -102,7 +97,7 @@ int main(void) /* init system setting */ TAB0_Start(); - + /* startup RT-Thread RTOS */ rtthread_startup(); diff --git a/bsp/wh44b0/startup.c b/bsp/wh44b0/startup.c index 1acafba54d..2f8b4b5bfa 100644 --- a/bsp/wh44b0/startup.c +++ b/bsp/wh44b0/startup.c @@ -84,10 +84,6 @@ void rtthread_startup(void) rt_thread_idle_sethook(rt_hw_led_flash); #endif -#ifdef RT_USING_DEVICE - rt_device_init_all(); -#endif - /* init application */ rt_application_init(); |
