#include #include "components_init.h" #ifdef RT_USING_FINSH #include #include #endif #ifdef RT_USING_LWIP #include #include extern void lwip_system_init(void); #endif #ifdef RT_USING_DFS #include #ifdef RT_USING_DFS_ELMFAT #include #endif #ifdef RT_USING_DFS_NFS #include #endif #ifdef RT_USING_DFS_ROMFS #include #endif #ifdef RT_USING_DFS_DEVFS #include #endif #ifdef RT_USING_DFS_UFFS #include #endif #ifdef RT_USING_DFS_JFFS2 #include #endif #ifdef RT_USING_DFS_YAFFS2 #include #endif #endif #ifdef RT_USING_NEWLIB #include #endif #ifdef RT_USING_PTHREADS #include #endif /** * RT-Thread Components Initialization */ void rt_components_init(void) { #ifdef RT_USING_MODULE rt_system_module_init(); #endif #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); finsh_set_device(RT_CONSOLE_DEVICE_NAME); #endif #ifdef RT_USING_LWIP /* initialize lwip stack */ /* register ethernetif device */ eth_system_device_init(); /* initialize lwip system */ lwip_system_init(); rt_kprintf("TCP/IP initialized!\n"); #endif #ifdef RT_USING_DFS /* initialize the device file system */ dfs_init(); #ifdef RT_USING_DFS_ELMFAT /* initialize the elm chan FatFS file system*/ elm_init(); #endif #if defined(RT_USING_DFS_NFS) && defined(RT_USING_LWIP) /* initialize NFSv3 client file system */ nfs_init(); #endif #ifdef RT_USING_DFS_YAFFS2 dfs_yaffs2_init(); #endif #ifdef RT_USING_DFS_UFFS dfs_uffs_init(); #endif #ifdef RT_USING_DFS_JFFS2 dfs_jffs2_init(); #endif #ifdef RT_USING_DFS_ROMFS dfs_romfs_init(); #endif #ifdef RT_USING_DFS_DEVFS devfs_init(); #endif #endif #ifdef RT_USING_NEWLIB libc_system_init(RT_CONSOLE_DEVICE_NAME); #endif #ifdef RT_USING_PTHREADS pthread_system_init(); #endif #ifdef RT_USING_RTGUI rtgui_system_server_init(); #endif #ifdef RT_USING_USB_HOST rt_usb_host_init(); #endif return; }