RZ Flexible Software Package Documentation  Release v4.0.0

 
MHU Interface (for secure and non secure channels)

Detailed Description

Interface for Message Handling Unit.

Summary

The Message Handling Unit interface provides a common API for MHU HAL drivers. The Message Handling Unit interface supports:

Classes

struct  st_mhu_callback_args
 
struct  st_mhu_cfg
 
struct  st_mhu_api
 
struct  st_mhu_instance
 

Typedefs

typedef struct st_mhu_callback_args mhu_callback_args_t
 
typedef struct st_mhu_cfg mhu_cfg_t
 
typedef void mhu_ctrl_t
 
typedef struct st_mhu_api mhu_api_t
 
typedef struct st_mhu_instance mhu_instance_t
 

Enumerations

enum  mhu_send_type_t
 

Class Documentation

◆ RZV::st_mhu_callback_args

struct RZV::st_mhu_callback_args

MHU callback parameter definition

Class Members
void * p_context

Placeholder for user data. Set in mhu_api_t::open function in mhu_cfg_t.

uint32_t channel Channel where the receive interrupt occurred.
uint32_t msg 32-bit received data.

◆ RZV::st_mhu_cfg

struct RZV::st_mhu_cfg

MHU configuration block

Public Attributes

uint32_t channel
 Identifier recognizable by implementation. More...
 
uint8_t rx_ipl
 Receive interrupt priority.
 
IRQn_Type rx_irq
 Receive interrupt ID.
 
void(* p_callback )(mhu_callback_args_t *p_args)
 Pointer to callback function. More...
 
void const * p_shared_memory
 Pointer to 64-bit send/receive data buffer.
 
void * p_context
 
void const * p_extend
 Extension parameter for hardware specific settings.
 

Member Data Documentation

◆ channel

uint32_t channel

Identifier recognizable by implementation.

Generic configuration

◆ p_callback

void(* p_callback) (mhu_callback_args_t *p_args)

Pointer to callback function.

Parameters to control software behavior

◆ p_context

void* p_context

Placeholder for user data. Passed to the user callback in mhu_callback_args_t.

◆ RZV::st_mhu_api

struct RZV::st_mhu_api

Interface definition for MHU

Public Attributes

fsp_err_t(* open )(mhu_ctrl_t *const p_ctrl, mhu_cfg_t const *const p_cfg)
 
fsp_err_t(* msgSend )(mhu_ctrl_t *const p_ctrl, uint32_t const msg)
 
fsp_err_t(* callbackSet )(mhu_ctrl_t *const p_ctrl, void(*p_callback)(mhu_callback_args_t *), void *const p_context, mhu_callback_args_t *const p_callback_memory)
 
fsp_err_t(* close )(mhu_ctrl_t *const p_ctrl)
 

Member Data Documentation

◆ open

fsp_err_t(* open) (mhu_ctrl_t *const p_ctrl, mhu_cfg_t const *const p_cfg)

Opens the MHU driver and initializes the hardware.

Parameters
[in]p_ctrlPointer to control block. Must be declared by user. Elements are set here.
[in]p_cfgPointer to configuration structure.

◆ msgSend

fsp_err_t(* msgSend) (mhu_ctrl_t *const p_ctrl, uint32_t const msg)

Performs a send operation on an MHU device.

Parameters
[in]p_ctrlPointer to control block set in mhu_api_t::open call.
[in]msg32bit send data.

◆ callbackSet

fsp_err_t(* callbackSet) (mhu_ctrl_t *const p_ctrl, void(*p_callback)(mhu_callback_args_t *), void *const p_context, mhu_callback_args_t *const p_callback_memory)

Specify callback function and optional context pointer and working memory pointer.

Parameters
[in]p_ctrlControl block set in mhu_api_t::open call for this channel.
[in]p_callbackCallback function to register
[in]p_contextPointer to send to callback function
[in]p_callback_memoryPointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback.

◆ close

fsp_err_t(* close) (mhu_ctrl_t *const p_ctrl)

Closes the driver and releases the MHU device.

Parameters
[in]p_ctrlPointer to control block set in mhu_api_t::open call.

◆ RZV::st_mhu_instance

struct RZV::st_mhu_instance

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

Class Members
mhu_ctrl_t * p_ctrl Pointer to the control structure for this instance.
mhu_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
mhu_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ mhu_callback_args_t

MHU callback parameter definition Please refer to the struct st_mhu_callback_args.

◆ mhu_cfg_t

typedef struct st_mhu_cfg mhu_cfg_t

MHU configuration block Please refer to the struct st_mhu_cfg.

◆ mhu_ctrl_t

typedef void mhu_ctrl_t

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

◆ mhu_api_t

typedef struct st_mhu_api mhu_api_t

Interface definition for MHU Please refer to the struct st_mhu_api.

◆ mhu_instance_t

This structure encompasses everything that is needed to use an instance of this interface. Please refer to the struct st_mhu_instance.

Enumeration Type Documentation

◆ mhu_send_type_t

Enumerator
MHU_SEND_TYPE_MSG 

Channel for sending "message" and receiving "response".

MHU_SEND_TYPE_RSP 

Channel for sending "response" and receiving "message".