Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
nRF-specific GPIO Flags More...
nRF GPIO drive flags | |
nRF GPIO drive flags Standard (S) or High (H) drive modes can be applied to both pin levels, 0 or
When the pin is configured to operate in open-drain mode (wired-and), the drive mode can only be selected for the 0 level (1 is disconnected). Similarly, when the pin is configured to operate in open-source mode (wired-or), the drive mode can only be set for the 1 level (0 is disconnected). The drive flags are encoded in the 8 upper bits of gpio_dt_flags_t as follows:
| |
#define | NRF_GPIO_DRIVE_S0 (0U << 8U) |
Standard drive for '0' (default, used with GPIO_OPEN_DRAIN) | |
#define | NRF_GPIO_DRIVE_H0 (1U << 8U) |
High drive for '0' (used with GPIO_OPEN_DRAIN) | |
#define | NRF_GPIO_DRIVE_S1 (0U << 9U) |
Standard drive for '1' (default, used with GPIO_OPEN_SOURCE) | |
#define | NRF_GPIO_DRIVE_H1 (1U << 9U) |
High drive for '1' (used with GPIO_OPEN_SOURCE) | |
#define | NRF_GPIO_DRIVE_S0S1 (NRF_GPIO_DRIVE_S0 | NRF_GPIO_DRIVE_S1) |
Standard drive for '0' and '1' (default) | |
#define | NRF_GPIO_DRIVE_S0H1 (NRF_GPIO_DRIVE_S0 | NRF_GPIO_DRIVE_H1) |
Standard drive for '0' and high for '1'. | |
#define | NRF_GPIO_DRIVE_H0S1 (NRF_GPIO_DRIVE_H0 | NRF_GPIO_DRIVE_S1) |
High drive for '0' and standard for '1'. | |
#define | NRF_GPIO_DRIVE_H0H1 (NRF_GPIO_DRIVE_H0 | NRF_GPIO_DRIVE_H1) |
High drive for '0' and '1'. | |
nRF-specific GPIO Flags
#define NRF_GPIO_DRIVE_H0 (1U << 8U) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
High drive for '0' (used with GPIO_OPEN_DRAIN)
#define NRF_GPIO_DRIVE_H0H1 (NRF_GPIO_DRIVE_H0 | NRF_GPIO_DRIVE_H1) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
High drive for '0' and '1'.
#define NRF_GPIO_DRIVE_H0S1 (NRF_GPIO_DRIVE_H0 | NRF_GPIO_DRIVE_S1) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
High drive for '0' and standard for '1'.
#define NRF_GPIO_DRIVE_H1 (1U << 9U) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
High drive for '1' (used with GPIO_OPEN_SOURCE)
#define NRF_GPIO_DRIVE_S0 (0U << 8U) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
Standard drive for '0' (default, used with GPIO_OPEN_DRAIN)
#define NRF_GPIO_DRIVE_S0H1 (NRF_GPIO_DRIVE_S0 | NRF_GPIO_DRIVE_H1) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
Standard drive for '0' and high for '1'.
#define NRF_GPIO_DRIVE_S0S1 (NRF_GPIO_DRIVE_S0 | NRF_GPIO_DRIVE_S1) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
Standard drive for '0' and '1' (default)
#define NRF_GPIO_DRIVE_S1 (0U << 9U) |
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
Standard drive for '1' (default, used with GPIO_OPEN_SOURCE)