beautypg.com

Zilog EZ80F91AZA User Manual

Page 21

background image

UM017914-1211

Zilog File System Configuration

Zilog File System

User Manual

11

An example of volume configuration for RAM and Flash is provided in the code segment
that follows. Configuration of the volume must be stored into the

g_zfs_cfg

variable

that is present in the

ZFS_Conf.c

file.

typedef struct

{

INT8 vol_name[ ZFS_MAX_VOL_NAME_LEN + 1] ;

UINT8 vol_type ;

// ZFS_VOL_RAM,

ZFS_VOL_INTFLASH,

// ZFS_VOL_EXTFLASH

UINT8* vol_addr;

// starting address of volume.

UINT32 vol_size ;

// in bytes

UINT vol_blks ;

// number of blocks present in

// the volume. (for RAM it

// will be 1, for Flash

// related to the erasable

UINT vol_secs ;

// units number of sectors

// function pointers for all

// driver entries and other routines that require the different

// search algorithm function pointers for all devices.

DRV_INIT pfn_drv_init ;

DRV_READ pfn_drv_read ;

DRV_WRITE pfn_drv_write ;

DRV_ERASE pfn_drv_erase ;

DRV_CLOSE pfn_drv_close ;

// function pointers for Zilog File System routines

} ZFS_CONFIG_t, *PZFS_CONFIG_t ;

Sample Zilog File System Configuration

The sample Zilog File System configuration contains two volumes:

One volume resides in Flash (EXTF) that starts at address location

0x120000

, with 7

blocks and a volume size of

0xE0000

One volume resides in RAM (RAMF) that starts at address location

0xB80000

, with 1

block and a volume size of

0x80000

System-wide, 20 file open instances can be present at a time, and 50 directories can be cre-
ated throughout the system.

This manual is related to the following products: