1. Remove unuseful function(rt_system_module_init)

2. Modify the return code to -1 when failed
3. Change the mounting filesystem from ramfs to sdcard
4. Replace RT_USING_RTGUI with PKG_USING_GUIENGINE and remove RT_USING_FTK
This commit is contained in:
Jonne 2020-04-11 17:56:02 +08:00
parent b3c7bc964b
commit 0227b5823e
5 changed files with 18 additions and 27 deletions

View File

@ -6,17 +6,16 @@
int mnt_init(void)
{
if(dfs_mount(RT_NULL, "/", "ram", 0, dfs_ramfs_create(rt_malloc(1024),1024)) == 0)
{
rt_kprintf("RAM file system initializated!\n");
}
else
{
rt_kprintf("RAM file system initializate failed!\n");
}
return 0;
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
{
rt_kprintf("File System initialized!\n");
}
else
{
rt_kprintf("File System initialzation failed!\n");
}
return RT_EOK;
}
INIT_ENV_EXPORT(mnt_init);
#endif

View File

@ -17,16 +17,13 @@ if GetDepend('RT_USING_DFS'):
if GetDepend('RT_USING_LWIP'):
src += ['dm9000.c']
if GetDepend('RT_USING_RTGUI'):
src += ['touch.c', 'key.c']
if GetDepend('RT_USING_FTK'):
src += ['touch.c', 'key.c']
if GetDepend('PKG_USING_GUIENGINE'):
src += ['touch.c', 'key.c']
if GetDepend('RT_USING_RTI'):
src += ['rti_stub.c']
src += ['rti_stub.c']
if GetDepend('RT_USING_RTGUI') or GetDepend('RT_USING_FTK'):
if GetDepend('PKG_USING_GUIENGINE'):
if rtconfig.RT_USING_LCD_TYPE == 'PNL_A70':
src += ['lcd_a70.c']
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':

View File

@ -125,11 +125,4 @@ void rt_hw_board_init(void)
#endif
}
#ifdef RT_USING_MODULE
int rt_system_module_init(void)
{
return 0;
}
#endif
/*@}*/

View File

@ -642,6 +642,8 @@ int rt_hw_dm9000_init()
/* instal interrupt */
rt_hw_interrupt_install(INTEINT4_7, INTEINT4_7_handler, RT_NULL, "EINT4_7");
rt_hw_interrupt_umask(INTEINT4_7);
return RT_EOK;
}
INIT_DEVICE_EXPORT(rt_hw_dm9000_init);

View File

@ -574,7 +574,7 @@ int rt_hw_sdcard_init(void)
{
rt_kprintf("allocate partition sector buffer failed\n");
return RT_ERROR;
return -1;
}
status = sd_readblock(0, sector);
if (status == RT_EOK)
@ -637,7 +637,7 @@ int rt_hw_sdcard_init(void)
/* release sector buffer */
rt_free(sector);
return RT_ERROR;
return -1;
}
else
{