|
| file | disk.h |
| | Header file defining the disk device driver API.
|
| |
|
| enum | disk_status_t { DISK_STATUS_INIT = 0x01
, DISK_STATUS_DISK = 0x02
, DISK_STATUS_WRITABLE = 0x04
, DISK_STATUS_ERROR = 0x08
} |
| | Disk status flags. More...
|
| |
| enum | disk_ioctl_t {
DISK_IOCTL_CTRL_SYNC
, DISK_IOCTL_GET_SECTOR_COUNT
, DISK_IOCTL_GET_SECTOR_SIZE
, DISK_IOCTL_GET_BLOCK_SIZE
,
DISK_IOCTL_CTRL_TRIM
} |
| | Generic disk I/O control commands. More...
|
| |
| enum | disk_result_t {
DISK_RESULT_OK
, DISK_RESULT_IO_ERROR
, DISK_RESULT_WR_PROTECTED
, DISK_RESULT_NO_INIT
,
DISK_RESULT_INVALID_ARG
} |
| | Disk access result codes. More...
|
| |
Documentation for all the disk device drivers.
◆ disk_ioctl_t
Generic disk I/O control commands.
| Enumerator |
|---|
| DISK_IOCTL_CTRL_SYNC | Synchronize the cached writes to persistent storage.
|
| DISK_IOCTL_GET_SECTOR_COUNT | Get the sector count through the uint32_t pointed to by buff.
|
| DISK_IOCTL_GET_SECTOR_SIZE | Get the sector size through the uint16_t pointed to by buff.
|
| DISK_IOCTL_GET_BLOCK_SIZE | Get the erase block size (in sectors) through the uint32_t pointed to by buff.
|
| DISK_IOCTL_CTRL_TRIM | Trim the sector range within the uint32_t boundaries pointed to by buff.
|
Definition at line 57 of file disk.h.
◆ disk_result_t
Disk access result codes.
| Enumerator |
|---|
| DISK_RESULT_OK | Success.
|
| DISK_RESULT_IO_ERROR | Unrecoverable I/O error.
|
| DISK_RESULT_WR_PROTECTED | Write-protected medium.
|
| DISK_RESULT_NO_INIT | Device not initialized.
|
| DISK_RESULT_INVALID_ARG | Invalid argument.
|
Definition at line 66 of file disk.h.
◆ disk_status_t
Disk status flags.
| Enumerator |
|---|
| DISK_STATUS_INIT | Device initialized and ready to work.
|
| DISK_STATUS_DISK | Medium present in the drive.
|
| DISK_STATUS_WRITABLE | Writable medium.
|
| DISK_STATUS_ERROR | Device error.
|
Definition at line 49 of file disk.h.