INTMUX Peripheral driver
Interrupt Multiplexer (INTMUX)
Collaboration diagram for INTMUX Peripheral driver:

## Enumerations

enum | intmux_channel_logic_mode_t { kINTMUX_ChannelLogicOR = 0x0U, kINTMUX_ChannelLogicAND }
| INTMUX channel logic mode. More...

## Initialization and deinitialization

void | INTMUX_Init (INTMUX_Type *base)
| Initializes INTMUX module. More...
void | INTMUX_Deinit (INTMUX_Type *base)
| Deinitializes an INTMUX instance for operation. More...
static void | INTMUX_ResetChannel (INTMUX_Type *base, uint32_t channel)
| Reset an INTMUX channel. More...
static void | INTMUX_SetChannelMode (INTMUX_Type *base, uint32_t channel, intmux_channel_logic_mode_t logic)
| Set the logic mode for an INTMUX channel. More...

## Sources

static void | INTMUX_EnableInterrupt (INTMUX_Type *base, uint32_t channel, IRQn_Type irq)
| Enable an interrupt source on an INTMUX channel. More...
static void | INTMUX_DisableInterrupt (INTMUX_Type *base, uint32_t channel, IRQn_Type irq)
| Disable an interrupt source on an INTMUX channel. More...

## Status

static uint32_t | INTMUX_GetChannelPendingSources (INTMUX_Type *base, uint32_t channel)
| Get INTMUX pending interrupt sources for specific channel. More...

## Usage Information

This section describes the programming interface of the INTMUX Peripheral driver. The INTMUX driver configures the INTMUX module and provides a functional interface to build an INTMUX application.

# Function groups

## INTMUX Initialization and De-initialization

This function group initializes and de-initializes the INTMUX module.

## INTMUX Operation

This function group resets and configures the INTMUX channel and gets the pending source.

# Typical use case

## Channel Configure

/* INTMUX initialization */
INTMUX_Init(INTMUX0);
/* Resets the INTMUX channel 0 */
INTMUX_ResetChannel(INTMUX0, 0);
/* Configures the INTMUX channel 0, enable INTMUX source 0, 1, OR mode. */
INTMUX_SetChannelConfig(INTMUX0, 0, 1<<0 | 1<<1, kINTMUX_ChannelLogicOR);

## Enumeration Type Documentation

enum intmux_channel_logic_mode_t

INTMUX channel logic mode.

Enumerator
kINTMUX_ChannelLogicOR | Logic OR all enabled interrupt inputs
kINTMUX_ChannelLogicAND | Logic AND all enabled interrupt inputs

## Function Documentation

void INTMUX_Deinit | ( | INTMUX_Type * | base | ) |

Deinitializes an INTMUX instance for operation.

The clock gate for the specified INTMUX is disabled, and the NVIC vectors for all channels are disabled.

Parameters

  base | INTMUX peripheral base address.

static void INTMUX_DisableInterrupt | ( | INTMUX_Type * | base,
|  | uint32_t | channel,
|  | IRQn_Type | irq
| ) |  |

inlinestatic

Disable an interrupt source on an INTMUX channel.

Parameters

  base | INTMUX peripheral base address.
  channel | Index of the INTMUX channel on which the specified interrupt will be disabled.
  irq | Interrupt number. The interrupt must be an INTMUX source.

static void INTMUX_EnableInterrupt | ( | INTMUX_Type * | base,
|  | uint32_t | channel,
|  | IRQn_Type | irq
| ) |  |

inlinestatic

Enable an interrupt source on an INTMUX channel.

Parameters

  base | INTMUX peripheral base address.
  channel | Index of the INTMUX channel on which the specified interrupt will be enabled.
  irq | Interrupt to route to the specified INTMUX channel. The interrupt must be an INTMUX source.

static uint32_t INTMUX_GetChannelPendingSources | ( | INTMUX_Type * | base,
|  | uint32_t | channel
| ) |  |

inlinestatic

Get INTMUX pending interrupt sources for specific channel.

Parameters

  base | INTMUX peripheral base address.
  channel | The INTMUX channel number.

Returns
  The mask of pending interrupt bits. Bit[n] set means intmux source n is pending.

void INTMUX_Init | ( | INTMUX_Type * | base | ) |

Initializes INTMUX module.

This function enables the clock gate for the specified INTMUX. It then resets all channels, so that no interrupt sources are routed and the logic mode is set to the default of kINTMUX_ChannelLogicOR. Finally, the NVIC vectors for all of the INTMUX output channels are enabled.

Parameters

  base | INTMUX peripheral base address.

static void INTMUX_ResetChannel | ( | INTMUX_Type * | base,
|  | uint32_t | channel
| ) |  |

inlinestatic

Reset an INTMUX channel.

Set all register values in the specified channel to their reset value. This will disable all interrupt sources for the channel.

Parameters

  base | INTMUX peripheral base address.
  channel | The INTMUX channel number.

static void INTMUX_SetChannelMode | ( | INTMUX_Type * | base,
|  | uint32_t | channel,
|  | intmux_channel_logic_mode_t | logic
| ) |  |

inlinestatic

Set the logic mode for an INTMUX channel.

INTMUX channels can be configured to use one of two logic modes that control how pending interrupt sources on the channel trigger the output interrupt.

- kINTMUX_ChannelLogicOR means any source pending will trigger the output interrupt.
- kINTMUX_ChannelLogicAND means all selected sources on the channel must be pending before the channel output interrupt will trigger.

Parameters

  base | INTMUX peripheral base address.
  channel | The INTMUX channel number.
  logic | The INTMUX channel logic mode.