PebbleOS v4.47.0-1362-gd278268fe
Loading...
Searching...
No Matches
pbl_disk_ops Struct Reference

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.
 

Detailed Description

Driver operations.

Field Documentation

◆ get_info

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.

◆ init

int(* pbl_disk_ops::init) (const struct pbl_disk *disk)

Optional.

Bring the disk up. Returns 0 or a negative errno.

◆ read

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.

◆ sync

int(* pbl_disk_ops::sync) (const struct pbl_disk *disk)

Optional.

Store what writes left in the driver. Returns 0 or a negative errno.

◆ write

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.


The documentation for this struct was generated from the following file: