Zephyr Project API
3.3.0
A Scalable Open Source RTOS
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
23
#define GPIO_ACTIVE_LOW (1 << 0)
25
#define GPIO_ACTIVE_HIGH (0 << 0)
26
36
/* Configures GPIO output in single-ended mode (open drain or open source). */
37
#define GPIO_SINGLE_ENDED (1 << 1)
38
/* Configures GPIO output in push-pull mode */
39
#define GPIO_PUSH_PULL (0 << 1)
40
41
/* Indicates single ended open drain mode (wired AND). */
42
#define GPIO_LINE_OPEN_DRAIN (1 << 2)
43
/* Indicates single ended open source mode (wired OR). */
44
#define GPIO_LINE_OPEN_SOURCE (0 << 2)
45
54
#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
62
#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
63
72
#define GPIO_PULL_UP (1 << 4)
73
75
#define GPIO_PULL_DOWN (1 << 5)
76
79
/* Note: Bits 15 downto 8 are reserved for SoC specific flags. */
80
85
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_GPIO_H_ */
include
zephyr
dt-bindings
gpio
gpio.h
Generated on Fri Jun 9 2023 14:09:42 for Zephyr Project API by
1.9.2