RTEMS 6.1-rc1
|
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_table * | region_table |
Region table defining size and memory for region allocations. | |
Flash device.
void(* rtems_flashdev::destroy) (rtems_flashdev *flashdev) |
Destroys the flash device.
[in] | flash | Pointer to flash device. |
int(* rtems_flashdev::erase) (rtems_flashdev *flash, uintptr_t offset, size_t count) |
Call to the device driver to erase the flash device.
[in] | flash | Pointer to flash device. |
[in] | offset | Address to erase at. |
[in] | count | Number of bytes to erase. |
0 | Successful operation. |
1 | Failed operation. |
int(* rtems_flashdev::flash_type) (rtems_flashdev *flash, rtems_flashdev_flash_type *type) |
Call to the device driver to return the flash type.
[in] | flash | The flash device. |
[out] | type | The type of flash device. |
0 | Success @retbal Other Failure |
uint32_t(* rtems_flashdev::jedec_id) (rtems_flashdev *flash) |
Call to the device driver to return the JEDEC ID.
[in] | flash | The flash device. |
JEDEC | ID. |
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.
[out] | page_count | The number of pages on the flash device. |
0 | Success. |
non-zero | Failed. |
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.
[in] | flash | The flash device |
[in] | search_index | The index of the page which info is to be returned. |
[out] | page_offset | The offset of the start of the page |
[out] | page_size | The size of the page |
0 | Success. |
non-zero | Failed. |
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.
[in] | flash | The flash device |
[in] | search_offset | The offset of the page which info is to be returned. |
[out] | page_offset | The offset of the start of the page |
[out] | page_size | The size of the page |
0 | Success. |
non-zero | Failed. |
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.
[in] | flash | Pointer to flash device. |
[in] | offset | Address to read from. |
[in] | count | Number of bytes to read. |
[out] | buffer | Buffer for data to be read into. |
0 | Successful operation. |
1 | Failed operation. |
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.
[in] | flash | Pointer to flash device. |
[in] | offset | Address to write to. |
[in] | count | Number of bytes to read. |
[in] | buffer | Buffer for data to be written from. |
0 | Successful operation. |
1 | Failed operation. |
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.
[out] | write_block_size | The minimum write size of the flash device. |
0 | Success. |
non-zero | Failed. |