Zephyr Project API
4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gpio.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Piotr Mienkowski
3
* Copyright (c) 2018 Linaro Limited
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_GPIO_H_
8
#define ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_GPIO_H_
9
16
#define GPIO_DT_FLAGS_MASK 0x3F
17
24
#define GPIO_ACTIVE_LOW (1 << 0)
26
#define GPIO_ACTIVE_HIGH (0 << 0)
27
37
/* Configures GPIO output in single-ended mode (open drain or open source). */
38
#define GPIO_SINGLE_ENDED (1 << 1)
39
/* Configures GPIO output in push-pull mode */
40
#define GPIO_PUSH_PULL (0 << 1)
41
42
/* Indicates single ended open drain mode (wired AND). */
43
#define GPIO_LINE_OPEN_DRAIN (1 << 2)
44
/* Indicates single ended open source mode (wired OR). */
45
#define GPIO_LINE_OPEN_SOURCE (0 << 2)
46
55
#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
63
#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
64
73
#define GPIO_PULL_UP (1 << 4)
74
76
#define GPIO_PULL_DOWN (1 << 5)
77
83
#define GPIO_INT_WAKEUP (1 << 6)
84
85
/* Note: Bits 15 downto 8 are reserved for SoC specific flags. */
86
91
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_GPIO_H_ */
include
zephyr
dt-bindings
gpio
gpio.h
Generated on Sun Aug 24 2025 06:52:31 for Zephyr Project API by
1.9.8