|
PebbleOS v4.47.0-1362-gd278268fe
|
Driver operations. More...
#include <disk.h>
Data Fields | |
| int(* | init )(const struct pbl_disk *disk) |
| Optional. | |
| int(* | get_info )(const struct pbl_disk *disk, struct pbl_disk_info *info) |
| Get what the disk is made of. | |
| int(* | read )(const struct pbl_disk *disk, uint32_t sector, uint32_t count, void *buf) |
Read count sectors from sector, which the class has checked against the disk. | |
| int(* | write )(const struct pbl_disk *disk, uint32_t sector, uint32_t count, const void *buf) |
| Optional for a read-only disk. | |
| int(* | sync )(const struct pbl_disk *disk) |
| Optional. | |
Driver operations.
| int(* pbl_disk_ops::get_info) (const struct pbl_disk *disk, struct pbl_disk_info *info) |
Get what the disk is made of.
Returns 0 or a negative errno.
| int(* pbl_disk_ops::init) (const struct pbl_disk *disk) |
Optional.
Bring the disk up. Returns 0 or a negative errno.
| int(* pbl_disk_ops::read) (const struct pbl_disk *disk, uint32_t sector, uint32_t count, void *buf) |
Read count sectors from sector, which the class has checked against the disk.
Returns 0 or a negative errno.
| int(* pbl_disk_ops::sync) (const struct pbl_disk *disk) |
Optional.
Store what writes left in the driver. Returns 0 or a negative errno.
| int(* pbl_disk_ops::write) (const struct pbl_disk *disk, uint32_t sector, uint32_t count, const void *buf) |
Optional for a read-only disk.
Write count sectors from sector, which the class has checked against the disk. Returns 0 or a negative errno.