Zilog EZ80F91AZA User Manual
Page 22

Zilog File System Configuration
UM017914-1211
12
Zilog File System
User Manual
The following code segment presents an example Zilog File System configuration file,
ZFS_Conf.c
.
#define ZFS_TOTAL_NUM_BLOCKS (7 + 1)
#define ZFS_TOTAL_NUM_SECTORS (0xE0000/ZFS_SEC_SIZE)
#define ZFS_TOTAL_NUM_VOLUMES (1 + 1)
#define ZFS_MAX_FILE_OPEN_COUNT (20)
#define ZFS_MAX_DIRS_SUPPORTED (50)
#define ERASE_FLASH (0)
ZFS_CONFIG_t g_zfs_cfg[ ZFS_TOTAL_NUM_VOLUMES ] =
{
{
"EXTF",
// vol name
ZFS_EXT_FLASH_DEV_TYPE,
// vol type
(UINT8*)0x120000,
// vol_start_addr
0xE0000, //
vol_size
7, //
vol_blocks
(0xE0000/ZFS_SEC_SIZE),
// number of sectors
FS_MT28F008_Init,
FS_MT28F008_Read,
FS_MT28F008_Write,
FS_MT28F008_Erase,
FS_MT28F008_Close
},
{
"RAMF",
// vol name
ZFS_RAM_DEV_TYPE,
// vol type
(UINT8*)0xB80000, //
vol_start_addr
0x80000, //
vol_size
1, //
vol_blocks
(0x80000/ZFS_SEC_SIZE),
// number of sectors
RamDrv_Init,
RamDrv_Read,
RamDrv_Write,
RamDrv_Erase,
RamDrv_Close
}
} ;