Synergy Software Package User's Manual

Driver for the Interrupt Controller Unit (ICU) External pin interrupts function. More...

Data Structures

struct  icu_instance_ctrl_t
 

Functions

ssp_err_t R_ICU_ExternalIrqOpen (external_irq_ctrl_t *const p_api_ctrl, external_irq_cfg_t const *const p_cfg)
 Configure an external input pin for use with the button interface. Implements external_irq_api_t::open. More...
 
ssp_err_t R_ICU_ExternalIrqEnable (external_irq_ctrl_t *const p_api_ctrl)
 Enable external interrupt for specified channel at NVIC. Implements external_irq_api_t::enable. More...
 
ssp_err_t R_ICU_ExternalIrqDisable (external_irq_ctrl_t *const p_api_ctrl)
 Disable external interrupt for specified channel at NVIC. Implements external_irq_api_t::disable. More...
 
ssp_err_t R_ICU_ExternalIrqTriggerSet (external_irq_ctrl_t *const p_api_ctrl, external_irq_trigger_t hw_trigger)
 Set trigger value provided. Implements external_irq_api_t::triggerSet. More...
 
ssp_err_t R_ICU_ExternalIrqFilterEnable (external_irq_ctrl_t *const p_api_ctrl)
 Enable external interrupt digital filter for specified channel. Implements external_irq_api_t::filterEnable. More...
 
ssp_err_t R_ICU_ExternalIrqFilterDisable (external_irq_ctrl_t *const p_api_ctrl)
 Enable external interrupt digital filter for specified channel. Implements external_irq_api_t::filterDisable. More...
 
ssp_err_t R_ICU_ExternalIrqVersionGet (ssp_version_t *const p_version)
 Set driver version based on compile time macros. Implements external_irq_api_t::versionGet. More...
 
ssp_err_t R_ICU_ExternalIrqClose (external_irq_ctrl_t *const p_api_ctrl)
 Disable external interrupt. Implements external_irq_api_t::close. More...
 

Detailed Description

Driver for the Interrupt Controller Unit (ICU) External pin interrupts function.

Summary

Extends External IRQ Interface.

This module implements the External IRQ Interface using the external input pins in the Interrupt Controller Unit (ICU).

Function Documentation

◆ R_ICU_ExternalIrqClose()

ssp_err_t R_ICU_ExternalIrqClose ( external_irq_ctrl_t *const  p_api_ctrl)

Disable external interrupt. Implements external_irq_api_t::close.

Return values
SSP_SUCCESSSuccessful close.
SSP_ERR_ASSERTIONThe parameter p_ctrl is NULL.
SSP_ERR_NOT_OPENThe channel is not opened.

Cleanup. Disable interrupt

Disable the interrupt, and then clear the interrupt pending bits and interrupt status.

Release BSP hardware lock

◆ R_ICU_ExternalIrqDisable()

ssp_err_t R_ICU_ExternalIrqDisable ( external_irq_ctrl_t *const  p_api_ctrl)

Disable external interrupt for specified channel at NVIC. Implements external_irq_api_t::disable.

Return values
SSP_SUCCESSInterrupt disabled successfully.
SSP_ERR_ASSERTIONThe p_ctrl parameter was null.
SSP_ERR_NOT_OPENThe channel is not opened.
SSP_ERR_INTERNALRequested IRQ is not defined in this system

Disable the interrupt, and then clear the interrupt pending bits and interrupt status.

◆ R_ICU_ExternalIrqEnable()

ssp_err_t R_ICU_ExternalIrqEnable ( external_irq_ctrl_t *const  p_api_ctrl)

Enable external interrupt for specified channel at NVIC. Implements external_irq_api_t::enable.

Return values
SSP_SUCCESSInterrupt Enabled successfully.
SSP_ERR_ASSERTIONThe p_ctrl parameter was null.
SSP_ERR_NOT_OPENThe channel is not opened.
SSP_ERR_INTERNALRequested IRQ is not defined in this system

Clear the interrupt status and Pending bits, before the interrupt is enabled.

◆ R_ICU_ExternalIrqFilterDisable()

ssp_err_t R_ICU_ExternalIrqFilterDisable ( external_irq_ctrl_t *const  p_api_ctrl)

Enable external interrupt digital filter for specified channel. Implements external_irq_api_t::filterDisable.

Return values
SSP_SUCCESSExternal interrupt digital filter disabled successfully.
SSP_ERR_ASSERTIONThe p_ctrl parameter was null.
SSP_ERR_NOT_OPENThe channel is not opened.

Disable external interrupt digital filter

◆ R_ICU_ExternalIrqFilterEnable()

ssp_err_t R_ICU_ExternalIrqFilterEnable ( external_irq_ctrl_t *const  p_api_ctrl)

Enable external interrupt digital filter for specified channel. Implements external_irq_api_t::filterEnable.

Return values
SSP_SUCCESSExternal interrupt digital filter enabled successfully.
SSP_ERR_ASSERTIONThe p_ctrl parameter was null.
SSP_ERR_NOT_OPENThe channel is not opened.

Enable external interrupt digital filter

◆ R_ICU_ExternalIrqOpen()

ssp_err_t R_ICU_ExternalIrqOpen ( external_irq_ctrl_t *const  p_api_ctrl,
external_irq_cfg_t const *const  p_cfg 
)

Configure an external input pin for use with the button interface. Implements external_irq_api_t::open.

The Open function is responsible for preparing an external input pin for operation. After completion of the Open function the external input pin shall be enabled and ready to service interrupts. This function must be called once prior to calling any other external input pin API functions. Once successfully completed, the status of the selected external input pin will be set to "open". After that this function should not be called again for the same external input pin without first performing a "close" by calling R_ICU_ExternalIrqClose().

Return values
SSP_SUCCESSOpen successful.
SSP_ERR_ASSERTIONOne of the following is invalid:
  • p_ctrl or p_cfg is NULL
  • The channel requested in p_cfg is not available on the device selected in r_bsp_cfg.h.
SSP_ERR_INVALID_ARGUMENTp_cfg->p_callback is not NULL, but ISR is not enabled. ISR must be enabled to use callback function. Enable channel's overflow ISR in bsp_irq_cfg.h.
SSP_ERR_IN_USEThe channel specified has already been opened. No configurations were changed. Call the associated Close function to reconfigure the channel.
SSP_ERR_IP_CHANNEL_NOT_PRESENTRequested channel does not exist on this device.
Returns
See Common Error Codes or functions called by this function for other possible return codes. This function calls:
Note
This function is reentrant for different channels. It is not reentrant for the same channel.

Get fmi feature information for ICU.

Acquire hardware lock for this specific external IRQ channel of the ICU

Initialize control block.

Configure interrupt if enabled

Perform hardware initializations based on configuration.

Mark the control block as open

◆ R_ICU_ExternalIrqTriggerSet()

ssp_err_t R_ICU_ExternalIrqTriggerSet ( external_irq_ctrl_t *const  p_api_ctrl,
external_irq_trigger_t  hw_trigger 
)

Set trigger value provided. Implements external_irq_api_t::triggerSet.

Return values
SSP_SUCCESSPeriod value written successfully.
SSP_ERR_ASSERTIONThe p_ctrl or p_period parameter was null.
SSP_ERR_NOT_OPENThe channel is not opened.

Set trigger value provided

◆ R_ICU_ExternalIrqVersionGet()

ssp_err_t R_ICU_ExternalIrqVersionGet ( ssp_version_t *const  p_version)

Set driver version based on compile time macros. Implements external_irq_api_t::versionGet.

Return values
SSP_SUCCESSSuccessful close.
SSP_ERR_ASSERTIONThe parameter p_version is NULL.

Read the driver version