#define OPEN_MAX 20 / * Maximum number of files opened simultaneously * / #define MAX_DIR 10 / * Maximum number of directory information * /Uint32 work [GFS_WORK_SIZE (OPEN_MAX) / 4]; / * Library work area * / GfsDirTbl dirtbl; / * Directory information management structure * / GfsDirId dir [MAX_DIR]; / * Directory information storage area * /
GFS_DIRTBL_TYPE (& dirtbl) = GFS_DIR_ID; / * Directory information storage area type * / GFS_DIRTBL_NDIR (& dirtbl) = MAX_DIR; / * Directory information storage area * / / * Maximum number of elements * / GFS_DIRTBL_DIRID (& dirtbl) = dir; / * Directory information storage area * / / * Address * / GFS_Init(OPEN_MAX, work, &dirtbl);
If you change the CD-ROM, you must call GFS_Init again.