User`s manual

132 digi.com File Systems
10.1.2.2 FS2 Configuration Macros
FS_MAX_DEVICES
This macro defines the maximum physical media. If it is not defined in the program code,
FS_MAX_DEVICES will default to 1, 2, or 3, depending on the values of
FS2_USE_PROGRAM_FLASH, XMEM_RESERVE_SIZE and FS2_RAM_RESERVE.
FS_MAX_LX
This macro defines the maximum logical extents. You must increase this value by 1 for each new partition
your application creates. It this is not defined in the program code it will default to FS_MAX_DEVICES.
For a description of logical extents please see Section 10.1.4.2.
FS_MAX_FILES
This macro is used to specify the maximum number of files allowed to coexist in the entire file system.
Most applications will have a fixed number of files defined, so this parameter can be set to that number to
avoid wasting root data memory. The default is 6 files. The maximum value for this parameter is 255.
FS2_DISALLOW_GENERIC_FLASH
This macro is used to prevent FS2 from mistakenly attempting to recover a nonexistent file system on the
“generic” (second) flash, or to prevent RAM corruption caused by _GetFlashID() when flash is not
mapped into memory at all.
FS2_DISALLOW_PROGRAM_FLASH
This macro is used to prevent FS2 from mistakenly attempting to recover a nonexistent file system on the
“program” (first) flash, or to prevent RAM corruption caused by _GetFlashID() when flash is not
mapped into memory at all.
FS2_RAM_RESERVE
This macro determines the amount of space used for FS2 in RAM. If some battery-backed RAM is to be
used by FS2, then this macro must be modified to specify the amount of RAM to reserve. The memory is
reserved near the top of RAM. Note that this RAM will be reserved whether or not the application actually
uses FS2.
Prior to Dynamic C 7.06 this macro was defined as the number of bytes to reserve and had to be a multiple
of 4096. It is now defined as the number of blocks to reserve, with each block being 4096 bytes.
This macro is defined in the BIOS prior to Dynamic C version 9.30 and in memconfig.lib thereafter.
FS2_SHIFT_DOESNT_UPDATE_FPOS
If this macro is defined before the #use fs2.lib statement in an application, multiple file descriptors
can be opened, but their current position will not be updated if fshift() is used.