RZG Flexible Software Package Documentation  Release v2.0.1

 
MHU Interface (Software Interrupt Get)

Detailed Description

Interface for Message Handling Unit (Software Interrupt Get)

Summary

The Message Handling Unit (Software Interrupt Get) interface provides a common API for MHU HAL drivers. The Message Handling Unit (Software Interrupt Get) interface supports:

Implemented by:

Data Structures

struct  mhu_ns_swint_get_callback_args_t
 
struct  mhu_ns_swint_get_cfg_t
 
struct  mhu_ns_swint_get_api_t
 
struct  mhu_ns_swint_get_instance_t
 

Typedefs

typedef void mhu_ns_swint_get_ctrl_t
 

Data Structure Documentation

◆ mhu_ns_swint_get_callback_args_t

struct mhu_ns_swint_get_callback_args_t

MHU callback parameter definition

Data Fields
void const * p_context

Placeholder for user data. Set in mhu_ns_swint_get_api_t::open function in mhu_ns_swint_get_cfg_t.

uint32_t channel Channel where the receive interrupt occurred.

◆ mhu_ns_swint_get_cfg_t

struct mhu_ns_swint_get_cfg_t

MHU configuration block

Data Fields

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_ns_swint_get_callback_args_t *p_args)
 Pointer to callback function. More...
 
void const * p_context
 

Field Documentation

◆ channel

uint32_t mhu_ns_swint_get_cfg_t::channel

Identifier recognizable by implementation.

Generic configuration

◆ p_callback

void(* mhu_ns_swint_get_cfg_t::p_callback) (mhu_ns_swint_get_callback_args_t *p_args)

Pointer to callback function.

Parameters to control software behavior

◆ p_context

void const* mhu_ns_swint_get_cfg_t::p_context

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

◆ mhu_ns_swint_get_api_t

struct mhu_ns_swint_get_api_t

Interface definition for MHU

Data Fields

fsp_err_t(* open )(mhu_ns_swint_get_ctrl_t *const p_ctrl, mhu_ns_swint_get_cfg_t const *const p_cfg)
 
fsp_err_t(* callbackSet )(mhu_ns_swint_get_ctrl_t *const p_api_ctrl, void(*p_callback)(mhu_ns_swint_get_callback_args_t *), void const *const p_context, mhu_ns_swint_get_callback_args_t *const p_callback_memory)
 
fsp_err_t(* close )(mhu_ns_swint_get_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* mhu_ns_swint_get_api_t::open) (mhu_ns_swint_get_ctrl_t *const p_ctrl, mhu_ns_swint_get_cfg_t const *const p_cfg)

Opens the MHU driver and initializes the hardware.

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

◆ callbackSet

fsp_err_t(* mhu_ns_swint_get_api_t::callbackSet) (mhu_ns_swint_get_ctrl_t *const p_api_ctrl, void(*p_callback)(mhu_ns_swint_get_callback_args_t *), void const *const p_context, mhu_ns_swint_get_callback_args_t *const p_callback_memory)

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

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

◆ close

fsp_err_t(* mhu_ns_swint_get_api_t::close) (mhu_ns_swint_get_ctrl_t *const p_ctrl)

Closes the driver and releases the MHU device.

Implemented as
Parameters
[in]p_ctrlPointer to control block set in mhu_ns_swint_get_api_t::open call.

◆ mhu_ns_swint_get_instance_t

struct mhu_ns_swint_get_instance_t

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

Data Fields
mhu_ns_swint_get_ctrl_t * p_ctrl Pointer to the control structure for this instance.
mhu_ns_swint_get_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
mhu_ns_swint_get_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ mhu_ns_swint_get_ctrl_t

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

Implemented as