Skip to content

Commit 0227b58

Browse files
committed
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
1 parent b3c7bc9 commit 0227b58

File tree

5 files changed

+18
-27
lines changed

5 files changed

+18
-27
lines changed

bsp/mini2440/applications/mnt.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66

77
int mnt_init(void)
88
{
9-
10-
if(dfs_mount(RT_NULL, "/", "ram", 0, dfs_ramfs_create(rt_malloc(1024),1024)) == 0)
11-
{
12-
rt_kprintf("RAM file system initializated!\n");
13-
}
14-
else
15-
{
16-
rt_kprintf("RAM file system initializate failed!\n");
17-
}
18-
19-
return 0;
9+
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
10+
{
11+
rt_kprintf("File System initialized!\n");
12+
}
13+
else
14+
{
15+
rt_kprintf("File System initialzation failed!\n");
16+
}
17+
18+
return RT_EOK;
2019
}
2120
INIT_ENV_EXPORT(mnt_init);
2221
#endif

bsp/mini2440/drivers/SConscript

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ if GetDepend('RT_USING_DFS'):
1717
if GetDepend('RT_USING_LWIP'):
1818
src += ['dm9000.c']
1919

20-
if GetDepend('RT_USING_RTGUI'):
21-
src += ['touch.c', 'key.c']
22-
23-
if GetDepend('RT_USING_FTK'):
24-
src += ['touch.c', 'key.c']
20+
if GetDepend('PKG_USING_GUIENGINE'):
21+
src += ['touch.c', 'key.c']
2522

2623
if GetDepend('RT_USING_RTI'):
27-
src += ['rti_stub.c']
24+
src += ['rti_stub.c']
2825

29-
if GetDepend('RT_USING_RTGUI') or GetDepend('RT_USING_FTK'):
26+
if GetDepend('PKG_USING_GUIENGINE'):
3027
if rtconfig.RT_USING_LCD_TYPE == 'PNL_A70':
3128
src += ['lcd_a70.c']
3229
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':

bsp/mini2440/drivers/board.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,4 @@ void rt_hw_board_init(void)
125125
#endif
126126

127127
}
128-
129-
#ifdef RT_USING_MODULE
130-
int rt_system_module_init(void)
131-
{
132-
return 0;
133-
}
134-
#endif
135128
/*@}*/

bsp/mini2440/drivers/dm9000.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,8 @@ int rt_hw_dm9000_init()
642642
/* instal interrupt */
643643
rt_hw_interrupt_install(INTEINT4_7, INTEINT4_7_handler, RT_NULL, "EINT4_7");
644644
rt_hw_interrupt_umask(INTEINT4_7);
645+
646+
return RT_EOK;
645647
}
646648

647649
INIT_DEVICE_EXPORT(rt_hw_dm9000_init);

bsp/mini2440/drivers/sdcard.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ int rt_hw_sdcard_init(void)
574574
{
575575
rt_kprintf("allocate partition sector buffer failed\n");
576576

577-
return RT_ERROR;
577+
return -1;
578578
}
579579
status = sd_readblock(0, sector);
580580
if (status == RT_EOK)
@@ -637,7 +637,7 @@ int rt_hw_sdcard_init(void)
637637
/* release sector buffer */
638638
rt_free(sector);
639639

640-
return RT_ERROR;
640+
return -1;
641641
}
642642
else
643643
{

0 commit comments

Comments
 (0)