Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
intc_renesas_rx_icum_grp_irq.h File Reference

Renesas RX group interrupt controller driver API. More...

#include <stdbool.h>
#include <stdint.h>
#include <zephyr/device.h>

Go to the source code of this file.

Functions

int rx_icum_grp_irq_enable (const struct device *dev, uint8_t factor)
 Enable a group interrupt factor.
int rx_icum_grp_irq_disable (const struct device *dev, uint8_t factor)
 Disable a group interrupt factor.
int rx_icum_grp_irq_callback_set (const struct device *dev, uint8_t factor, void(*callback)(void), void *context)
 Set the callback of a group interrupt factor.
int rx_icum_grp_irq_gen_set (const struct device *dev, uint8_t factor, bool set)
 Set or clear the GEN bit of a group interrupt factor.

Detailed Description

Renesas RX group interrupt controller driver API.

Function Documentation

◆ rx_icum_grp_irq_callback_set()

int rx_icum_grp_irq_callback_set ( const struct device * dev,
uint8_t factor,
void(* callback )(void),
void * context )

Set the callback of a group interrupt factor.

Must be called before rx_icum_grp_irq_enable() or rx_icum_grp_irq_gen_set().

Parameters
devGroup interrupt controller device.
factorInterrupt factor (bit position in the group), 0 to 31.
callbackFunction called when the factor triggers.
contextUser context for the callback.
Return values
0On success.
-EINVALfactor is out of range or callback is NULL.

◆ rx_icum_grp_irq_disable()

int rx_icum_grp_irq_disable ( const struct device * dev,
uint8_t factor )

Disable a group interrupt factor.

Clears the factor's enable bit in the group interrupt request enable register (GENxx). The group interrupt vector is disabled in the ICU only when no other factor of the group is enabled.

Parameters
devGroup interrupt controller device.
factorInterrupt factor (bit position in the group), 0 to 31.
Return values
0On success.
-EINVALfactor is out of range.

◆ rx_icum_grp_irq_enable()

int rx_icum_grp_irq_enable ( const struct device * dev,
uint8_t factor )

Enable a group interrupt factor.

Sets the factor's enable bit in the group interrupt request enable register (GENxx) and enables the group interrupt vector in the ICU. The callback of the factor must be registered with rx_icum_grp_irq_callback_set() first.

Parameters
devGroup interrupt controller device.
factorInterrupt factor (bit position in the group), 0 to 31.
Return values
0On success.
-EINVALfactor is out of range or no callback is set for factor.

◆ rx_icum_grp_irq_gen_set()

int rx_icum_grp_irq_gen_set ( const struct device * dev,
uint8_t factor,
bool set )

Set or clear the GEN bit of a group interrupt factor.

Only the factor's GEN bit is written: the group vector is not enabled or disabled and a pending status is not cleared. The callback must be set with rx_icum_grp_irq_callback_set() first.

Parameters
devGroup interrupt controller device.
factorInterrupt factor (bit position in the group), 0 to 31.
settrue to set the GEN bit, false to clear it.
Return values
0On success.
-EINVALfactor is out of range, or set is true and no callback is set for factor.