Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
2.7.0-rc2
Toggle main menu visibility
Main Page
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
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
90
#define GPIO_VOLTAGE_POS 6
91
#define GPIO_VOLTAGE_MASK (3U << GPIO_VOLTAGE_POS)
95
#define GPIO_VOLTAGE_DEFAULT (0U << GPIO_VOLTAGE_POS)
97
#define GPIO_VOLTAGE_1P8 (1U << GPIO_VOLTAGE_POS)
99
#define GPIO_VOLTAGE_3P3 (2U << GPIO_VOLTAGE_POS)
101
#define GPIO_VOLTAGE_5P0 (3U << GPIO_VOLTAGE_POS)
102
109
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_GPIO_H_ */
include
dt-bindings
gpio
gpio.h
Generated on Sun Oct 9 2022 09:21:56 for Zephyr API Documentation by
1.9.4