RTEMS  5.0.0
Data Fields
rtems_fdisk_driver_handlers Struct Reference

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)
 

Detailed Description

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.

Field Documentation

◆ blank

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).

Parameters
sdThe segment descriptor.
deviceThe device to read data from.
segmentThe segment within the device to read.
offsetThe offset in the segment to checl.
sizeThe amount of data to check.
Return values
0No error.
EIOThe segment is not blank.

◆ erase

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.

Parameters
sdThe segment descriptor.
deviceThe device to erase the segment of.
segmentThe segment within the device to erase.
Return values
0No error.
EIOThe segment was not erased.

◆ erase_device

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.

Parameters
sdThe segment descriptor.
deviceThe device to erase.
Return values
0No error.
EIOThe device was not erased.

◆ read

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).

Parameters
sdThe segment descriptor.
deviceThe device to read data from.
segmentThe segment within the device to read.
offsetThe offset in the segment to read.
bufferThe buffer to read the data into.
sizeThe amount of data to read.
Return values
0No error.
EIOThe read did not complete.

◆ verify

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).

Parameters
sdThe segment descriptor.
deviceThe device to verify data in.
segmentThe segment within the device to verify.
offsetThe offset in the segment to verify.
bufferThe buffer to verify the data in the device with.
sizeThe amount of data to verify.
Return values
0No error.
EIOThe data did not verify.

◆ write

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).

Parameters
sdThe segment descriptor.
deviceThe device to write data from.
segmentThe segment within the device to write to.
offsetThe offset in the segment to write.
bufferThe buffer to write the data from.
sizeThe amount of data to write.
Return values
0No error.
EIOThe write did not complete or verify.

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