...
A single IDE/CF volume is opened as shown in Listing - Opening a IDE/CF device volume. 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 Driver Characterization. .
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_BOOLEAN App_FS_AddIDE (void)
{
FS_ERR err;
FS_DevDrvAdd((FS_DEV_API *)&FSDev_IDE, (1)
(FS_ERR *)&err);
if ((err != FS_ERR_NONE) && (err != FS_ERR_DEV_DRV_ALREADY_ADDED)) {
return (DEF_FAIL);
}
(2)
FSDev_Open((CPU_CHAR *)"ide:0:", (a)
(void *) 0, (b)
(FS_ERR *)&err);
switch (err) {
case FS_ERR_NONE:
break;
case FS_ERR_DEV:
case FS_ERR_DEV_IO:
case FS_ERR_DEV_TIMEOUT:
case FS_ERR_DEV_NOT_PRESENT:
return (DEF_FAIL);
default:
return (DEF_FAIL);
}
(3)
FSVol_Open((CPU_CHAR *)"ide:0:", (a)
(CPU_CHAR *)"ide:0:", (b)
(FS_PARTITION_NBR ) 0, (c)
(FS_ERR *)&err);
switch (err) {
case FS_ERR_NONE:
break;
case FS_ERR_DEV:
case FS_ERR_DEV_IO:
case FS_ERR_DEV_TIMEOUT:
case FS_ERR_DEV_NOT_PRESENT:
case FS_ERR_PARTITION_NOT_FOUND: (4)
return (DEF_FAIL);
default:
return (DEF_FAIL);
}
return (DEF_OK);
} |
Panel |
---|
(1) Register the IDE/CF device driver. (2) Since IDE/CF are often removable media, it is possible for the device to not be present when (3) (4) High level format can be applied to the volume if |
If the IDE initialization succeeds, the file system will produce the trace output as shown in Figure - IDE detection trace output (if a sufficiently high trace level is configured). See Trace Configuration about configuring the trace level.
Panel | ||||
---|---|---|---|---|
| ||||