GPIO pin abstraction and port abstraction for reading and writing byte-wise to GPIO ports.
More...
GPIO pin abstraction and port abstraction for reading and writing byte-wise to GPIO ports.
Here, the GPIO ports are defined as follows:
- Port 0 -> pin 0-7
- Port 1 -> pin 8-15
- Port 2 -> pin 16-23
- Port 3 -> pin 24-31
Pin direction definitions.
Enumerator |
---|
NRF_GPIO_PIN_DIR_INPUT |
Input.
|
NRF_GPIO_PIN_DIR_OUTPUT |
Output.
|
Enumerator used for selecting the pin to be pulled down or up at the time of pin configuration.
Enumerator |
---|
NRF_GPIO_PIN_NOPULL |
Pin pullup resistor disabled.
No pull.
|
NRF_GPIO_PIN_PULLDOWN |
Pin pulldown resistor enabled.
Pulldown on pin.
|
NRF_GPIO_PIN_PULLUP |
Pin pullup resistor enabled.
Pullup on pin.
|
Enumerator used for selecting the pin to sense high or low level on the pin input.
Enumerator |
---|
NRF_GPIO_PIN_NOSENSE |
Pin sense level disabled.
Disabled.
|
NRF_GPIO_PIN_SENSE_LOW |
Pin sense low level.
Wakeup on low level.
|
NRF_GPIO_PIN_SENSE_HIGH |
Pin sense high level.
Wakeup on high level.
|
Enumerator used for setting the direction of a GPIO port.
Enumerator |
---|
NRF_GPIO_PORT_DIR_OUTPUT |
Output.
|
NRF_GPIO_PORT_DIR_INPUT |
Input.
|
Enumerator used for selecting between port 0 - 3.
Enumerator |
---|
NRF_GPIO_PORT_SELECT_PORT0 |
Port 0 (GPIO pin 0-7)
|
NRF_GPIO_PORT_SELECT_PORT1 |
Port 1 (GPIO pin 8-15)
|
NRF_GPIO_PORT_SELECT_PORT2 |
Port 2 (GPIO pin 16-23)
|
NRF_GPIO_PORT_SELECT_PORT3 |
Port 3 (GPIO pin 24-31)
|