RA Flexible Software Package Documentation
Release v5.7.0
|
|
Interface for Communications Middleware functions.
The Communications interface provides multiple communications functionality.
Data Structures | |
struct | rm_comms_write_read_params_t |
struct | rm_comms_callback_args_t |
struct | rm_comms_cfg_t |
struct | rm_comms_api_t |
struct | rm_comms_instance_t |
Typedefs | |
typedef void | rm_comms_ctrl_t |
Enumerations | |
enum | rm_comms_event_t |
struct rm_comms_write_read_params_t |
Struct to pack params for writeRead
struct rm_comms_callback_args_t |
Communications middleware callback parameter definition
struct rm_comms_cfg_t |
Communications middleware configuration block
Data Fields | |
uint32_t | semaphore_timeout |
Timeout for read/write. | |
void const * | p_extend |
Pointer to extended configuration by instance of interface. | |
void const * | p_lower_level_cfg |
Pointer to lower level driver configuration structure. | |
void const * | p_context |
Pointer to the user-provided context. | |
void(* | p_callback )(rm_comms_callback_args_t *p_args) |
Pointer to callback function, mostly used if using non-blocking functionality. | |
struct rm_comms_api_t |
COMM APIs
Data Fields | |
fsp_err_t(* | open )(rm_comms_ctrl_t *const p_ctrl, rm_comms_cfg_t const *const p_cfg) |
fsp_err_t(* | close )(rm_comms_ctrl_t *const p_ctrl) |
fsp_err_t(* | read )(rm_comms_ctrl_t *const p_ctrl, uint8_t *const p_dest, uint32_t const bytes) |
fsp_err_t(* | write )(rm_comms_ctrl_t *const p_ctrl, uint8_t *const p_src, uint32_t const bytes) |
fsp_err_t(* | writeRead )(rm_comms_ctrl_t *const p_ctrl, rm_comms_write_read_params_t write_read_params) |
fsp_err_t(* | callbackSet )(rm_comms_ctrl_t *const p_ctrl, void(*p_callback)(rm_comms_callback_args_t *), void const *const p_context) |
fsp_err_t(* rm_comms_api_t::open) (rm_comms_ctrl_t *const p_ctrl, rm_comms_cfg_t const *const p_cfg) |
Open driver.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* rm_comms_api_t::close) (rm_comms_ctrl_t *const p_ctrl) |
Close driver.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_comms_api_t::read) (rm_comms_ctrl_t *const p_ctrl, uint8_t *const p_dest, uint32_t const bytes) |
Read data.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_dest | Pointer to the location to store read data. |
[in] | bytes | Number of bytes to read. |
fsp_err_t(* rm_comms_api_t::write) (rm_comms_ctrl_t *const p_ctrl, uint8_t *const p_src, uint32_t const bytes) |
Write data.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_src | Pointer to the location to get write data from. |
[in] | bytes | Number of bytes to write. |
fsp_err_t(* rm_comms_api_t::writeRead) (rm_comms_ctrl_t *const p_ctrl, rm_comms_write_read_params_t write_read_params) |
Write bytes over comms followed by a read, will have a struct for params.
[in] | p_ctrl | Pointer to control structure. |
[in] | write_read_params | Parameters structure. |
fsp_err_t(* rm_comms_api_t::callbackSet) (rm_comms_ctrl_t *const p_ctrl, void(*p_callback)(rm_comms_callback_args_t *), void const *const p_context) |
Specify callback function and optional context pointer.
[in] | p_ctrl | Pointer to the control block. |
[in] | p_callback | Callback function |
[in] | p_context | Pointer to send to callback function |
struct rm_comms_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
typedef void rm_comms_ctrl_t |
Communications control block. Allocate an instance specific control block to pass into the Communications API calls.
enum rm_comms_event_t |
Event in the callback function