RA Flexible Software Package Documentation
Release v5.7.0
|
|
Interface for the Data Operation Circuit.
Defines the API and data structures for the DOC implementation of the Data Operation Circuit (DOC) interface.
This module implements the DOC_API using the Data Operation Circuit (DOC).
Data Structures | |
struct | doc_callback_args_t |
struct | doc_cfg_t |
struct | doc_api_t |
struct | doc_instance_t |
Typedefs | |
typedef void | doc_ctrl_t |
Enumerations | |
enum | doc_event_t |
enum | doc_bit_width_t |
struct doc_callback_args_t |
Callback function parameter data.
Data Fields | ||
---|---|---|
void const * | p_context |
Set in doc_api_t::open function in doc_cfg_t. Placeholder for user data. |
struct doc_cfg_t |
User configuration structure, used in the open function.
Data Fields | |
doc_event_t | event |
Select enumerated value from doc_event_t. | |
doc_bit_width_t | bit_width |
The bit width of operations. | |
uint32_t | doc_data |
uint32_t | doc_data_extra |
uint8_t | ipl |
DOC interrupt priority. | |
IRQn_Type | irq |
Interrupt number assigned to this instance. | |
void(* | p_callback )(doc_callback_args_t *p_args) |
void const * | p_context |
uint32_t doc_cfg_t::doc_data |
Initial/Reference data for addition, subtraction, and comparison operations.
uint32_t doc_cfg_t::doc_data_extra |
Additional reference data for use in Window Comparison operations.
void(* doc_cfg_t::p_callback) (doc_callback_args_t *p_args) |
Callback provided when a DOC ISR occurs.
void const* doc_cfg_t::p_context |
Placeholder for user data. Passed to the user callback in doc_callback_args_t.
struct doc_api_t |
Data Operation Circuit (DOC) API structure. DOC functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(doc_ctrl_t *const p_ctrl, doc_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(doc_ctrl_t *const p_ctrl) |
fsp_err_t(* | read )(doc_ctrl_t *const p_ctrl, uint32_t *p_result) |
fsp_err_t(* | write )(doc_ctrl_t *const p_ctrl, uint32_t data) |
fsp_err_t(* | callbackSet )(doc_ctrl_t *const p_ctrl, void(*p_callback)(doc_callback_args_t *), void const *const p_context, doc_callback_args_t *const p_callback_memory) |
fsp_err_t(* doc_api_t::open) (doc_ctrl_t *const p_ctrl, doc_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(* doc_api_t::close) (doc_ctrl_t *const p_ctrl) |
Allow the driver to be reconfigured. Will reduce power consumption.
[in] | p_ctrl | Control block set in doc_api_t::open call. |
fsp_err_t(* doc_api_t::read) (doc_ctrl_t *const p_ctrl, uint32_t *p_result) |
Gets the result of addition/subtraction operations and stores it in the provided pointer p_result.
[in] | p_ctrl | Control block set in doc_api_t::open call. |
[in] | p_result | The result of the DOC operation. |
fsp_err_t(* doc_api_t::write) (doc_ctrl_t *const p_ctrl, uint32_t data) |
Write to the DODIR register.
[in] | p_ctrl | Control block set in doc_api_t::open call. |
[in] | data | data to be written to DOC DODIR register. |
fsp_err_t(* doc_api_t::callbackSet) (doc_ctrl_t *const p_ctrl, void(*p_callback)(doc_callback_args_t *), void const *const p_context, doc_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Pointer to the DOC control block. |
[in] | p_callback | Callback function |
[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 doc_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
doc_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
doc_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
doc_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void doc_ctrl_t |
DOC control block. Allocate an instance specific control block to pass into the DOC API calls.
enum doc_event_t |
Event that can trigger a callback function.
enum doc_bit_width_t |