RTEMS
5.1
|
#include <nvdisk.h>
Data Fields | |
int(* | read )(uint32_t device, uint32_t flags, void *base, uint32_t offset, void *buffer, size_t size) |
int(* | write )(uint32_t device, uint32_t flags, void *base, uint32_t offset, const void *buffer, size_t size) |
int(* | verify )(uint32_t device, uint32_t flags, void *base, uint32_t offset, const void *buffer, size_t size) |
NV Low Level driver handlers.
Typically this structure is part of a table of handlers in the device which is referenced in the nvdisk configuration table. The reference is kept in the driver and used all the time to manage the nv device, therefore it must always exist.
int(* rtems_nvdisk_driver_handlers::read) (uint32_t device, uint32_t flags, void *base, uint32_t offset, void *buffer, size_t size) |
Read data from the device into the buffer. Return an errno error number if the data cannot be read.
device | The device to read data from. |
flags | Device specific flags for the driver. |
base | The base address of the device. |
offset | The offset in the segment to read. |
buffer | The buffer to read the data into. |
size | The amount of data to read. |
0 | No error. |
EIO | The read did not complete. |
int(* rtems_nvdisk_driver_handlers::verify) (uint32_t device, uint32_t flags, void *base, uint32_t offset, const void *buffer, size_t size) |
Verify data in the buffer to the data in the device. Return an errno error number if the device cannot be read or the data verified.
device | The device to verify the data with. |
flags | Device specific flags for the driver. |
base | The base address of the device. |
offset | The offset in the device to verify. |
buffer | The buffer to verify the data in the device with. |
size | The amount of data to verify. |
0 | No error. |
EIO | The data did not verify. |
int(* rtems_nvdisk_driver_handlers::write) (uint32_t device, uint32_t flags, void *base, uint32_t offset, const void *buffer, size_t size) |
Write data from the buffer to the device. Return an errno error number if the device cannot be written to.
device | The device to write data to. |
flags | Device specific flags for the driver. |
base | The base address of the device. |
offset | The offset in the device to write to. |
buffer | The buffer to write the data from. |
size | The amount of data to write. |
0 | No error. |
EIO | The write did not complete or verify. |