uffs_emuDevice.c

Go to the documentation of this file.
00001 
00006 #include "uffs/uffs_config.h"
00007 #include "uffs/uffs_device.h"
00008 #include "uffs/uffs_public.h"
00009 #include <string.h>
00010 
00011 
00012 #define PFX "emuDev:"
00013 
00014 #ifdef USE_NATIVE_MEMORY_ALLOCATOR
00015 
00022 static u32 g_mem_pool[(1024 * 100) / sizeof(u32)];  
00023 
00024 #endif
00025 
00026 extern uffs_Device uffs_femuDev;
00027 static struct uffs_mountTableSt femu_MountTbl[] = {
00028     {&uffs_femuDev, 0, -1, "/"},
00029     {NULL, 0, 0, NULL},
00030 };
00031 
00032 
00033 uffs_mountTable * uffs_GetMountTable(void)
00034 {
00035     return femu_MountTbl;
00036 }
00037 
00038 int InitFileSystem(void)
00039 {
00040     static int bIsFileSystemInited = 0;
00041 
00042     if(bIsFileSystemInited) return -4;
00043     bIsFileSystemInited = 1;
00044 
00045 #ifdef USE_NATIVE_MEMORY_ALLOCATOR
00046     uffs_InitHeapMemory(g_mem_pool, sizeof(g_mem_pool));
00047 #endif
00048 
00049     return uffs_initMountTable(uffs_GetMountTable());
00050 }
00051 
00052 int ReleaseFileSystem(void)
00053 {
00054     return uffs_releaseMountTable(uffs_GetMountTable());
00055 }
00056 
00057 

Generated on Sat Mar 17 15:45:44 2007 for uffs-doc by  doxygen 1.5.0