![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Switch Matrix Module (SWM) module of MCUXpresso SDK devices.
The function SWM_SetMovablePinSelect() will selects a movable pin designated by its GPIO port and bit numbers to a function.
The function SWM_SetFixedMovablePinSelect() will selects a fixed movable pin designated by its GPIO port and bit numbers to a function.
The function SWM_SetFixedPinSelect() will enables a fixed-pin function in PINENABLE0 or PINENABLE1.
Files | |
file | fsl_swm.h |
Functions | |
void | SWM_SetMovablePinSelect (SWM_Type *base, swm_select_movable_t func, swm_port_pin_type_t swm_port_pin) |
Assignment of digital peripheral functions to pins. More... | |
void | SWM_SetFixedPinSelect (SWM_Type *base, swm_select_fixed_pin_t func, bool enable) |
Enable the fixed-pin function. More... | |
Driver version | |
#define | FSL_SWM_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
Version 2.0.1. | |
swm connections | |
enum | swm_port_pin_type_t { kSWM_PortPin_P0_0 = 0U, kSWM_PortPin_P0_1 = 1U, kSWM_PortPin_P0_2 = 2U, kSWM_PortPin_P0_3 = 3U, kSWM_PortPin_P0_4 = 4U, kSWM_PortPin_P0_5 = 5U, kSWM_PortPin_P0_6 = 6U, kSWM_PortPin_P0_7 = 7U, kSWM_PortPin_P0_8 = 8U, kSWM_PortPin_P0_9 = 9U, kSWM_PortPin_P0_10 = 10U, kSWM_PortPin_P0_11 = 11U, kSWM_PortPin_P0_12 = 12U, kSWM_PortPin_P0_13 = 13U, kSWM_PortPin_P0_14 = 14U, kSWM_PortPin_P0_15 = 15U, kSWM_PortPin_P0_16 = 16U, kSWM_PortPin_P0_17 = 16U } |
SWM port_pin number. More... | |
enum | swm_select_movable_t { kSWM_USART0_TXD = 0U, kSWM_USART0_RXD = 1U, kSWM_USART0_RTS = 2U, kSWM_USART0_CTS = 3U, kSWM_USART0_SCLK = 4U, kSWM_USART1_TXD = 5U, kSWM_USART1_RXD = 6U, kSWM_USART1_SCLK = 7U, kSWM_SPI0_SCK = 8U, kSWM_SPI0_MOSI = 9U, kSWM_SPI0_MISO = 10U, kSWM_SPI0_SSEL0 = 11U, kSWM_SPI0_SSEL1 = 12U, kSWM_T0_CAP_CHN0 = 13U, kSWM_T0_CAP_CHN1 = 14U, kSWM_T0_CAP_CHN2 = 15U, kSWM_T0_MAT_CHN0 = 16U, kSWM_T0_MAT_CHN1 = 17U, kSWM_T0_MAT_CHN2 = 18U, kSWM_T0_MAT_CHN3 = 19U, kSWM_I2C0_SDA = 20U, kSWM_I2C0_SCL = 21U, kSWM_ACMP_OUT = 22U, kSWM_CLKOUT = 23U, kSWM_GPIO_INT_BMAT = 24U, kSWM_LVLSHFT_IN0 = 25U, kSWM_LVLSHFT_IN1 = 26U, kSWM_LVLSHFT_OUT0 = 27U, kSWM_LVLSHFT_OUT1 = 28U, kSWM_MOVABLE_NUM_FUNCS = 29U } |
SWM movable selection. More... | |
enum | swm_select_fixed_pin_t { kSWM_ACMP_INPUT1 = SWM_PINENABLE0_ACMP_I1_MASK, kSWM_ACMP_INPUT2 = SWM_PINENABLE0_ACMP_I2_MASK, kSWM_ACMP_INPUT3 = SWM_PINENABLE0_ACMP_I3_MASK, kSWM_ACMP_INPUT4 = SWM_PINENABLE0_ACMP_I4_MASK, kSWM_SWCLK = SWM_PINENABLE0_SWCLK_MASK, kSWM_SWDIO = SWM_PINENABLE0_SWDIO_MASK, kSWM_RESETN = SWM_PINENABLE0_RESETN_MASK, kSWM_CLKIN = SWM_PINENABLE0_CLKIN_MASK, kSWM_WKCLKIN = SWM_PINENABLE0_WKCLKIN_MASK, kSWM_VDDCMP = SWM_PINENABLE0_VDDCMP_MASK, kSWM_ADC_CHN0 = SWM_PINENABLE0_ADC_0_MASK, kSWM_ADC_CHN1 = SWM_PINENABLE0_ADC_1_MASK, kSWM_ADC_CHN2 = SWM_PINENABLE0_ADC_2_MASK, kSWM_ADC_CHN3 = SWM_PINENABLE0_ADC_3_MASK, kSWM_ADC_CHN4 = SWM_PINENABLE0_ADC_4_MASK, kSWM_ADC_CHN5 = SWM_PINENABLE0_ADC_5_MASK, kSWM_ADC_CHN6 = SWM_PINENABLE0_ADC_6_MASK, kSWM_ADC_CHN7 = SWM_PINENABLE0_ADC_7_MASK, kSWM_ADC_CHN8 = SWM_PINENABLE0_ADC_8_MASK, kSWM_ADC_CHN9 = SWM_PINENABLE0_ADC_9_MASK, kSWM_ADC_CHN10 = SWM_PINENABLE0_ADC_10_MASK, kSWM_ADC_CHN11 = SWM_PINENABLE0_ADC_11_MASK, kSWM_FIXEDPIN_NUM_FUNCS = 0x200001U } |
SWM fixed pin selection. More... | |
enum swm_port_pin_type_t |
enum swm_select_movable_t |
void SWM_SetMovablePinSelect | ( | SWM_Type * | base, |
swm_select_movable_t | func, | ||
swm_port_pin_type_t | swm_port_pin | ||
) |
This function will selects a pin (designated by its GPIO port and bit numbers) to a function.
base | SWM peripheral base address. |
func | any function name that is movable. |
swm_port_pin | any pin which has a GPIO port number and bit number. |
void SWM_SetFixedPinSelect | ( | SWM_Type * | base, |
swm_select_fixed_pin_t | func, | ||
bool | enable | ||
) |
This function will enables a fixed-pin function in PINENABLE0 or PINENABLE1.
base | SWM peripheral base address. |
func | any function name that is fixed pin. |
enable | enable or disable. |