Versions Compared

Key

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

...

Anchor10465261046526 Using the IDE/CF Driver Anchor10465271046527To use the IDE/CF driver, five files, in addition to the generic file system files, must be included in the build: Anchor10465281046528

...

10465311046531The 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: Anchor10465321046532

...

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

ROM/RAM characteristics and performance benchmarks of the IDE driver can be found in section 911-1-1 “Driver Characterization” on page 113. Anchor10535131053513  

...

...

rowspan49

...

Listing 18-1 Opening a IDE/CF device volume

...

L18-1(1) Register the IDE/CF device driver.

...

L18-1(2) FSDev_Open() opens/initializes a file system device. The parameters are the device name (1a) and a pointer to a device driver-specific configuration structure (1b). The device name (1a) is composed of a device driver name (“ide”), a single colon, an ASCII-formatted integer (the unit number) and another colon. Since the IDE/CF driver requires no configuration, the configuration structure (1b) should be passed a NULL pointer.

Anchor10465881046588Since 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 57-2 “Using Devices” on page 69 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.

...

L18-1(4) High level format can be applied to the volume if FS_ERR_PARTITION_NOT_FOUND is returned by the call to FSVol_Open() function.

...

Anchor10465911046591

If the IDE initialization succeeds, the file system will produce the trace output as shown in Figure 18 Figure 18-1 (if a sufficiently high trace level is configured). See section E-9 “Trace Configuration” on page 507 about configuring the trace level. Anchor10571961057196 Image Removed

...

Image Added

Figure 18-1 IDE detection trace output