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:
parent
b3c7bc964b
commit
0227b5823e
|
@ -6,17 +6,16 @@
|
||||||
|
|
||||||
int mnt_init(void)
|
int mnt_init(void)
|
||||||
{
|
{
|
||||||
|
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
||||||
if(dfs_mount(RT_NULL, "/", "ram", 0, dfs_ramfs_create(rt_malloc(1024),1024)) == 0)
|
{
|
||||||
{
|
rt_kprintf("File System initialized!\n");
|
||||||
rt_kprintf("RAM file system initializated!\n");
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
rt_kprintf("File System initialzation failed!\n");
|
||||||
rt_kprintf("RAM file system initializate failed!\n");
|
}
|
||||||
}
|
|
||||||
|
return RT_EOK;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
INIT_ENV_EXPORT(mnt_init);
|
INIT_ENV_EXPORT(mnt_init);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,16 +17,13 @@ if GetDepend('RT_USING_DFS'):
|
||||||
if GetDepend('RT_USING_LWIP'):
|
if GetDepend('RT_USING_LWIP'):
|
||||||
src += ['dm9000.c']
|
src += ['dm9000.c']
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
if GetDepend('PKG_USING_GUIENGINE'):
|
||||||
src += ['touch.c', 'key.c']
|
src += ['touch.c', 'key.c']
|
||||||
|
|
||||||
if GetDepend('RT_USING_FTK'):
|
|
||||||
src += ['touch.c', 'key.c']
|
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTI'):
|
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':
|
if rtconfig.RT_USING_LCD_TYPE == 'PNL_A70':
|
||||||
src += ['lcd_a70.c']
|
src += ['lcd_a70.c']
|
||||||
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':
|
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':
|
||||||
|
|
|
@ -125,11 +125,4 @@ void rt_hw_board_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RT_USING_MODULE
|
|
||||||
int rt_system_module_init(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
@ -642,6 +642,8 @@ int rt_hw_dm9000_init()
|
||||||
/* instal interrupt */
|
/* instal interrupt */
|
||||||
rt_hw_interrupt_install(INTEINT4_7, INTEINT4_7_handler, RT_NULL, "EINT4_7");
|
rt_hw_interrupt_install(INTEINT4_7, INTEINT4_7_handler, RT_NULL, "EINT4_7");
|
||||||
rt_hw_interrupt_umask(INTEINT4_7);
|
rt_hw_interrupt_umask(INTEINT4_7);
|
||||||
|
|
||||||
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_DEVICE_EXPORT(rt_hw_dm9000_init);
|
INIT_DEVICE_EXPORT(rt_hw_dm9000_init);
|
||||||
|
|
|
@ -574,7 +574,7 @@ int rt_hw_sdcard_init(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("allocate partition sector buffer failed\n");
|
rt_kprintf("allocate partition sector buffer failed\n");
|
||||||
|
|
||||||
return RT_ERROR;
|
return -1;
|
||||||
}
|
}
|
||||||
status = sd_readblock(0, sector);
|
status = sd_readblock(0, sector);
|
||||||
if (status == RT_EOK)
|
if (status == RT_EOK)
|
||||||
|
@ -637,7 +637,7 @@ int rt_hw_sdcard_init(void)
|
||||||
/* release sector buffer */
|
/* release sector buffer */
|
||||||
rt_free(sector);
|
rt_free(sector);
|
||||||
|
|
||||||
return RT_ERROR;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue