The ultimate purpose of a file system device is to hold data. Consequently, two major operations that can occur on a device are the reading and writing of individual sectors. Five additional operations can be performed which affect not just individual sectors, but the whole device:
These operations and the corresponding API functions are discussed in this section. For information about using device names, see section 4-2 “μC/FS Device and Volume Names”.
Function |
Description |
FSDev_AccessLock() |
Acquire exclusive access to a device. |
FSDev_AccessUnlock() |
Release exclusive access to a device. |
|
Remove device from file system. |
|
Get number of partitions on a device. |
FSDev_Invalidate() |
Invalidate files and volumes open on a device. |
|
Perform device I/O control operation. |
|
Add device to file system. |
|
Add partition to device. |
|
Find partition on device and get information about partition. |
|
Initialize partition on device. |
|
Get device information. |
|
Read sector on device. |
|
Refresh device in file system. |
|
Write sector on device. |
Table 7-1 Device API functions