|
typedef int(* | flash_api_read) (const struct device *dev, off_t offset, void *data, size_t len) |
|
typedef int(* | flash_api_write) (const struct device *dev, off_t offset, const void *data, size_t len) |
| Flash write implementation handler type.
|
|
typedef int(* | flash_api_erase) (const struct device *dev, off_t offset, size_t size) |
| Flash erase implementation handler type.
|
|
typedef int(* | flash_api_get_size) (const struct device *dev, uint64_t *size) |
| Get device size in bytes.
|
|
typedef const struct flash_parameters *(* | flash_api_get_parameters) (const struct device *dev) |
|
typedef void(* | flash_api_pages_layout) (const struct device *dev, const struct flash_pages_layout **layout, size_t *layout_size) |
| Retrieve a flash device's layout.
|
|
typedef int(* | flash_api_sfdp_read) (const struct device *dev, off_t offset, void *data, size_t len) |
|
typedef int(* | flash_api_read_jedec_id) (const struct device *dev, uint8_t *id) |
|
typedef int(* | flash_api_ex_op) (const struct device *dev, uint16_t code, const uintptr_t in, void *out) |
|
typedef bool(* | flash_page_cb) (const struct flash_pages_info *info, void *data) |
| Callback type for iterating over flash pages present on a device.
|
|
|
static int | flash_params_get_erase_cap (const struct flash_parameters *p) |
|
int | flash_read (const struct device *dev, off_t offset, void *data, size_t len) |
| Read data from flash.
|
|
int | flash_write (const struct device *dev, off_t offset, const void *data, size_t len) |
| Write buffer into flash memory.
|
|
int | flash_erase (const struct device *dev, off_t offset, size_t size) |
| Erase part or all of a flash memory.
|
|
int | flash_get_size (const struct device *dev, uint64_t *size) |
| Get device size in bytes.
|
|
int | flash_fill (const struct device *dev, uint8_t val, off_t offset, size_t size) |
| Fill selected range of device with specified value.
|
|
int | flash_flatten (const struct device *dev, off_t offset, size_t size) |
| Erase part or all of a flash memory or level it.
|
|
int | flash_get_page_info_by_offs (const struct device *dev, off_t offset, struct flash_pages_info *info) |
| Get the size and start offset of flash page at certain flash offset.
|
|
int | flash_get_page_info_by_idx (const struct device *dev, uint32_t page_index, struct flash_pages_info *info) |
| Get the size and start offset of flash page of certain index.
|
|
size_t | flash_get_page_count (const struct device *dev) |
| Get the total number of flash pages.
|
|
void | flash_page_foreach (const struct device *dev, flash_page_cb cb, void *data) |
| Iterate over all flash pages on a device.
|
|
int | flash_sfdp_read (const struct device *dev, off_t offset, void *data, size_t len) |
| Read data from Serial Flash Discoverable Parameters.
|
|
int | flash_read_jedec_id (const struct device *dev, uint8_t *id) |
| Read the JEDEC ID from a compatible flash device.
|
|
size_t | flash_get_write_block_size (const struct device *dev) |
| Get the minimum write block size supported by the driver.
|
|
const struct flash_parameters * | flash_get_parameters (const struct device *dev) |
| Get pointer to flash_parameters structure.
|
|
int | flash_ex_op (const struct device *dev, uint16_t code, const uintptr_t in, void *out) |
| Execute flash extended operation on given device.
|
|
int | flash_copy (const struct device *src_dev, off_t src_offset, const struct device *dst_dev, off_t dst_offset, off_t size, uint8_t *buf, size_t buf_size) |
| Copy flash memory from one device to another.
|
|
Public API for FLASH drivers.