diff --git a/bsp/frdm-k64f/applications/application.c b/bsp/frdm-k64f/applications/application.c index f311c9a77c..f31581a920 100644 --- a/bsp/frdm-k64f/applications/application.c +++ b/bsp/frdm-k64f/applications/application.c @@ -29,32 +29,14 @@ #include #include #include -#include "stm32_eth.h" #endif 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"); - } +#ifdef RT_USING_COMPONENTS_INIT + /* initialization RT-Thread Components */ + rt_components_init(); #endif - -//FS - -//GUI } float f_var1; diff --git a/bsp/frdm-k64f/rtconfig.h b/bsp/frdm-k64f/rtconfig.h index 6b676e1fe5..32c611e2b8 100644 --- a/bsp/frdm-k64f/rtconfig.h +++ b/bsp/frdm-k64f/rtconfig.h @@ -64,6 +64,9 @@ /* Using Serial Device Driver Framework" default="true" */ #define RT_USING_SERIAL +//
+#define RT_USING_COMPONENTS_INIT +//
/* SECTION: Console options */ #define RT_USING_CONSOLE