![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Macros | |
#define | FSL_PORT_FILTER_SELECT_BITMASK (0x3U) |
The IOFLT Filter selection bit mask . More... | |
Enumerations | |
enum | port_module_t { kPORT_NMI = SIM_SOPT_NMIE_MASK, kPORT_RESET = SIM_SOPT_RSTPE_MASK, kPORT_SWDE = SIM_SOPT_SWDE_MASK, kPORT_I2C0 = SIM_PINSEL_I2C0PS_MASK, kPORT_SPI0 = SIM_PINSEL_SPI0PS_MASK, kPORT_UART0 = SIM_PINSEL_UART0PS_MASK, kPORT_FTM0CH0 = SIM_PINSEL_FTM0PS0_MASK, kPORT_FTM0CH1 = SIM_PINSEL_FTM0PS1_MASK, kPORT_FTM2CH2 = SIM_PINSEL_FTM2PS2_MASK, kPORT_FTM2CH3 = SIM_PINSEL_FTM2PS3_MASK, kPORT_FTM0CLK = SIM_PINSEL_FTM0CLKPS_MASK, kPORT_FTM2CLK = SIM_PINSEL_FTM2CLKPS_MASK, kPORT_PWTCLK = (int)SIM_PINSEL_PWTCLKPS_MASK } |
Module or peripheral for port pin selection. More... | |
enum | port_type_t { kPORT_PTA = 0U, kPORT_PTB = 1U, kPORT_PTC = 2U } |
Port type. More... | |
enum | port_pin_index_t { kPORT_PinIdx0 = 0U, kPORT_PinIdx1 = 1U, kPORT_PinIdx2 = 2U, kPORT_PinIdx3 = 3U, kPORT_PinIdx4 = 4U, kPORT_PinIdx5 = 5U, kPORT_PinIdx6 = 6U, kPORT_PinIdx7 = 7U } |
Pin number, Notice this index enum has been deprecated and it will be removed in the next release. More... | |
enum | port_pin_select_t { kPORT_NMI_OTHERS = 0U, kPORT_NMI_NMIE = 1U, kPORT_RST_OTHERS = 0U, kPORT_RST_RSTPE = 1U, kPORT_SWDE_OTHERS = 0U, kPORT_SWDE_SWDE = 1U, kPORT_I2C0_SCLPTA3_SDAPTA2 = 0U, kPORT_I2C0_SCLPTB7_SDAPTB6 = 1U, kPORT_SPI0_SCKPTB2_MOSIPTB3_MISOPTB4_PCSPTB5 = 0U, kPORT_SPI0_SCKPTA6_MOSIPTA7_MISOPTB1_PCSPTB0, kPORT_UART0_RXPTB0_TXPTB1 = 0U, kPORT_UART0_RXPTA2_TXPTA3 = 1U, kPORT_FTM0_CH0_PTA0 = 0U, kPORT_FTM0_CH0_PTB2 = 1U, kPORT_FTM0_CH1_PTA1 = 0U, kPORT_FTM0_CH1_PTB3 = 1U, kPORT_FTM2_CH2_PTC2 = 0U, kPORT_FTM2_CH2_PTC4 = 1U, kPORT_FTM2_CH3_PTC3 = 0U, kPORT_FTM2_CH3_PTC5 = 1U, kPORT_FTM0CLK_TCLK1 = 0U, kPORT_FTM0CLK_TCLK2 = 1U, kPORT_FTM2CLK_TCLK1 = 0U, kPORT_FTM2CLK_TCLK2 = 1U, kPORT_PWTCLK_TCLK1 = 0U, kPORT_PWTCLK_TCLK2 = 1U } |
Pin selection. More... | |
enum | port_filter_pin_t { kPORT_FilterPTA = PORT_IOFLT_FLTA_SHIFT, kPORT_FilterPTB = PORT_IOFLT_FLTB_SHIFT, kPORT_FilterPTC = PORT_IOFLT_FLTC_SHIFT, kPORT_FilterIIC = PORT_IOFLT_FLTIIC_SHIFT, kPORT_FilterFTM0 = PORT_IOFLT_FLTFTM0_SHIFT, kPORT_FilterPWT = PORT_IOFLT_FLTPWT_SHIFT, kPORT_FilterRST = PORT_IOFLT_FLTRST_SHIFT, kPORT_FilterKBI0 = PORT_IOFLT_FLTKBI0_SHIFT, kPORT_FilterKBI1 = PORT_IOFLT_FLTKBI1_SHIFT, kPORT_FilterNMI = PORT_IOFLT_FLTNMI_SHIFT } |
The PORT pins for input glitch filter configure. More... | |
enum | port_filter_select_t { kPORT_BUSCLK_OR_NOFILTER, kPORT_FILTERDIV1 = 1U, kPORT_FILTERDIV2 = 2U, kPORT_FILTERDIV3_OR_BUSCLK = 3U } |
The Filter selection for input pins. More... | |
enum | port_highdrive_pin_t { kPORT_HighDrive_PTB5 = PORT_HDRVE_PTB5_MASK, kPORT_HighDrive_PTC1 = PORT_HDRVE_PTC1_MASK, kPORT_HighDrive_PTC5 = PORT_HDRVE_PTC5_MASK } |
Port pin for high driver enable/disable control. More... | |
Driver version | |
#define | FSL_PORT_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) |
Version 2.0.2. More... | |
Configuration | |
void | PORT_SetPinSelect (port_module_t module, port_pin_select_t pin) |
Selects pin for modules. More... | |
static void | PORT_SetFilterSelect (PORT_Type *base, port_filter_pin_t port, port_filter_select_t filter) |
Selects the glitch filter for input pins. More... | |
static void | PORT_SetFilterDIV1WidthThreshold (PORT_Type *base, uint8_t threshold) |
Sets the width threshold for glitch filter division set 1. More... | |
static void | PORT_SetFilterDIV2WidthThreshold (PORT_Type *base, uint8_t threshold) |
Sets the width threshold for glitch filter division set 2. More... | |
static void | PORT_SetFilterDIV3WidthThreshold (PORT_Type *base, uint8_t threshold) |
Sets the width threshold for glitch filter division set 3. More... | |
static void | PORT_SetPinPullUpEnable (PORT_Type *base, port_type_t port, uint8_t num, bool enable) |
Enables or disables the port pull up. More... | |
static void | PORT_SetHighDriveEnable (PORT_Type *base, port_highdrive_pin_t pin, bool enable) |
Set High drive for port pins. More... | |
#define FSL_PORT_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) |
#define FSL_PORT_FILTER_SELECT_BITMASK (0x3U) |
enum port_module_t |
enum port_type_t |
enum port_pin_index_t |
enum port_pin_select_t |
enum port_filter_pin_t |
enum port_filter_select_t |
enum port_highdrive_pin_t |
void PORT_SetPinSelect | ( | port_module_t | module, |
port_pin_select_t | pin | ||
) |
This API is used to select the port pin for the module with multiple port pin selection. For example the FTM Channel 0 can be mapped to ether PTA0 or PTB2. Select FTM channel 0 map to PTA0 port pin as:
: This API doesn't support to select specified ALT for a given port pin. The ALT feature is automatically selected by hardware according to the ALT priority: Low --—> high: Alt1, Alt2, … when peripheral modules has been enabled.
If you want to select a specified ALT for a given port pin, please add two more steps after calling PORT_SetPinSelect:
module | Modules for pin selection. For NMI/RST module are write-once attribute after reset. |
pin | Port pin selection for modules. |
|
inlinestatic |
base | PORT peripheral base pointer. |
port | PORT pin, see "port_filter_pin_t". |
filter | Filter select, see "port_filter_select_t". |
|
inlinestatic |
`
base | PORT peripheral base pointer. |
threshold | PORT glitch filter width threshold, take refer to reference manual for detail information. 0 - LPOCLK 1 - LPOCLK/2 2 - LPOCLK/4 3 - LPOCLK/8 4 - LPOCLK/16 5 - LPOCLK/32 6 - LPOCLK/64 7 - LPOCLK/128 |
|
inlinestatic |
`
base | PORT peripheral base pointer. |
threshold | PORT glitch filter width threshold, take refer to reference manual for detail information. 0 - BUSCLK/32 1 - BUSCLK/64 2 - BUSCLK/128 3 - BUSCLK/256 4 - BUSCLK/512 5 - BUSCLK/1024 6 - BUSCLK/2048 7 - BUSCLK/4096 |
|
inlinestatic |
`
base | PORT peripheral base pointer. |
threshold | PORT glitch filter width threshold, take refer to reference manual for detail information. 0 - BUSCLK/2 1 - BUSCLK/4 2 - BUSCLK/8 3 - BUSCLK/16 |
|
inlinestatic |
base | PORT peripheral base pointer. |
port | PORT type, such as PTA/PTB/PTC etc, see "port_type_t". |
num | PORT pin number, such as 0, 1, 2.... For PTC, there are only six pins from 0 ~ 5, the PTC6, PTC7 are not exists in this device. so when set PTC please don't set the 6 and 7, take refer to the reference manual. |
enable | Enable or disable the pull up feature switch. |
|
inlinestatic |
base | PORT peripheral base pointer. |
pin | PORT pin support high drive. |
enable | Enable or disable the high driver feature switch. |