Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
flash_driver_api Struct Reference

Driver Operations Flash driver operations More...

#include <zephyr/drivers/flash.h>

Data Fields

flash_api_read read
  REQ Read data from flash.
flash_api_write write
  REQ Write buffer into flash memory.
flash_api_erase erase
  OPT Erase part or all of a flash memory.
flash_api_get_parameters get_parameters
  REQ Get pointer to flash_parameters structure.
flash_api_get_size get_size
  OPT Get device size in bytes.
flash_api_pages_layout page_layout
  REQ Retrieve a flash device's layout.
flash_api_sfdp_read sfdp_read
  OPT Read data from Serial Flash Discoverable Parameters.
flash_api_read_jedec_id read_jedec_id
  OPT Read the JEDEC ID from a compatible flash device.
flash_api_ex_op ex_op
  OPT Vendor-specific extended operations for flash drivers.

Detailed Description

Driver Operations Flash driver operations

This is the driver API structure any Flash driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ erase

flash_api_erase flash_driver_api::erase

OPT Erase part or all of a flash memory.

◆ ex_op

flash_api_ex_op flash_driver_api::ex_op

OPT Vendor-specific extended operations for flash drivers.

Attention
Available only when the following Kconfig option is enabled: CONFIG_FLASH_EX_OP_ENABLED.

◆ get_parameters

flash_api_get_parameters flash_driver_api::get_parameters

REQ Get pointer to flash_parameters structure.

◆ get_size

flash_api_get_size flash_driver_api::get_size

OPT Get device size in bytes.

◆ page_layout

flash_api_pages_layout flash_driver_api::page_layout

REQ Retrieve a flash device's layout.

Attention
Available only when the following Kconfig option is enabled: CONFIG_FLASH_PAGE_LAYOUT.

◆ read

flash_api_read flash_driver_api::read

REQ Read data from flash.

◆ read_jedec_id

flash_api_read_jedec_id flash_driver_api::read_jedec_id

OPT Read the JEDEC ID from a compatible flash device.

Attention
Available only when the following Kconfig option is enabled: CONFIG_FLASH_JESD216_API.

◆ sfdp_read

flash_api_sfdp_read flash_driver_api::sfdp_read

OPT Read data from Serial Flash Discoverable Parameters.

Attention
Available only when the following Kconfig option is enabled: CONFIG_FLASH_JESD216_API.

◆ write

flash_api_write flash_driver_api::write

REQ Write buffer into flash memory.


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