void rt_init_thread_entry(void* parameter) { #ifdef RT_USING_COMPONENTS_INIT /* initialization RT-Thread Components */ rt_components_init(); #endif { extern rt_err_t mci_hw_init(const char *device_name); mci_hw_init("sd0"); } /* Filesystem Initialization */ #ifdef RT_USING_DFS { #ifdef RT_USING_DFS_ELMFAT /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) { rt_kprintf("File System initialized!\n"); } else rt_kprintf("File System initialzation failed!\n"); #endif } #endif #ifdef RT_USING_USBD { extern rt_err_t rt_ramdisk_init(void); extern rt_err_t lpc_usbd_register(void); lpc_usbd_register(); rt_usb_device_init(); } #endif }
void rt_init_thread_entry(void* parameter) { { extern rt_err_t mci_hw_init(const char *device_name); mci_hw_init("sd0"); } /* initialization RT-Thread Components */ rt_components_init(); /* Filesystem Initialization */ #ifdef RT_USING_DFS { #ifdef RT_USING_DFS_ELMFAT /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) { rt_kprintf("File System initialized!\n"); } else rt_kprintf("File System initialzation failed!\n"); #endif } #endif }
int mnt_init(void) { #ifdef RT_USING_DFS_ROMFS /* initialize the device filesystem */ dfs_init(); dfs_romfs_init(); /* mount rom file system */ if (dfs_mount(RT_NULL, "/", "rom", 0, &(romfs_root)) == 0) { rt_kprintf("ROM file system initializated!\n"); } #endif /* initilize sd card */ mci_hw_init("sd0"); /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", SD_ROOT, "elm", 0, 0) == 0) rt_kprintf("File System initialized!\n"); else rt_kprintf("File System init failed!\n"); return 0; }
void rt_init_thread_entry(void* parameter) { #ifdef RT_USING_LWIP /* initialize eth interface */ lpc_emac_hw_init(); #endif #ifdef RT_USING_COMPONENTS_INIT /* initialization RT-Thread Components */ rt_components_init(); #endif { extern rt_err_t mci_hw_init(const char *device_name); mci_hw_init("sd0"); } /* Filesystem Initialization */ #ifdef RT_USING_DFS { #ifdef RT_USING_DFS_ELMFAT /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) { rt_kprintf("File System initialized!\n"); #if (RT_DFS_ELM_USE_LFN != 0) && (defined RT_DFS_ELM_CODE_PAGE_FILE) { extern void ff_convert_init(void); ff_convert_init(); } #endif } else rt_kprintf("File System initialzation failed!\n"); #endif } #endif /* do some thing here. */ #if defined(RT_USING_DFS) && defined(RT_USING_LWIP) /* start ftp server */ rt_kprintf("ftp server begin...\n"); ftpd_start(); rt_kprintf("ftp server started!!\n"); #endif }
void rt_init_thread_entry(void* parameter) { /* initialize LCD drv for GUI */ rtgui_lcd_init(); /* Filesystem Initialization */ mci_hw_init("sd0"); /* initialize the device file system */ dfs_init(); /* initialize the elm chan FatFS file system*/ elm_init(); /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) { rt_kprintf("File System initialized!\n"); #if (RT_DFS_ELM_USE_LFN != 0) && (defined RT_DFS_ELM_CODE_PAGE_FILE) { extern void ff_convert_init(void); ff_convert_init(); } #endif } else { rt_kprintf("File System initialzation failed!\n"); } /* initialize GUI system */ rtgui_system_server_init(); /* initialize keyboard */ rt_hw_key_init(); /* initialize touch */ rt_hw_spi_init(); rtgui_touch_hw_init(); /* GUI examples initializtion */ application_init(); finsh_system_init(); }
int mnt_init(void) { nftl_attach("nand0"); if (dfs_mount("nand0", "/", "elm", 0, 0) == 0) { rt_kprintf("Mount FatFs file system to root, Done!\n"); } else { rt_kprintf("Mount FatFs file system failed.\n"); } /* initilize sd card */ mci_hw_init("sd0"); /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", "/SD", "elm", 0, 0) == 0) rt_kprintf("File System initialized!\n"); else rt_kprintf("File System init failed!\n"); return 0; }
/* thread phase init */ void rt_init_thread_entry(void *parameter) { // #ifdef RT_USING_I2C // rt_i2c_core_init(); // rt_hw_i2c_init(); // #endif rt_hw_spi_init(); rt_system_module_init(); /* Filesystem Initialization */ #ifdef RT_USING_DFS { extern rt_err_t mci_hw_init(const char *device_name); /* initilize sd card */ mci_hw_init("sd0"); /* init the device filesystem */ dfs_init(); /* init the elm FAT filesystam*/ elm_init(); #ifdef RT_USING_NFTL { extern void rt_hw_mtd_nand_init(void); rt_hw_mtd_nand_init(); nftl_init(); nftl_mount(); // list_mem(); } #else /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) rt_kprintf("File System initialized!\n"); else rt_kprintf("File System init failed!\n"); #endif } #endif /* LwIP Initialization */ #ifdef RT_USING_LWIP { extern void lwip_sys_init(void); eth_system_device_init(); /* register ethernetif device */ lpc_emac_hw_init(); /* init all device */ rt_device_init_all(); /* init lwip system */ lwip_sys_init(); rt_kprintf("TCP/IP initialized!\n"); } #endif #ifdef RT_USING_RTGUI { extern void realtouch_ui_init(void); extern void rt_hw_key_init(void); rt_device_t lcd; /* init lcd */ rt_hw_lcd_init(); /* re-init device driver */ rt_device_init_all(); /* find lcd device */ lcd = rt_device_find("lcd"); if (lcd != RT_NULL) { /* set lcd device as rtgui graphic driver */ rtgui_graphic_set_device(lcd); /* init rtgui system server */ rtgui_system_server_init(); rt_thread_delay(5); rt_hw_key_init(); rtgui_touch_hw_init("spi10"); /* startup rtgui realtouch ui */ realtouch_ui_init(); } } #endif #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); finsh_set_device(FINSH_DEVICE_NAME); #endif }