RZT Flexible Software Package Documentation
Release v2.2.0
|
|
Interface for the ERROR event handling.
Defines the API and data structures for the ERROR event handling implementation of the ERROR interface.
The ERROR API provides an interface for error event handling.
Data Structures | |
struct | error_callback_args_t |
struct | error_cfg_t |
struct | error_api_t |
struct | error_instance_t |
Typedefs | |
typedef void | error_ctrl_t |
Enumerations | |
enum | error_event_t |
struct error_callback_args_t |
Callback function parameter data.
Data Fields | ||
---|---|---|
void const * | p_context |
Placeholder for user data. Set in error_api_t::open function in error_cfg_t. |
error_event_t | error_event |
The event can be used to identify what error event caused the callback. |
uint32_t | error_status |
Error status. This value is from an error event status register that depends on each device product and error event source. A dedicated enum is defined on the instance side. Please refer to each driver implementation for details. |
struct error_cfg_t |
User configuration structure, used in the open function.
Data Fields | |
void(* | p_callback )(error_callback_args_t *p_args) |
void const * | p_context |
void const * | p_extend |
ERROR event hardware dependent configuration. More... | |
void(* error_cfg_t::p_callback) (error_callback_args_t *p_args) |
Callback provided when a ERROR ISR occurs.
void const* error_cfg_t::p_context |
Placeholder for user data. Passed to the user callback in error_callback_args_t.
void const* error_cfg_t::p_extend |
ERROR event hardware dependent configuration.
Pointer to ERROR peripheral specific configuration
struct error_api_t |
ERROR API structure. ERROR functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(error_ctrl_t *const p_ctrl, error_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(error_ctrl_t *const p_ctrl) |
fsp_err_t(* | statusGet )(error_ctrl_t *const p_ctrl, uint32_t event, uint32_t *p_status) |
fsp_err_t(* | statusClear )(error_ctrl_t *const p_ctrl, uint32_t event, uint32_t status) |
fsp_err_t(* | callbackSet )(error_ctrl_t *const p_ctrl, void(*p_callback)(error_callback_args_t *), void const *const p_context, error_callback_args_t *const p_callback_memory) |
fsp_err_t(* error_api_t::open) (error_ctrl_t *const p_ctrl, error_cfg_t const *const p_cfg) |
Initial configuration.
[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(* error_api_t::close) (error_ctrl_t *const p_ctrl) |
Disable the associated interrupts.
[in] | p_ctrl | Control block set in error_api_t::open call. |
fsp_err_t(* error_api_t::statusGet) (error_ctrl_t *const p_ctrl, uint32_t event, uint32_t *p_status) |
Get the status of error events.
[in] | p_ctrl | Control block set in error_api_t::open call. |
[in] | event | Select error event. |
[out] | p_status | Collection of error status. |
fsp_err_t(* error_api_t::statusClear) (error_ctrl_t *const p_ctrl, uint32_t event, uint32_t status) |
Clear the status of error events.
[in] | p_ctrl | Control block set in error_api_t::open call. |
[in] | event | Select error event. |
[in] | status | Status information to be cleared. |
fsp_err_t(* error_api_t::callbackSet) (error_ctrl_t *const p_ctrl, void(*p_callback)(error_callback_args_t *), void const *const p_context, error_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 error_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. |
struct error_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
error_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
error_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
error_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void error_ctrl_t |
ERROR control block. Allocate an instance specific control block to pass into the ERROR API calls.
enum error_event_t |
Error event source.