![]() |
Synergy Software Package User's Manual
|
#include <sf_memory_api.h>
Data Fields | |
| ssp_err_t(* | open )(sf_memory_ctrl_t *const p_api_ctrl, sf_memory_cfg_t const *const p_cfg) |
| ssp_err_t(* | read )(sf_memory_ctrl_t *const p_api_ctrl, uint8_t *const p_dest_address, uint32_t const memory_address, uint32_t const num_bytes) |
| ssp_err_t(* | write )(sf_memory_ctrl_t *const p_api_ctrl, uint8_t *const p_src_address, uint32_t const memory_address, uint32_t const num_bytes) |
| ssp_err_t(* | flush )(sf_memory_ctrl_t *const p_api_ctrl) |
| ssp_err_t(* | erase )(sf_memory_ctrl_t *const p_api_ctrl, uint32_t const memory_address, uint32_t const num_bytes) |
| ssp_err_t(* | infoGet )(sf_memory_ctrl_t *const p_api_ctrl, sf_memory_info_t *const p_info) |
| ssp_err_t(* | close )(sf_memory_ctrl_t *const p_api_ctrl) |
| ssp_err_t(* | versionGet )(ssp_version_t *const p_version) |
SF_MEMORY functions implemented at the Framework layer will follow this API.
| ssp_err_t(* sf_memory_api_t::close) (sf_memory_ctrl_t *const p_api_ctrl) |
Closes the module.
| [in] | p_api_ctrl | Control block set in sf_memory_api_t::open call. |
| ssp_err_t(* sf_memory_api_t::erase) (sf_memory_ctrl_t *const p_api_ctrl, uint32_t const memory_address, uint32_t const num_bytes) |
Erases the specified number of bytes from the memory device.
| [in] | p_api_ctrl | Control block set in sf_memory_api_t::open call. |
| [in] | memory_address | Address to start the erase process at. |
| [in] | num_bytes | Number of bytes of data to erase. |
| ssp_err_t(* sf_memory_api_t::flush) (sf_memory_ctrl_t *const p_api_ctrl) |
Performs any buffered pending writes. This function MUST be called by the application after the final write is called to complete any pending writes.
| [in] | p_api_ctrl | Control block set in sf_memory_api_t::open call. |
| ssp_err_t(* sf_memory_api_t::infoGet) (sf_memory_ctrl_t *const p_api_ctrl, sf_memory_info_t *const p_info) |
Returns information about the memory implementation.
| [in] | p_api_ctrl | Control block set in sf_memory_api_t::open call. |
| [out] | p_info | Pointer to information structure. All elements of this structure will be set by the function. |
| ssp_err_t(* sf_memory_api_t::open) (sf_memory_ctrl_t *const p_api_ctrl, sf_memory_cfg_t const *const p_cfg) |
Initialize Memory framework.
| [in] | p_api_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
| [in] | p_config | Pointer to configuration structure. All elements of this structure must be set by user. |
| ssp_err_t(* sf_memory_api_t::read) (sf_memory_ctrl_t *const p_api_ctrl, uint8_t *const p_dest_address, uint32_t const memory_address, uint32_t const num_bytes) |
Reads data from the specified memory device address to the location specified by the caller.
| [in] | p_api_ctrl | Control block set in sf_memory_api_t::open call. |
| [in] | p_dest_address | Destination to read the data into. |
| [in] | memory_address | Address to read the data from. |
| [in] | num_bytes | Number of bytes of data to read. |
| ssp_err_t(* sf_memory_api_t::versionGet) (ssp_version_t *const p_version) |
Gets version and stores it in provided pointer p_version.
| [out] | p_version | Code and API version used. |
| ssp_err_t(* sf_memory_api_t::write) (sf_memory_ctrl_t *const p_api_ctrl, uint8_t *const p_src_address, uint32_t const memory_address, uint32_t const num_bytes) |
Writes the specified number of data bytes to the specified device memory address.
| [in] | p_api_ctrl | Control block set in sf_memory_api_t::open call. |
| [in] | p_src_address | Address to read the data to be written. |
| [in] | memory_address | Address to write the data to. |
| [in] | num_bytes | Number of bytes of data to write. |