All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
INTMUX: Interrupt Multiplexer Driver

## Overview

The KSDK provides a peripheral driver for the Interrupt Multiplexer (INTMUX) module of Kinetis devices.

# 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);

## Enumerations

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

## Driver version

#define | FSL_INTMUX_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
| < Version 2.0.0. More...

## Initialization and deinitialization

void | INTMUX_Init (INTMUX_Type *base)
| Initializes the 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)
| Resets an INTMUX channel. More...
static void | INTMUX_SetChannelMode (INTMUX_Type *base, uint32_t channel, intmux_channel_logic_mode_t logic)
| Sets the logic mode for an INTMUX channel. More...

## Sources

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

## Status

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

## Macro Definition Documentation

#define FSL_INTMUX_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))

## Enumeration Type Documentation

enum intmux_channel_logic_mode_t

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

## Function Documentation

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

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 default of kINTMUX_ChannelLogicOR. Finally, the NVIC vectors for all the INTMUX output channels are enabled.

Parameters

  base | INTMUX peripheral base address.

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

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_ResetChannel | ( | INTMUX_Type * | base,
|  | uint32_t | channel
| ) |  |

inlinestatic

Sets all register values in the specified channel to their reset value. This function disables 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

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

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

Parameters

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

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

inlinestatic

Parameters

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

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

inlinestatic

Parameters

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

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

inlinestatic

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.