The MCUXpresso SDK provides a driver for the Port Control and Interrupts (PORT) module of MCUXpresso SDK devices.
|
enum | _port_pull {
kPORT_PullDisable = 0U,
kPORT_PullDown = 2U,
kPORT_PullUp = 3U
} |
| Internal resistor pull feature selection. More...
|
|
enum | _port_pull_value {
kPORT_LowPullResistor = 0U,
kPORT_HighPullResistor = 1U
} |
| Internal resistor pull value selection. More...
|
|
enum | _port_slew_rate {
kPORT_FastSlewRate = 0U,
kPORT_SlowSlewRate = 1U
} |
| Slew rate selection. More...
|
|
enum | _port_open_drain_enable {
kPORT_OpenDrainDisable = 0U,
kPORT_OpenDrainEnable = 1U
} |
| Open Drain feature enable/disable. More...
|
|
enum | _port_passive_filter_enable {
kPORT_PassiveFilterDisable = 0U,
kPORT_PassiveFilterEnable = 1U
} |
| Passive filter feature enable/disable. More...
|
|
enum | _port_drive_strength {
kPORT_LowDriveStrength = 0U,
kPORT_HighDriveStrength = 1U
} |
| Configures the drive strength. More...
|
|
enum | _port_drive_strength1 {
kPORT_NormalDriveStrength = 0,
kPORT_DoubleDriveStrength = 1
} |
| Configures the drive strength1. More...
|
|
enum | _port_lock_register {
kPORT_UnlockRegister = 0U,
kPORT_LockRegister = 1U
} |
| Unlock/lock the pin control register field[15:0]. More...
|
|
enum | port_mux_t {
kPORT_PinDisabledOrAnalog = 0U,
kPORT_MuxAsGpio = 1U,
kPORT_MuxAlt2 = 2U,
kPORT_MuxAlt3 = 3U,
kPORT_MuxAlt4 = 4U,
kPORT_MuxAlt5 = 5U,
kPORT_MuxAlt6 = 6U,
kPORT_MuxAlt7 = 7U,
kPORT_MuxAlt8 = 8U,
kPORT_MuxAlt9 = 9U,
kPORT_MuxAlt10 = 10U,
kPORT_MuxAlt11 = 11U,
kPORT_MuxAlt12 = 12U,
kPORT_MuxAlt13 = 13U,
kPORT_MuxAlt14 = 14U,
kPORT_MuxAlt15 = 15U
} |
| Pin mux selection. More...
|
|
enum | port_voltage_range_t {
kPORT_VoltageRange1Dot71V_3Dot6V = 0x0U,
kPORT_VoltageRange2Dot70V_3Dot6V = 0x1U
} |
| PORT voltage range. More...
|
|
struct port_version_info_t |
uint16_t port_version_info_t::feature |
uint8_t port_version_info_t::minor |
uint8_t port_version_info_t::major |
Enumerator |
---|
kPORT_PullDisable |
Internal pull-up/down resistor is disabled.
|
kPORT_PullDown |
Internal pull-down resistor is enabled.
|
kPORT_PullUp |
Internal pull-up resistor is enabled.
|
Enumerator |
---|
kPORT_LowPullResistor |
Low internal pull resistor value is selected.
|
kPORT_HighPullResistor |
High internal pull resistor value is selected.
|
Enumerator |
---|
kPORT_FastSlewRate |
Fast slew rate is configured.
|
kPORT_SlowSlewRate |
Slow slew rate is configured.
|
Enumerator |
---|
kPORT_OpenDrainDisable |
Open drain output is disabled.
|
kPORT_OpenDrainEnable |
Open drain output is enabled.
|
Enumerator |
---|
kPORT_PassiveFilterDisable |
Passive input filter is disabled.
|
kPORT_PassiveFilterEnable |
Passive input filter is enabled.
|
Enumerator |
---|
kPORT_LowDriveStrength |
Low-drive strength is configured.
|
kPORT_HighDriveStrength |
High-drive strength is configured.
|
Enumerator |
---|
kPORT_NormalDriveStrength |
Normal drive strength.
|
kPORT_DoubleDriveStrength |
Double drive strength.
|
Enumerator |
---|
kPORT_UnlockRegister |
Pin Control Register fields [15:0] are not locked.
|
kPORT_LockRegister |
Pin Control Register fields [15:0] are locked.
|
Enumerator |
---|
kPORT_PinDisabledOrAnalog |
Corresponding pin is disabled, but is used as an analog pin.
|
kPORT_MuxAsGpio |
Corresponding pin is configured as GPIO.
|
kPORT_MuxAlt2 |
Chip-specific.
|
kPORT_MuxAlt3 |
Chip-specific.
|
kPORT_MuxAlt4 |
Chip-specific.
|
kPORT_MuxAlt5 |
Chip-specific.
|
kPORT_MuxAlt6 |
Chip-specific.
|
kPORT_MuxAlt7 |
Chip-specific.
|
kPORT_MuxAlt8 |
Chip-specific.
|
kPORT_MuxAlt9 |
Chip-specific.
|
kPORT_MuxAlt10 |
Chip-specific.
|
kPORT_MuxAlt11 |
Chip-specific.
|
kPORT_MuxAlt12 |
Chip-specific.
|
kPORT_MuxAlt13 |
Chip-specific.
|
kPORT_MuxAlt14 |
Chip-specific.
|
kPORT_MuxAlt15 |
Chip-specific.
|
Enumerator |
---|
kPORT_VoltageRange1Dot71V_3Dot6V |
Port voltage range is 1.71 V - 3.6 V.
|
kPORT_VoltageRange2Dot70V_3Dot6V |
Port voltage range is 2.70 V - 3.6 V.
|
- Parameters
-
base | PORT peripheral base pointer |
info | PORT version information |
- Note
- : PORTA_CONFIG[RANGE] controls the voltage ranges of Port A, B, and C. Read or write PORTB_CONFIG[RANGE] and PORTC_CONFIG[RANGE] does not take effect.
- Parameters
-
base | PORT peripheral base pointer |
range | port voltage range |
static void PORT_SetPinConfig |
( |
PORT_Type * |
base, |
|
|
uint32_t |
pin, |
|
|
const port_pin_config_t * |
config |
|
) |
| |
|
inlinestatic |
This is an example to define an input pin or output pin PCR configuration.
*
* kPORT_UnLockRegister,
* };
*
- Parameters
-
base | PORT peripheral base pointer. |
pin | PORT pin number. |
config | PORT PCR register configuration structure. |
static void PORT_SetMultiplePinsConfig |
( |
PORT_Type * |
base, |
|
|
uint32_t |
mask, |
|
|
const port_pin_config_t * |
config |
|
) |
| |
|
inlinestatic |
This is an example to define input pins or output pins PCR configuration.
* Define a digital input pin PCR configuration
* kPORT_PullEnable,
* };
*
- Parameters
-
base | PORT peripheral base pointer. |
mask | PORT pin number macro. |
config | PORT PCR register configuration structure. |
static void PORT_SetPinMux |
( |
PORT_Type * |
base, |
|
|
uint32_t |
pin, |
|
|
port_mux_t |
mux |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer. |
pin | PORT pin number. |
mux | pin muxing slot selection.
|
- Note
- : This function is NOT recommended to use together with the PORT_SetPinsConfig, because the PORT_SetPinsConfig need to configure the pin mux anyway (Otherwise the pin mux is reset to zero : kPORT_PinDisabledOrAnalog). This function is recommended to use to reset the pin mux
static void PORT_SetPinDriveStrength |
( |
PORT_Type * |
base, |
|
|
uint32_t |
pin, |
|
|
uint8_t |
strength |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer. |
pin | PORT pin number. |
strength | PORT pin drive strength
|
static void PORT_EnablePinDoubleDriveStrength |
( |
PORT_Type * |
base, |
|
|
uint32_t |
pin, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer. |
pin | PORT pin number. |
enable | PORT pin drive strength configuration. |
static void PORT_SetPinPullValue |
( |
PORT_Type * |
base, |
|
|
uint32_t |
pin, |
|
|
uint8_t |
value |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer. |
pin | PORT pin number. |
value | PORT pin pull value
|
static uint32_t PORT_GetEFTDetectFlags |
( |
PORT_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer |
- Returns
- EFT detect flags
static void PORT_EnableEFTDetectInterrupts |
( |
PORT_Type * |
base, |
|
|
uint32_t |
interrupt |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer |
interrupt | EFT detect interrupt |
static void PORT_DisableEFTDetectInterrupts |
( |
PORT_Type * |
base, |
|
|
uint32_t |
interrupt |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer |
interrupt | EFT detect interrupt |
static void PORT_ClearAllLowEFTDetectors |
( |
PORT_Type * |
base | ) |
|
|
inlinestatic |
- Note
- : Port B and Port C pins share the same EFT detector clear control from PORTC_EDCR register. Any write to the PORTB_EDCR does not take effect.
- Parameters
-
base | PORT peripheral base pointer |
interrupt | EFT detect interrupt |
static void PORT_ClearAllHighEFTDetectors |
( |
PORT_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | PORT peripheral base pointer |
interrupt | EFT detect interrupt |