RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for Virtual EEPROM access.
The Virtual EEPROM Port configures a fail-safe key value store designed for microcontrollers on top of a lower level storage device.
Data Structures | |
struct | rm_vee_callback_args_t |
struct | rm_vee_cfg_t |
struct | rm_vee_api_t |
struct | rm_vee_instance_t |
Typedefs | |
typedef void | rm_vee_ctrl_t |
Enumerations | |
enum | rm_vee_state_t |
struct rm_vee_callback_args_t |
User configuration structure, used in open function
Data Fields | ||
---|---|---|
rm_vee_state_t | state | State of the Virtual EEPROM. |
void const * | p_context | Placeholder for user data. Set in rm_vee_api_t::open function in::rm_vee_cfg_t. |
struct rm_vee_cfg_t |
User configuration structure, used in open function
Data Fields | |
uint32_t | start_addr |
Start address to be used for Virtual EEPROM memory. | |
uint32_t | num_segments |
Number of segments to divide the volume into. | |
uint32_t | total_size |
Total size of the volume. | |
uint32_t | ref_data_size |
Size of the reference data stored at the end of the segment. | |
uint32_t | record_max_id |
Maximum record ID that can be used. | |
uint16_t * | rec_offset |
Pointer to buffer used for record offset caching. | |
void(* | p_callback )(rm_vee_callback_args_t *p_args) |
Callback provided when a Virtual EEPROM event occurs. | |
void const * | p_context |
Placeholder for user data. | |
void const * | p_extend |
Pointer to hardware dependent configuration. | |
struct rm_vee_api_t |
Virtual EEPROM interface API.
Data Fields | |
fsp_err_t(* | open )(rm_vee_ctrl_t *const p_ctrl, rm_vee_cfg_t const *const p_cfg) |
fsp_err_t(* | recordWrite )(rm_vee_ctrl_t *const p_ctrl, uint32_t const rec_id, uint8_t const *const p_rec_data, uint32_t num_bytes) |
fsp_err_t(* | recordPtrGet )(rm_vee_ctrl_t *const p_ctrl, uint32_t rec_id, uint8_t **const pp_rec_data, uint32_t *const p_num_bytes) |
fsp_err_t(* | refDataWrite )(rm_vee_ctrl_t *const p_ctrl, uint8_t const *const p_ref_data) |
fsp_err_t(* | refDataPtrGet )(rm_vee_ctrl_t *const p_ctrl, uint8_t **const pp_ref_data) |
fsp_err_t(* | statusGet )(rm_vee_ctrl_t *const p_ctrl, rm_vee_status_t *const p_status) |
fsp_err_t(* | refresh )(rm_vee_ctrl_t *const p_ctrl) |
fsp_err_t(* | format )(rm_vee_ctrl_t *const p_ctrl, uint8_t const *const p_ref_data) |
fsp_err_t(* | callbackSet )(rm_vee_ctrl_t *const p_ctrl, void(*p_callback)(rm_vee_callback_args_t *), void const *const p_context, rm_vee_callback_args_t *const p_callback_memory) |
fsp_err_t(* | close )(rm_vee_ctrl_t *const p_ctrl) |
fsp_err_t(* rm_vee_api_t::open) (rm_vee_ctrl_t *const p_ctrl, rm_vee_cfg_t const *const p_cfg) |
Initializes the driver’s internal structures and opens the Flash driver.
[in] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
fsp_err_t(* rm_vee_api_t::recordWrite) (rm_vee_ctrl_t *const p_ctrl, uint32_t const rec_id, uint8_t const *const p_rec_data, uint32_t num_bytes) |
Writes a record to data flash.
[in] | p_ctrl | Pointer to control block. |
[in] | rec_id | ID of record to write. |
[in] | p_rec_data | Pointer to record data to write. |
[in] | num_bytes | Length of data to write. |
fsp_err_t(* rm_vee_api_t::recordPtrGet) (rm_vee_ctrl_t *const p_ctrl, uint32_t rec_id, uint8_t **const pp_rec_data, uint32_t *const p_num_bytes) |
This function gets the pointer to the most recent version of a record specified by ID.
[in] | p_ctrl | Pointer to control block. |
[in] | rec_id | ID of record to locate. |
[in] | pp_rec_data | Pointer to set to the most recent version of the record. |
[in] | p_num_bytes | Variable to load with record length. |
fsp_err_t(* rm_vee_api_t::refDataWrite) (rm_vee_ctrl_t *const p_ctrl, uint8_t const *const p_ref_data) |
Writes new Reference data to the reference update area.
[in] | p_ctrl | Pointer to control block. |
[in] | p_ref_data | Pointer to data to write to the reference data update area. |
fsp_err_t(* rm_vee_api_t::refDataPtrGet) (rm_vee_ctrl_t *const p_ctrl, uint8_t **const pp_ref_data) |
Gets a pointer to the most recent reference data.
[in] | p_ctrl | Pointer to control block. |
[in] | pp_ref_data | Pointer to set to the most recent valid reference data. |
fsp_err_t(* rm_vee_api_t::statusGet) (rm_vee_ctrl_t *const p_ctrl, rm_vee_status_t *const p_status) |
Get the current status of the VEE driver.
[in] | p_ctrl | Pointer to control block. |
[in] | p_status | Pointer to store the current status of the VEE driver. |
fsp_err_t(* rm_vee_api_t::refresh) (rm_vee_ctrl_t *const p_ctrl) |
Manually start a refresh operation.
[in] | p_ctrl | Pointer to control block. |
fsp_err_t(* rm_vee_api_t::format) (rm_vee_ctrl_t *const p_ctrl, uint8_t const *const p_ref_data) |
Format the Virtual EEPROM.
[in] | p_ctrl | Pointer to control block. |
[in] | p_ref_data | Optional pointer to reference data to write during format. |
fsp_err_t(* rm_vee_api_t::callbackSet) (rm_vee_ctrl_t *const p_ctrl, void(*p_callback)(rm_vee_callback_args_t *), void const *const p_context, rm_vee_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Control block set in rm_vee_api_t::open call. |
[in] | p_callback | Callback function to register |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
fsp_err_t(* rm_vee_api_t::close) (rm_vee_ctrl_t *const p_ctrl) |
Closes the module and lower level storage device.
[in] | p_ctrl | Control block set in rm_vee_api_t::open call. |
struct rm_vee_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
rm_vee_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
rm_vee_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
rm_vee_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void rm_vee_ctrl_t |
Virtual EEPROM API control block. Allocate an instance specific control block to pass into the VEE API calls.
enum rm_vee_state_t |