RTEMS
5.0.0
|
Flash Low Level driver handlers. More...
#include <flashdisk.h>
Data Fields | |
int(* | read )(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, void *buffer, uint32_t size) |
int(* | write )(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, const void *buffer, uint32_t size) |
int(* | blank )(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, uint32_t size) |
int(* | verify )(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, const void *buffer, uint32_t size) |
int(* | erase )(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment) |
int(* | erase_device )(const struct rtems_fdisk_device_desc *dd, uint32_t device) |
Flash Low Level driver handlers.
Typically this structure is part of a table of handlers in the device which is referenced in the flash disk configuration table. The reference is kept in the driver and used all the time to manage the flash device, therefore it must always exist.
int(* rtems_fdisk_driver_handlers::blank) (const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, uint32_t size) |
Blank a segment in the device. Return an errno error number if the device cannot be read or is not blank. A segment descriptor can describe more than segment in a device if the device has repeating segments. The segment number is the device segment to access and the segment descriptor must reference the segment being requested. For example the segment number must resided in the range [base, base + count).
sd | The segment descriptor. |
device | The device to read data from. |
segment | The segment within the device to read. |
offset | The offset in the segment to checl. |
size | The amount of data to check. |
0 | No error. |
EIO | The segment is not blank. |
int(* rtems_fdisk_driver_handlers::erase) (const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment) |
Erase the segment. Return an errno error number if the segment cannot be erased. A segment descriptor can describe more than segment in a device if the device has repeating segments. The segment number is the device segment to access and the segment descriptor must reference the segment being requested.
sd | The segment descriptor. |
device | The device to erase the segment of. |
segment | The segment within the device to erase. |
0 | No error. |
EIO | The segment was not erased. |
int(* rtems_fdisk_driver_handlers::erase_device) (const struct rtems_fdisk_device_desc *dd, uint32_t device) |
Erase the device. Return an errno error number if the segment cannot be erased. A segment descriptor can describe more than segment in a device if the device has repeating segments. The segment number is the segment to access and the segment descriptor must reference the segment being requested.
sd | The segment descriptor. |
device | The device to erase. |
0 | No error. |
EIO | The device was not erased. |
int(* rtems_fdisk_driver_handlers::read) (const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, void *buffer, uint32_t size) |
Read data from the device into the buffer. Return an errno error number if the device cannot be read. A segment descriptor can describe more than one segment in a device if the device has repeating segments. The segment number is the device segment to access and the segment descriptor must reference the segment being requested. For example the segment number must resided in the range [base, base + count).
sd | The segment descriptor. |
device | The device to read data from. |
segment | The segment within the device to read. |
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_fdisk_driver_handlers::verify) (const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, const void *buffer, uint32_t size) |
Verify data in the buffer to the data in the device. Return an errno error number if the device cannot be read. A segment descriptor can describe more than segment in a device if the device has repeating segments. The segment number is the segment to access and the segment descriptor must reference the device segment being requested. For example the segment number must resided in the range [base, base + count).
sd | The segment descriptor. |
device | The device to verify data in. |
segment | The segment within the device to verify. |
offset | The offset in the segment 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_fdisk_driver_handlers::write) (const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, const void *buffer, uint32_t size) |
Write data from the buffer to the device. Return an errno error number if the device cannot be written to. A segment descriptor can describe more than segment in a device if the device has repeating segments. The segment number is the device segment to access and the segment descriptor must reference the segment being requested. For example the segment number must resided in the range [base, base + count).
sd | The segment descriptor. |
device | The device to write data from. |
segment | The segment within the device to write to. |
offset | The offset in the segment to write. |
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. |