| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
Public API for FLASH drivers. More...
#include <errno.h>#include <zephyr/types.h>#include <stddef.h>#include <sys/types.h>#include <zephyr/device.h>#include <syscalls/flash.h>Go to the source code of this file.
Data Structures | |
| struct | flash_pages_layout | 
| struct | flash_parameters | 
| struct | flash_driver_api | 
| struct | flash_pages_info | 
Macros | |
| #define | FLASH_EX_OP_VENDOR_BASE 0x8000 | 
| #define | FLASH_EX_OP_IS_VENDOR(c) ((c) & FLASH_EX_OP_VENDOR_BASE) | 
Typedefs | |
| 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.  More... | |
| typedef int(* | flash_api_erase) (const struct device *dev, off_t offset, size_t size) | 
| Flash erase implementation handler type.  More... | |
| 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.  More... | |
| 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.  More... | |
Functions | |
| int | flash_read (const struct device *dev, off_t offset, void *data, size_t len) | 
| Read data from flash.  More... | |
| int | flash_write (const struct device *dev, off_t offset, const void *data, size_t len) | 
| Write buffer into flash memory.  More... | |
| int | flash_erase (const struct device *dev, off_t offset, size_t size) | 
| Erase part or all of a flash memory.  More... | |
| 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.  More... | |
| 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.  More... | |
| size_t | flash_get_page_count (const struct device *dev) | 
| Get the total number of flash pages.  More... | |
| void | flash_page_foreach (const struct device *dev, flash_page_cb cb, void *data) | 
| Iterate over all flash pages on a device.  More... | |
| int | flash_sfdp_read (const struct device *dev, off_t offset, void *data, size_t len) | 
| Read data from Serial Flash Discoverable Parameters.  More... | |
| int | flash_read_jedec_id (const struct device *dev, uint8_t *id) | 
| Read the JEDEC ID from a compatible flash device.  More... | |
| size_t | flash_get_write_block_size (const struct device *dev) | 
| Get the minimum write block size supported by the driver.  More... | |
| const struct flash_parameters * | flash_get_parameters (const struct device *dev) | 
| Get pointer to flash_parameters structure.  More... | |
| int | flash_ex_op (const struct device *dev, uint16_t code, const uintptr_t in, void *out) | 
| Execute flash extended operation on given device.  More... | |
Public API for FLASH drivers.