Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
4.1.99
Toggle main menu visibility
Main Page
Related Pages
Topics
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
Enumerations
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
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
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
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
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
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
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
►
arch
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
▼
devicetree
►
can.h
►
clocks.h
►
display.h
►
dma.h
►
fixed-partitions.h
►
gpio.h
►
interrupt_controller.h
►
io-channels.h
►
mbox.h
►
ordinals.h
►
pinctrl.h
►
port-endpoint.h
►
pwms.h
►
reset.h
►
spi.h
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
pmci
►
portability
►
posix
►
psa
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
spi.h
Go to the documentation of this file.
1
6
/*
7
* Copyright (c) 2020 Nordic Semiconductor
8
*
9
* SPDX-License-Identifier: Apache-2.0
10
*/
11
12
#ifndef ZEPHYR_INCLUDE_DEVICETREE_SPI_H_
13
#define ZEPHYR_INCLUDE_DEVICETREE_SPI_H_
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
52
#define DT_SPI_HAS_CS_GPIOS(spi) DT_NODE_HAS_PROP(spi, cs_gpios)
53
78
#define DT_SPI_NUM_CS_GPIOS(spi) \
79
COND_CODE_1(DT_SPI_HAS_CS_GPIOS(spi), \
80
(DT_PROP_LEN(spi, cs_gpios)), (0))
78
#define DT_SPI_NUM_CS_GPIOS(spi) \
…
81
117
#define DT_SPI_DEV_HAS_CS_GPIOS(spi_dev) DT_SPI_HAS_CS_GPIOS(DT_BUS(spi_dev))
118
150
#define DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev) \
151
DT_GPIO_CTLR_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
150
#define DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev) \
…
152
183
#define DT_SPI_DEV_CS_GPIOS_PIN(spi_dev) \
184
DT_GPIO_PIN_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
183
#define DT_SPI_DEV_CS_GPIOS_PIN(spi_dev) \
…
185
211
#define DT_SPI_DEV_CS_GPIOS_FLAGS(spi_dev) \
212
DT_GPIO_FLAGS_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
211
#define DT_SPI_DEV_CS_GPIOS_FLAGS(spi_dev) \
…
213
221
#define DT_INST_SPI_DEV_HAS_CS_GPIOS(inst) \
222
DT_SPI_DEV_HAS_CS_GPIOS(DT_DRV_INST(inst))
221
#define DT_INST_SPI_DEV_HAS_CS_GPIOS(inst) \
…
223
231
#define DT_INST_SPI_DEV_CS_GPIOS_CTLR(inst) \
232
DT_SPI_DEV_CS_GPIOS_CTLR(DT_DRV_INST(inst))
231
#define DT_INST_SPI_DEV_CS_GPIOS_CTLR(inst) \
…
233
240
#define DT_INST_SPI_DEV_CS_GPIOS_PIN(inst) \
241
DT_SPI_DEV_CS_GPIOS_PIN(DT_DRV_INST(inst))
240
#define DT_INST_SPI_DEV_CS_GPIOS_PIN(inst) \
…
242
250
#define DT_INST_SPI_DEV_CS_GPIOS_FLAGS(inst) \
251
DT_SPI_DEV_CS_GPIOS_FLAGS(DT_DRV_INST(inst))
250
#define DT_INST_SPI_DEV_CS_GPIOS_FLAGS(inst) \
…
252
257
#ifdef __cplusplus
258
}
259
#endif
260
261
#endif
/* ZEPHYR_INCLUDE_DEVICETREE_SPI_H_ */
zephyr
devicetree
spi.h
Generated on Sat May 17 2025 09:07:16 for Zephyr API Documentation by
1.12.0