Zephyr API Documentation
3.7.0
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
18
#define GPIO_DT_FLAGS_MASK 0x3F
19
26
#define GPIO_ACTIVE_LOW (1 << 0)
28
#define GPIO_ACTIVE_HIGH (0 << 0)
29
39
/* Configures GPIO output in single-ended mode (open drain or open source). */
40
#define GPIO_SINGLE_ENDED (1 << 1)
41
/* Configures GPIO output in push-pull mode */
42
#define GPIO_PUSH_PULL (0 << 1)
43
44
/* Indicates single ended open drain mode (wired AND). */
45
#define GPIO_LINE_OPEN_DRAIN (1 << 2)
46
/* Indicates single ended open source mode (wired OR). */
47
#define GPIO_LINE_OPEN_SOURCE (0 << 2)
48
57
#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
65
#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
66
75
#define GPIO_PULL_UP (1 << 4)
76
78
#define GPIO_PULL_DOWN (1 << 5)
79
85
#define GPIO_INT_WAKEUP (1 << 6)
86
87
/* Note: Bits 15 downto 8 are reserved for SoC specific flags. */
88
93
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_GPIO_H_ */
zephyr
dt-bindings
gpio
gpio.h
Generated on Fri Jul 26 2024 14:01:56 for Zephyr API Documentation by
1.9.6