Versions Compared

Key

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

To use the IDE/CF driver, five files, in addition to the generic file system files, must be included in the build:

  • fs_dev_ide.c (located in the directory specified in Section 9.01).
  • fs_dev_ide.h (located in the directory specified in Section 9.01).
  • fs_dev_ide_bsp.c (located in the user application or BSP).

The file fs_dev_ide.h must also be #included in any application or header files that directly reference the driver (for example, by registering the device driver). The following directories must be on the project include path:

  • \Micrium\Software\uC-FS\Drivers\IDE

A single IDE/CF volume is opened as shown in Listing 18-1. The file system initialization (FS_Init()) function must have been previously called.

ROM/RAM characteristics and performance benchmarks of the IDE driver can be found in section 11-1-1 “Driver Characterization”.

Listing 18-1 Opening a IDE/CF device volume

...

Since IDE/CF are often removable media, it is possible for the device to not be present when FSDev_Open() is called. The device will still be added to the file system and a volume opened on the (not yet present) device. When the volume is later accessed, the file system will attempt to refresh the device information and detect a file system (see section 7-2 “Using Devices” for more information).

L18-1(3) FSVol_Open() opens/mounts a volume. The parameters are the volume name (2a), the device name (2b) and the partition that will be opened (2c). There is no restriction on the volume name (2a); 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 (2c) should be zero.

...