Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ROM characteristics and performance benchmarks of the NOR driver can be found in section Driver Characterization. The NOR driver also provides interface functions to perform low-level operations (see section FAT System Driver Functions).

Listing 16-1 Opening a NOR device volume

L16-1(1) Register the NOR device driver FSDev_NOR.

L16-1(2) The NOR device configuration should be assigned. For more information about these parameters, see section D-3 “FS_DEV_NOR_CFG”.

L16-1(3) FSDev_Open() opens/initializes a file system device. The parameters are the device name (3a) and a pointer to a device driver-specific configuration structure (3b). The device name (3a) s composed of a device driver name (“nor”), a single colon, an ASCII-formatted integer (the unit number) and another colon.

L16-1(4) FSDev_NOR_LowFmt() low-level formats a NOR. If the NOR has never been used with µC/FS, it must be low-level formatted before being used. Low-level formatting will associate logical sectors with physical areas of the device. 

FSVol_Open() opens/mounts a volume. The parameters are the volume name (5a), the device name (5b) and the partition that will be opened (5c). There is no restriction on the volume name (5a); however, it is typical to give the volume the same name as the underlying device. If the default partition is to be opened, or if the device is not partition, then the partition number (5c) should be zero.

...