The disk_ioctl function cntrols device specified features and miscellaneous functions other than disk read/write.
DRESULT disk_ioctl ( BYTE Drive, /* Drive number */ BYTE Command, /* Control command code */ void* Buffer /* Data transfer buffer */ );
The FatFs module uses only device independent commands described below. Any device dependent function is not used. In read-only configuration, This function is not needed.
Command | Description |
---|---|
GET_SECTOR_COUNT | Returns total sectors on the drive into the DWORD variable pointed by Buffer. |
CTRL_SYNC | Make sure that the drive has finished to write data. When the module has a write back cache, write back the dirty sector immediately. |