RTEMS 6.1-rc1
Data Fields
rtems_flashdev Struct Reference

Flash device. More...

#include <flashdev.h>

Data Fields

int(* read )(rtems_flashdev *flash, uintptr_t offset, size_t count, void *buffer)
 Call to the device driver to read the flash device. More...
 
int(* write )(rtems_flashdev *flash, uintptr_t offset, size_t count, const void *buffer)
 Call to the device driver to write to the flash device. More...
 
int(* erase )(rtems_flashdev *flash, uintptr_t offset, size_t count)
 Call to the device driver to erase the flash device. More...
 
uint32_t(* jedec_id )(rtems_flashdev *flash)
 Call to the device driver to return the JEDEC ID. More...
 
int(* flash_type )(rtems_flashdev *flash, rtems_flashdev_flash_type *type)
 Call to the device driver to return the flash type. More...
 
int(* page_info_by_offset )(rtems_flashdev *flash, off_t search_offset, off_t *page_offset, size_t *page_size)
 Call to device driver to get size and offset of page at given offset. More...
 
int(* page_info_by_index )(rtems_flashdev *flashdev, off_t search_index, off_t *page_offset, size_t *page_size)
 Call to device driver to get size and offset of page at given index. More...
 
int(* page_count )(rtems_flashdev *flashdev, int *page_count)
 Call to device driver to return the number of pages on the flash device. More...
 
int(* write_block_size )(rtems_flashdev *flashdev, size_t *write_block_size)
 Call to device driver to return the minimum write size of the flash device. More...
 
void(* destroy )(rtems_flashdev *flashdev)
 Destroys the flash device. More...
 
void * driver
 Pointer to device driver.
 
rtems_recursive_mutex mutex
 Mutex to protect the flash device access.
 
rtems_flashdev_region_tableregion_table
 Region table defining size and memory for region allocations.
 

Detailed Description

Flash device.

Field Documentation

◆ destroy

void(* rtems_flashdev::destroy) (rtems_flashdev *flashdev)

Destroys the flash device.

Parameters
[in]flashPointer to flash device.

◆ erase

int(* rtems_flashdev::erase) (rtems_flashdev *flash, uintptr_t offset, size_t count)

Call to the device driver to erase the flash device.

Parameters
[in]flashPointer to flash device.
[in]offsetAddress to erase at.
[in]countNumber of bytes to erase.
Return values
0Successful operation.
1Failed operation.

◆ flash_type

int(* rtems_flashdev::flash_type) (rtems_flashdev *flash, rtems_flashdev_flash_type *type)

Call to the device driver to return the flash type.

Parameters
[in]flashThe flash device.
[out]typeThe type of flash device.
Return values
0Success @retbal Other Failure

◆ jedec_id

uint32_t(* rtems_flashdev::jedec_id) (rtems_flashdev *flash)

Call to the device driver to return the JEDEC ID.

Parameters
[in]flashThe flash device.
Return values
JEDECID.

◆ page_count

int(* rtems_flashdev::page_count) (rtems_flashdev *flashdev, int *page_count)

Call to device driver to return the number of pages on the flash device.

Parameters
[out]page_countThe number of pages on the flash device.
Return values
0Success.
non-zeroFailed.

◆ page_info_by_index

int(* rtems_flashdev::page_info_by_index) (rtems_flashdev *flashdev, off_t search_index, off_t *page_offset, size_t *page_size)

Call to device driver to get size and offset of page at given index.

Parameters
[in]flashThe flash device
[in]search_indexThe index of the page which info is to be returned.
[out]page_offsetThe offset of the start of the page
[out]page_sizeThe size of the page
Return values
0Success.
non-zeroFailed.

◆ page_info_by_offset

int(* rtems_flashdev::page_info_by_offset) (rtems_flashdev *flash, off_t search_offset, off_t *page_offset, size_t *page_size)

Call to device driver to get size and offset of page at given offset.

Parameters
[in]flashThe flash device
[in]search_offsetThe offset of the page which info is to be returned.
[out]page_offsetThe offset of the start of the page
[out]page_sizeThe size of the page
Return values
0Success.
non-zeroFailed.

◆ read

int(* rtems_flashdev::read) (rtems_flashdev *flash, uintptr_t offset, size_t count, void *buffer)

Call to the device driver to read the flash device.

Parameters
[in]flashPointer to flash device.
[in]offsetAddress to read from.
[in]countNumber of bytes to read.
[out]bufferBuffer for data to be read into.
Return values
0Successful operation.
1Failed operation.

◆ write

int(* rtems_flashdev::write) (rtems_flashdev *flash, uintptr_t offset, size_t count, const void *buffer)

Call to the device driver to write to the flash device.

Parameters
[in]flashPointer to flash device.
[in]offsetAddress to write to.
[in]countNumber of bytes to read.
[in]bufferBuffer for data to be written from.
Return values
0Successful operation.
1Failed operation.

◆ write_block_size

int(* rtems_flashdev::write_block_size) (rtems_flashdev *flashdev, size_t *write_block_size)

Call to device driver to return the minimum write size of the flash device.

Parameters
[out]write_block_sizeThe minimum write size of the flash device.
Return values
0Success.
non-zeroFailed.

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