RZV Flexible Software Package Documentation  Release v3.0.0

 
Communicatons Middleware Interface

Detailed Description

Interface for Communications Middleware functions.

Summary

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
 

Data Structure Documentation

◆ rm_comms_write_read_params_t

struct rm_comms_write_read_params_t

Struct to pack params for writeRead

◆ rm_comms_callback_args_t

struct rm_comms_callback_args_t

Communications middleware callback parameter definition

◆ rm_comms_cfg_t

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.
 

◆ rm_comms_api_t

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)
 

Field Documentation

◆ open

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to configuration structure.

◆ close

fsp_err_t(* rm_comms_api_t::close) (rm_comms_ctrl_t *const p_ctrl)

Close driver.

Parameters
[in]p_ctrlPointer to control structure.

◆ read

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.

Parameters
[in]p_ctrlPointer to control structure.
[in] p_destPointer to the location to store read data.
[in] bytesNumber of bytes to read.

◆ write

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_srcPointer to the location to get write data from.
[in]bytesNumber of bytes to write.

◆ writeRead

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.

Parameters
[in]p_ctrlPointer to control structure.
[in]write_read_paramsParameters structure.

◆ callbackSet

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.

Parameters
[in]p_ctrlPointer to the control block.
[in]p_callbackCallback function
[in]p_contextPointer to send to callback function

◆ rm_comms_instance_t

struct rm_comms_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Typedef Documentation

◆ rm_comms_ctrl_t

typedef void rm_comms_ctrl_t

Communications control block. Allocate an instance specific control block to pass into the Communications API calls.

Enumeration Type Documentation

◆ rm_comms_event_t

Event in the callback function