Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
gpio.h File Reference

Go to the source code of this file.

Macros

GPIO pin active level flags
#define GPIO_ACTIVE_LOW   (1 << 0)
 
#define GPIO_ACTIVE_HIGH   (0 << 0)
 
GPIO pin drive flags
#define GPIO_OPEN_DRAIN   (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
 
#define GPIO_OPEN_SOURCE   (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
 
GPIO pin bias flags
#define GPIO_PULL_UP   (1 << 4)
 
#define GPIO_PULL_DOWN   (1 << 5)
 
GPIO pin voltage flags

The voltage flags are a Zephyr specific extension of the standard GPIO flags specified by the Linux GPIO binding. Only applicable if SoC allows to configure pin voltage per individual pin.

#define GPIO_VOLTAGE_DEFAULT   (0U << GPIO_VOLTAGE_POS)
 
#define GPIO_VOLTAGE_1P8   (1U << GPIO_VOLTAGE_POS)
 
#define GPIO_VOLTAGE_3P3   (2U << GPIO_VOLTAGE_POS)
 
#define GPIO_VOLTAGE_5P0   (3U << GPIO_VOLTAGE_POS)