MCUXpresso SDK API Reference Manual  Rev 2.12.1
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

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/trgmux

Enumerations

enum  { 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, 1))
 TRGMUX driver version. 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, 1))

Enumeration Type Documentation

anonymous enum
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.