MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
TRGMUX: Trigger Mux Driver

Overview

The MCUXpresso SDK provides driver for the Trigger Mux (TRGMUX) module of MCUXpresso SDK devices.

Typical use case

TRGMUX_SetTriggerSource(TRGMUX0,kTRGMUX_Trgmux0Dmamux0,kTRGMUX_TriggerInput0,kTRGMUX_SourcePortPin);

Enumerations

enum  _trgmux_status { kStatus_TRGMUX_Locked = MAKE_STATUS(kStatusGroup_TRGMUX, 0) }
 TRGMUX configure status. More...
 
enum  trgmux_trigger_input_t {
  kTRGMUX_TriggerInput0 = TRGMUX_TRGCFG_SEL0_SHIFT,
  kTRGMUX_TriggerInput1 = TRGMUX_TRGCFG_SEL1_SHIFT,
  kTRGMUX_TriggerInput2 = TRGMUX_TRGCFG_SEL2_SHIFT,
  kTRGMUX_TriggerInput3 = TRGMUX_TRGCFG_SEL3_SHIFT
}
 Defines the MUX select for peripheral trigger input. More...
 

Driver version

#define FSL_TRGMUX_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 TRGMUX driver version 2.0.0. More...
 

TRGMUX Functional Operation

static void TRGMUX_LockRegister (TRGMUX_Type *base, uint32_t index)
 Sets the flag of the register which is used to mark writeable. More...
 
status_t TRGMUX_SetTriggerSource (TRGMUX_Type *base, uint32_t index, trgmux_trigger_input_t input, uint32_t trigger_src)
 Configures the trigger source of the appointed peripheral. More...
 

Macro Definition Documentation

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

Enumeration Type Documentation

Enumerator
kStatus_TRGMUX_Locked 

Configure failed for register is locked.

Enumerator
kTRGMUX_TriggerInput0 

The MUX select for peripheral trigger input 0.

kTRGMUX_TriggerInput1 

The MUX select for peripheral trigger input 1.

kTRGMUX_TriggerInput2 

The MUX select for peripheral trigger input 2.

kTRGMUX_TriggerInput3 

The MUX select for peripheral trigger input 3.

Function Documentation

static void TRGMUX_LockRegister ( TRGMUX_Type *  base,
uint32_t  index 
)
inlinestatic

The function sets the flag of the register which is used to mark writeable. Example:

TRGMUX_LockRegister(TRGMUX0,kTRGMUX_Trgmux0Dmamux0);
Parameters
baseTRGMUX peripheral base address.
indexThe index of the TRGMUX register, see the enum trgmux_device_t defined in <SOC>.h.
status_t TRGMUX_SetTriggerSource ( TRGMUX_Type *  base,
uint32_t  index,
trgmux_trigger_input_t  input,
uint32_t  trigger_src 
)

The function configures the trigger source of the appointed peripheral. Example:

TRGMUX_SetTriggerSource(TRGMUX0, kTRGMUX_Trgmux0Dmamux0, kTRGMUX_TriggerInput0, kTRGMUX_SourcePortPin);
Parameters
baseTRGMUX peripheral base address.
indexThe index of the TRGMUX register, see the enum trgmux_device_t defined in <SOC>.h.
inputThe MUX select for peripheral trigger input
trigger_srcThe trigger inputs for various peripherals. See the enum trgmux_source_t defined in <SOC>.h.
Return values
kStatus_SuccessConfigured successfully.
kStatus_TRGMUX_LockedConfiguration failed because the register is locked.