RTEMS  5.0.0
Data Fields
rtems_nvdisk_driver_handlers Struct Reference

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

Detailed Description

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.

Field Documentation

◆ read

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.

Parameters
deviceThe device to read data from.
flagsDevice specific flags for the driver.
baseThe base address of the device.
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_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.

Parameters
deviceThe device to verify the data with.
flagsDevice specific flags for the driver.
baseThe base address of the device.
offsetThe offset in the device 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_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.

Parameters
deviceThe device to write data to.
flagsDevice specific flags for the driver.
baseThe base address of the device.
offsetThe offset in the device to write to.
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: