Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
CHIP: LPC11xx GPIO driver for CHIP_LPC11CXX, CHIP_LPC110X, and CHIP_LPC11XXLV families
For device familes identified with CHIP definitions CHIP_LPC11CXX, CHIP_LPC110X, and CHIP_LPC11XXLV only. More...
Data Structures | |
| struct | LPC_GPIO_T |
| GPIO port register block structure. More... | |
Enumerations | |
| enum | GPIO_INT_MODE_T { GPIO_INT_ACTIVE_LOW_LEVEL = 0x0, GPIO_INT_ACTIVE_HIGH_LEVEL = 0x1, GPIO_INT_FALLING_EDGE = 0x2, GPIO_INT_RISING_EDGE = 0x3, GPIO_INT_BOTH_EDGES = 0x6 } |
GPIO interrupt mode definitions. More... | |
Functions | |
| void | Chip_GPIO_Init (LPC_GPIO_T *pGPIO) |
| Initialize GPIO block. | |
| void | Chip_GPIO_DeInit (LPC_GPIO_T *pGPIO) |
| De-Initialize GPIO block. | |
| STATIC INLINE void | Chip_GPIO_WritePortBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit, bool setting) |
| Set a GPIO port/bit state. | |
| STATIC INLINE void | Chip_GPIO_SetPinState (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin, bool setting) |
| Set a GPIO pin state via the GPIO byte register. | |
| STATIC INLINE bool | Chip_GPIO_ReadPortBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit) |
| Read a GPIO state. | |
| STATIC INLINE bool | Chip_GPIO_GetPinState (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Get a GPIO pin state via the GPIO byte register. | |
| void | Chip_GPIO_WriteDirBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit, bool setting) |
| Seta GPIO direction. | |
| STATIC INLINE void | Chip_GPIO_SetPinDIROutput (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Set GPIO direction for a single GPIO pin to an output. | |
| STATIC INLINE void | Chip_GPIO_SetPinDIRInput (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Set GPIO direction for a single GPIO pin to an input. | |
| void | Chip_GPIO_SetPinDIR (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin, bool output) |
| Set GPIO direction for a single GPIO pin. | |
| STATIC INLINE bool | Chip_GPIO_ReadDirBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit) |
| Read a GPIO direction (out or in) | |
| STATIC INLINE bool | Chip_GPIO_GetPinDIR (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Get GPIO direction for a single GPIO pin. | |
| void | Chip_GPIO_SetDir (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t bit, uint8_t out) |
| Set Direction for a GPIO port. | |
| STATIC INLINE void | Chip_GPIO_SetPortDIROutput (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinMask) |
| Set GPIO direction for a all selected GPIO pins to an output. | |
| STATIC INLINE void | Chip_GPIO_SetPortDIRInput (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinMask) |
| Set GPIO direction for a all selected GPIO pins to an input. | |
| void | Chip_GPIO_SetPortDIR (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinMask, bool outSet) |
| Set GPIO direction for a all selected GPIO pins to an input or output. | |
| STATIC INLINE uint32_t | Chip_GPIO_GetPortDIR (LPC_GPIO_T *pGPIO, uint8_t port) |
| Get GPIO direction for a all GPIO pins. | |
| STATIC INLINE void | Chip_GPIO_SetPortValue (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t value) |
| Set all GPIO raw pin states (regardless of masking) | |
| STATIC INLINE uint32_t | Chip_GPIO_GetPortValue (LPC_GPIO_T *pGPIO, uint8_t port) |
| Get all GPIO raw pin states (regardless of masking) | |
| STATIC INLINE void | Chip_GPIO_SetValue (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t bit) |
| Set a GPIO port/bit to the high state. | |
| STATIC INLINE void | Chip_GPIO_SetPortOutHigh (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pins) |
| Set selected GPIO output pins to the high state. | |
| STATIC INLINE void | Chip_GPIO_SetPinOutHigh (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Set an individual GPIO output pin to the high state. | |
| STATIC INLINE void | Chip_GPIO_ClearValue (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t bit) |
| Set a GPIO port/bit to the low state. | |
| STATIC INLINE void | Chip_GPIO_SetPortOutLow (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pins) |
| Set selected GPIO output pins to the low state. | |
| STATIC INLINE void | Chip_GPIO_SetPinOutLow (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Set an individual GPIO output pin to the low state. | |
| STATIC INLINE void | Chip_GPIO_SetPortToggle (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pins) |
| Toggle selected GPIO output pins to the opposite state. | |
| STATIC INLINE void | Chip_GPIO_SetPinToggle (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin) |
| Toggle an individual GPIO output pin to the opposite state. | |
| STATIC INLINE uint32_t | Chip_GPIO_ReadValue (LPC_GPIO_T *pGPIO, uint8_t port) |
| Read current bit states for the selected port. | |
| STATIC INLINE void | Chip_GPIO_SetPinModeEdge (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Configure the pins as edge sensitive for interrupts. | |
| STATIC INLINE void | Chip_GPIO_SetPinModeLevel (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Configure the pins as level sensitive for interrupts. | |
| STATIC INLINE uint32_t | Chip_GPIO_IsLevelEnabled (LPC_GPIO_T *pGPIO, uint8_t port) |
| Returns current GPIO edge or high level interrupt configuration for all pins for a port. | |
| STATIC INLINE void | Chip_GPIO_SetEdgeModeBoth (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Sets GPIO interrupt configuration for both edges for selected pins. | |
| STATIC INLINE void | Chip_GPIO_SetEdgeModeSingle (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Sets GPIO interrupt configuration for a single edge for selected pins. | |
| STATIC INLINE uint32_t | Chip_GPIO_GetEdgeModeDir (LPC_GPIO_T *pGPIO, uint8_t port) |
| Returns current GPIO interrupt dual or single edge configuration for all pins for a port. | |
| STATIC INLINE void | Chip_GPIO_SetModeHigh (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Sets GPIO interrupt configuration when in single edge or level mode to high edge trigger or high level. | |
| STATIC INLINE void | Chip_GPIO_SetModeLow (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Sets GPIO interrupt configuration when in single edge or level mode to low edge trigger or low level. | |
| STATIC INLINE uint32_t | Chip_GPIO_GetModeHighLow (LPC_GPIO_T *pGPIO, uint8_t port) |
| Returns current GPIO interrupt edge direction or level mode. | |
| STATIC INLINE void | Chip_GPIO_EnableInt (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Enables interrupts for selected pins on a port. | |
| STATIC INLINE void | Chip_GPIO_DisableInt (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Disables interrupts for selected pins on a port. | |
| STATIC INLINE uint32_t | Chip_GPIO_GetEnabledInts (LPC_GPIO_T *pGPIO, uint8_t port) |
| Returns current enable pin interrupts for a port. | |
| STATIC INLINE uint32_t | Chip_GPIO_GetRawInts (LPC_GPIO_T *pGPIO, uint8_t port) |
| Returns raw interrupt pending status for pin interrupts for a port. | |
| STATIC INLINE uint32_t | Chip_GPIO_GetMaskedInts (LPC_GPIO_T *pGPIO, uint8_t port) |
| Returns masked interrupt pending status for pin interrupts for a port. | |
| STATIC INLINE void | Chip_GPIO_ClearInts (LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinmask) |
| Clears pending interrupts for selected pins for a port. | |
| void | Chip_GPIO_SetupPinInt (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin, GPIO_INT_MODE_T mode) |
| Composite function for setting up a full interrupt configuration for a single pin. | |
Detailed Description
For device familes identified with CHIP definitions CHIP_LPC11CXX, CHIP_LPC110X, and CHIP_LPC11XXLV only.
Enumeration Type Documentation
| enum GPIO_INT_MODE_T |
GPIO interrupt mode definitions.
- Enumerator:
Definition at line 614 of file gpio_11xx_2.h.
Function Documentation
| STATIC INLINE void Chip_GPIO_ClearInts | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Clears pending interrupts for selected pins for a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to clear interrupts for (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 606 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_ClearValue | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | bit | ||
| ) |
Set a GPIO port/bit to the low state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number bit : Bit(s) in the port to set low
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 345 of file gpio_11xx_2.h.
| void Chip_GPIO_DeInit | ( | LPC_GPIO_T * | pGPIO ) |
De-Initialize GPIO block.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip
- Returns:
- Nothing
| STATIC INLINE void Chip_GPIO_DisableInt | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Disables interrupts for selected pins on a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to disable interrupts for (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 561 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_EnableInt | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Enables interrupts for selected pins on a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to enable interrupts for (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 549 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetEdgeModeDir | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Returns current GPIO interrupt dual or single edge configuration for all pins for a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- A bifield containing the single/dual interrupt configuration for each pin for the selected port. Bit 0 = pin 0, 1 = pin 1. For each bit, a 0 means the interrupt triggers on a single edge (use the Chip_GPIO_SetEdgeModeHigh() and Chip_GPIO_SetEdgeModeLow() functions to configure selected edge), while a 1 means the interrupt triggers on both edges. Mask with this return value to determine the edge/level configuration for each pin in a port.
Definition at line 494 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetEnabledInts | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Returns current enable pin interrupts for a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- A bifield containing the enabled pin interrupts (0..11)
Definition at line 572 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetMaskedInts | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Returns masked interrupt pending status for pin interrupts for a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- A bifield containing the masked pending interrupt states for each pin (0..11) on the port
Definition at line 594 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetModeHighLow | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Returns current GPIO interrupt edge direction or level mode.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- A bifield containing the low or high direction of the interrupt configuration for each pin for the selected port. Bit 0 = pin 0, 1 = pin 1. For each bit, a 0 means the interrupt triggers on a low level or edge, while a 1 means the interrupt triggers on a high level or edge. Mask with this return value to determine the high/low configuration for each pin in a port.
Definition at line 537 of file gpio_11xx_2.h.
| STATIC INLINE bool Chip_GPIO_GetPinDIR | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Get GPIO direction for a single GPIO pin.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : GPIO pin to get direction for
- Returns:
- true if the GPIO is an output, false if input
Definition at line 200 of file gpio_11xx_2.h.
| STATIC INLINE bool Chip_GPIO_GetPinState | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Get a GPIO pin state via the GPIO byte register.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : GPIO pin to get state for
- Returns:
- true if the GPIO is high, false if low
- Note:
- This function replaces Chip_GPIO_ReadPortBit()
Definition at line 128 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetPortDIR | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Get GPIO direction for a all GPIO pins.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- a bitfield containing the input and output states for each pin
- Note:
- For pins 0..n, a high state in a bit corresponds to an output state for the same pin, while a low state corresponds to an input state.
Definition at line 265 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetPortValue | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Get all GPIO raw pin states (regardless of masking)
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- Current (raw) state of all GPIO pins
Definition at line 288 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_GetRawInts | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Returns raw interrupt pending status for pin interrupts for a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- A bifield containing the raw pending interrupt states for each pin (0..11) on the port
Definition at line 583 of file gpio_11xx_2.h.
| void Chip_GPIO_Init | ( | LPC_GPIO_T * | pGPIO ) |
Initialize GPIO block.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip
- Returns:
- Nothing
| STATIC INLINE uint32_t Chip_GPIO_IsLevelEnabled | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Returns current GPIO edge or high level interrupt configuration for all pins for a port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number
- Returns:
- A bifield containing the edge/level interrupt configuration for each pin for the selected port. Bit 0 = pin 0, 1 = pin 1. For each bit, a 0 means the edge interrupt is configured, while a 1 means a level interrupt is configured. Mask with this return value to determine the edge/level configuration for each pin in a port.
Definition at line 453 of file gpio_11xx_2.h.
| STATIC INLINE bool Chip_GPIO_ReadDirBit | ( | LPC_GPIO_T * | pGPIO, |
| uint32_t | port, | ||
| uint8_t | bit | ||
| ) |
Read a GPIO direction (out or in)
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : GPIO port to read bit : GPIO bit to read
- Returns:
- true of the GPIO is an output, false if input
- Note:
- It is recommended to use the Chip_GPIO_GetPinDIR() function instead.
Definition at line 188 of file gpio_11xx_2.h.
| STATIC INLINE bool Chip_GPIO_ReadPortBit | ( | LPC_GPIO_T * | pGPIO, |
| uint32_t | port, | ||
| uint8_t | bit | ||
| ) |
Read a GPIO state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : GPIO port to read bit : GPIO bit to read
- Returns:
- true of the GPIO is high, false if low
- Note:
- It is recommended to use the Chip_GPIO_GetPinState() function instead.
Definition at line 115 of file gpio_11xx_2.h.
| STATIC INLINE uint32_t Chip_GPIO_ReadValue | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port | ||
| ) |
Read current bit states for the selected port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number to read
- Returns:
- Current value of GPIO port
- Note:
- The current states of the bits for the port are read, regardless of whether the GPIO port bits are input or output.
Definition at line 414 of file gpio_11xx_2.h.
| void Chip_GPIO_SetDir | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | bit, | ||
| uint8_t | out | ||
| ) |
Set Direction for a GPIO port.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port Number bit : GPIO bit to set out : Direction value, 0 = input, !0 = output
- Returns:
- None
- Note:
- Bits set to '0' are not altered. It is recommended to use the Chip_GPIO_SetPortDIR() function instead.
| STATIC INLINE void Chip_GPIO_SetEdgeModeBoth | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Sets GPIO interrupt configuration for both edges for selected pins.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to set to dual edge mode (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 465 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetEdgeModeSingle | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Sets GPIO interrupt configuration for a single edge for selected pins.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to set to single edge mode (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 477 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetModeHigh | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Sets GPIO interrupt configuration when in single edge or level mode to high edge trigger or high level.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to set to high mode (ORed value of bits 0..11)
- Returns:
- Nothing
- Note:
- Use this function to select high level or high edge interrupt mode for the selected pins on the selected port when not in dual edge mode.
Definition at line 508 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetModeLow | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Sets GPIO interrupt configuration when in single edge or level mode to low edge trigger or low level.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to set to low mode (ORed value of bits 0..11)
- Returns:
- Nothing
- Note:
- Use this function to select low level or low edge interrupt mode for the selected pins on the selected port when not in dual edge mode.
Definition at line 522 of file gpio_11xx_2.h.
| void Chip_GPIO_SetPinDIR | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin, | ||
| bool | output | ||
| ) |
Set GPIO direction for a single GPIO pin.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : GPIO pin to set direction for output : true for output, false for input
- Returns:
- Nothing
| STATIC INLINE void Chip_GPIO_SetPinDIRInput | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Set GPIO direction for a single GPIO pin to an input.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : GPIO pin to set direction on as input
- Returns:
- Nothing
Definition at line 165 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinDIROutput | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Set GPIO direction for a single GPIO pin to an output.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : GPIO pin to set direction on as output
- Returns:
- Nothing
Definition at line 153 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinModeEdge | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Configure the pins as edge sensitive for interrupts.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to set to edge mode (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 426 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinModeLevel | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinmask | ||
| ) |
Configure the pins as level sensitive for interrupts.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinmask : Pins to set to level mode (ORed value of bits 0..11)
- Returns:
- Nothing
Definition at line 438 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinOutHigh | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Set an individual GPIO output pin to the high state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : pin number (0..n) to set high
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 331 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinOutLow | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Set an individual GPIO output pin to the low state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : pin number (0..n) to set low
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 373 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinState | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin, | ||
| bool | setting | ||
| ) |
Set a GPIO pin state via the GPIO byte register.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : GPIO pin to set setting : true for high, false for low
- Returns:
- Nothing
- Note:
- This function replaces Chip_GPIO_WritePortBit()
Definition at line 102 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPinToggle | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin | ||
| ) |
Toggle an individual GPIO output pin to the opposite state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : pin number (0..n) to toggle
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 401 of file gpio_11xx_2.h.
| void Chip_GPIO_SetPortDIR | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinMask, | ||
| bool | outSet | ||
| ) |
Set GPIO direction for a all selected GPIO pins to an input or output.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinMask : GPIO pin mask to set direction on (bits 0..b for pins 0..n) outSet : Direction value, false = set as inputs, true = set as outputs
- Returns:
- Nothing
- Note:
- Sets multiple GPIO pins to the input direction, each bit's position that is high sets the corresponding pin number for that bit to an input.
| STATIC INLINE void Chip_GPIO_SetPortDIRInput | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinMask | ||
| ) |
Set GPIO direction for a all selected GPIO pins to an input.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinMask : GPIO pin mask to set direction on as input (bits 0..b for pins 0..n)
- Returns:
- Nothing
- Note:
- Sets multiple GPIO pins to the input direction, each bit's position that is high sets the corresponding pin number for that bit to an input.
Definition at line 240 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPortDIROutput | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pinMask | ||
| ) |
Set GPIO direction for a all selected GPIO pins to an output.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pinMask : GPIO pin mask to set direction on as output (bits 0..n for pins 0..n)
- Returns:
- Nothing
- Note:
- Sets multiple GPIO pins to the output direction, each bit's position that is high sets the corresponding pin number for that bit to an output.
Definition at line 226 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPortOutHigh | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pins | ||
| ) |
Set selected GPIO output pins to the high state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pins : pins (0..n) to set high
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 317 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPortOutLow | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pins | ||
| ) |
Set selected GPIO output pins to the low state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pins : pins (0..n) to set low
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 359 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPortToggle | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | pins | ||
| ) |
Toggle selected GPIO output pins to the opposite state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pins : pins (0..n) to toggle
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output.
Definition at line 387 of file gpio_11xx_2.h.
| STATIC INLINE void Chip_GPIO_SetPortValue | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | value | ||
| ) |
Set all GPIO raw pin states (regardless of masking)
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number value : Value to set all GPIO pin states (0..n) to
- Returns:
- Nothing
Definition at line 277 of file gpio_11xx_2.h.
| void Chip_GPIO_SetupPinInt | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint8_t | pin, | ||
| GPIO_INT_MODE_T | mode | ||
| ) |
Composite function for setting up a full interrupt configuration for a single pin.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number pin : Pin number (0..11) modeFlags : GPIO interrupt mode selection
- Returns:
- Nothing
| STATIC INLINE void Chip_GPIO_SetValue | ( | LPC_GPIO_T * | pGPIO, |
| uint8_t | port, | ||
| uint32_t | bit | ||
| ) |
Set a GPIO port/bit to the high state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : Port number bit : Bit(s) in the port to set high
- Returns:
- None
- Note:
- Any bit set as a '0' will not have it's state changed. This only applies to ports configured as an output. It is recommended to use the Chip_GPIO_SetPortOutHigh() function instead.
Definition at line 303 of file gpio_11xx_2.h.
| void Chip_GPIO_WriteDirBit | ( | LPC_GPIO_T * | pGPIO, |
| uint32_t | port, | ||
| uint8_t | bit, | ||
| bool | setting | ||
| ) |
Seta GPIO direction.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : GPIO port to set bit : GPIO bit to set setting : true for output, false for input
- Returns:
- Nothing
- Note:
- It is recommended to use the Chip_GPIO_SetPinDIROutput(), Chip_GPIO_SetPinDIRInput() or Chip_GPIO_SetPinDIR() functions instead of this function.
| STATIC INLINE void Chip_GPIO_WritePortBit | ( | LPC_GPIO_T * | pGPIO, |
| uint32_t | port, | ||
| uint8_t | bit, | ||
| bool | setting | ||
| ) |
Set a GPIO port/bit state.
- Parameters:
-
pGPIO : The base of GPIO peripheral on the chip port : GPIO port to set bit : GPIO bit to set setting : true for high, false for low
- Returns:
- Nothing
Definition at line 88 of file gpio_11xx_2.h.
Generated on Tue Jul 12 2022 17:17:35 by
1.7.2