RZT Flexible Software Package Documentation
Release v2.2.0
|
|
Interface for external nor flash communication.
The NOR Flash interface provides APIs and definitions for NOR Flash communication.
Data Structures | |
struct | nor_flash_cfg_t |
struct | nor_flash_status_t |
struct | nor_flash_api_t |
Typedefs | |
typedef void | nor_flash_ctrl_t |
Enumerations | |
enum | nor_flash_chip_select_t |
enum | nor_flash_data_bus_width_t |
struct nor_flash_cfg_t |
NOR Flash configuration
Data Fields | ||
---|---|---|
nor_flash_chip_select_t | chip_select | Select which device to use. |
nor_flash_data_bus_width_t | data_width | Select data bus width. |
void const * | p_extend | NOR Flash hardware dependent configuration. |
struct nor_flash_status_t |
struct nor_flash_api_t |
NOR Flash implementations follow this API.
Data Fields | |
fsp_err_t(* | open )(nor_flash_ctrl_t *p_ctrl, nor_flash_cfg_t const *const p_cfg) |
fsp_err_t(* | write )(nor_flash_ctrl_t *p_ctrl, uint8_t const *const p_src, uint8_t *const p_dest, uint32_t byte_count) |
fsp_err_t(* | erase )(nor_flash_ctrl_t *p_ctrl, uint8_t *const p_device_address, uint32_t byte_count) |
fsp_err_t(* | statusGet )(nor_flash_ctrl_t *p_ctrl, uint8_t *const p_device_address, nor_flash_status_t *const p_status) |
fsp_err_t(* | close )(nor_flash_ctrl_t *p_ctrl) |
fsp_err_t(* nor_flash_api_t::open) (nor_flash_ctrl_t *p_ctrl, nor_flash_cfg_t const *const p_cfg) |
Open the NOR Flash driver module.
[in] | p_ctrl | Pointer to a driver handle |
[in] | p_cfg | Pointer to a configuration structure |
fsp_err_t(* nor_flash_api_t::write) (nor_flash_ctrl_t *p_ctrl, uint8_t const *const p_src, uint8_t *const p_dest, uint32_t byte_count) |
Program data to the flash.
[in] | p_ctrl | Pointer to a driver handle |
[in] | p_src | The memory address of the data to write to the flash device |
[in] | p_dest | The location in the flash device address space to write the data to |
[in] | byte_count | The number of bytes to write |
fsp_err_t(* nor_flash_api_t::erase) (nor_flash_ctrl_t *p_ctrl, uint8_t *const p_device_address, uint32_t byte_count) |
Erase a certain number of bytes of the flash.
[in] | p_ctrl | Pointer to a driver handle |
[in] | p_device_address | The location in the flash device address space to start the erase from |
[in] | byte_count | The number of bytes to erase. Set to NOR_FLASH_ERASE_SIZE_CHIP_ERASE to erase entire chip. |
fsp_err_t(* nor_flash_api_t::statusGet) (nor_flash_ctrl_t *p_ctrl, uint8_t *const p_device_address, nor_flash_status_t *const p_status) |
Get the write or erase status of the flash.
[in] | p_ctrl | Pointer to a driver handle |
[in] | p_device_address | The location in the flash device address space to get status |
[out] | p_status | Current status of the flash device stored here. |
fsp_err_t(* nor_flash_api_t::close) (nor_flash_ctrl_t *p_ctrl) |
Close the NOR Flash driver module.
[in] | p_ctrl | Pointer to a driver handle |
typedef void nor_flash_ctrl_t |
NOR Flash control block. Allocate an instance specific control block to pass into the NOR Flash API calls.
NOR Flash chip select.