[BSP] Remove rt_device_init_all() function invoking.

This commit is contained in:
bernard 2014-04-05 23:56:29 +08:00
parent 54326fcb82
commit 412d548f9c
19 changed files with 46 additions and 151 deletions

View File

@ -35,27 +35,7 @@
void rt_init_thread_entry(void* parameter) void rt_init_thread_entry(void* parameter)
{ {
/* LwIP Initialization */ /* nothing */
#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
} }
float f_var1; float f_var1;
@ -92,16 +72,9 @@ 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", init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL, rt_init_thread_entry, RT_NULL,
2048, 8, 20); 2048, RT_THREAD_PRIORITY_MAX/3, 20);
#else
init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, 80, 20);
#endif
if (init_thread != RT_NULL) if (init_thread != RT_NULL)
rt_thread_startup(init_thread); rt_thread_startup(init_thread);

View File

@ -85,9 +85,6 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
/* init all device */
rt_device_init_all();
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -138,8 +138,6 @@ void rt_init_thread_entry(void* parameter)
/* register ethernetif device */ /* register ethernetif device */
eth_system_device_init(); eth_system_device_init();
rt_hw_macb_init(); rt_hw_macb_init();
/* re-init device driver */
rt_device_init_all();
/* init lwip system */ /* init lwip system */
lwip_sys_init(); lwip_sys_init();
} }

View File

@ -39,7 +39,6 @@ int main(void)
#endif #endif
rt_system_scheduler_init(); rt_system_scheduler_init();
rt_device_init_all();
rt_application_init(); rt_application_init();
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH

View File

@ -62,9 +62,6 @@ void rtthread_startup(void)
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM, RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
&uart0); &uart0);
/* init all device */
rt_device_init_all();
rt_console_set_device("uart0"); rt_console_set_device("uart0");
#endif #endif

View File

@ -65,11 +65,6 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -55,11 +55,6 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -76,11 +76,6 @@ void rtthread_startup(void)
rt_thread_idle_sethook(rt_hw_led_flash); rt_thread_idle_sethook(rt_hw_led_flash);
#endif #endif
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -76,11 +76,6 @@ void rtthread_startup(void)
rt_thread_idle_sethook(rt_hw_led_flash); rt_thread_idle_sethook(rt_hw_led_flash);
#endif #endif
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -100,9 +100,6 @@ void rtthread_startup(void)
/* init hardware serial device */ /* init hardware serial device */
rt_hw_serial_init(); rt_hw_serial_init();
/*init all registed devices*/
rt_device_init_all();
#endif #endif
/* init application */ /* init application */

View File

@ -34,9 +34,6 @@ void rt_init_thread_entry(void *parameter)
/* init Display Controller */ /* init Display Controller */
rt_hw_dc_init(); rt_hw_dc_init();
/* re-init device driver */
rt_device_init_all();
/* find Display Controller device */ /* find Display Controller device */
dc = rt_device_find("dc"); dc = rt_device_find("dc");

View File

@ -64,11 +64,6 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -69,11 +69,6 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -45,9 +45,6 @@ void rt_init_thread_entry(void *parameter)
rt_hw_lcd_init(); rt_hw_lcd_init();
rt_hw_cpu_init(); rt_hw_cpu_init();
/* re-init device driver */
rt_device_init_all();
#ifdef RT_USING_RTGUI #ifdef RT_USING_RTGUI
extern void rtgui_system_server_init(void); extern void rtgui_system_server_init(void);

View File

@ -86,8 +86,6 @@ void rtthread_startup(void)
#ifdef RT_USING_DEVICE #ifdef RT_USING_DEVICE
/* init hardware serial device */ /* init hardware serial device */
rt_hw_serial_init(); rt_hw_serial_init();
/* init all device */
rt_device_init_all();
#endif #endif
/* init application */ /* init application */

View File

@ -71,11 +71,6 @@ void rtthread_startup(void)
rt_thread_idle_sethook(rt_hw_led_flash); rt_thread_idle_sethook(rt_hw_led_flash);
#endif #endif
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -78,20 +78,6 @@ void rtthread_startup()
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); 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 */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -68,11 +68,6 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
/* init all device */
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();

View File

@ -84,10 +84,6 @@ void rtthread_startup(void)
rt_thread_idle_sethook(rt_hw_led_flash); rt_thread_idle_sethook(rt_hw_led_flash);
#endif #endif
#ifdef RT_USING_DEVICE
rt_device_init_all();
#endif
/* init application */ /* init application */
rt_application_init(); rt_application_init();