diff --git a/bsp/at91sam9260/application.c b/bsp/at91sam9260/application.c index 4e85bdf21..9b229f57b 100755 --- a/bsp/at91sam9260/application.c +++ b/bsp/at91sam9260/application.c @@ -93,6 +93,18 @@ void rt_init_thread_entry(void* parameter) } #endif +#ifdef RT_USING_LWIP + { + /* 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(); + rt_kprintf("TCP/IP initialized!\n"); + } +#endif } diff --git a/bsp/at91sam9260/startup.c b/bsp/at91sam9260/startup.c index 614bc133d..d7382f5e7 100755 --- a/bsp/at91sam9260/startup.c +++ b/bsp/at91sam9260/startup.c @@ -144,15 +144,6 @@ void rtthread_startup(void) //rt_hw_sdcard_init(); #endif -#ifdef RT_USING_LWIP - /* register ethernetif device */ - eth_system_device_init(); - rt_hw_macb_init(); - /* init lwip system */ - lwip_sys_init(); - rt_kprintf("TCP/IP initialized!\n"); -#endif - /*init all registed devices */ rt_device_init_all(); #endif