Zephyr API Documentation
4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
spi.h
Go to the documentation of this file.
1
5
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
25
53
#define DT_SPI_HAS_CS_GPIOS(spi) DT_NODE_HAS_PROP(spi, cs_gpios)
54
79
#define DT_SPI_NUM_CS_GPIOS(spi) \
80
COND_CODE_1(DT_SPI_HAS_CS_GPIOS(spi), \
81
(DT_PROP_LEN(spi, cs_gpios)), (0))
82
118
#define DT_SPI_DEV_HAS_CS_GPIOS(spi_dev) DT_SPI_HAS_CS_GPIOS(DT_BUS(spi_dev))
119
151
#define DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev) \
152
DT_GPIO_CTLR_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
153
184
#define DT_SPI_DEV_CS_GPIOS_PIN(spi_dev) \
185
DT_GPIO_PIN_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
186
212
#define DT_SPI_DEV_CS_GPIOS_FLAGS(spi_dev) \
213
DT_GPIO_FLAGS_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR_RAW(spi_dev))
214
222
#define DT_INST_SPI_DEV_HAS_CS_GPIOS(inst) \
223
DT_SPI_DEV_HAS_CS_GPIOS(DT_DRV_INST(inst))
224
232
#define DT_INST_SPI_DEV_CS_GPIOS_CTLR(inst) \
233
DT_SPI_DEV_CS_GPIOS_CTLR(DT_DRV_INST(inst))
234
241
#define DT_INST_SPI_DEV_CS_GPIOS_PIN(inst) \
242
DT_SPI_DEV_CS_GPIOS_PIN(DT_DRV_INST(inst))
243
251
#define DT_INST_SPI_DEV_CS_GPIOS_FLAGS(inst) \
252
DT_SPI_DEV_CS_GPIOS_FLAGS(DT_DRV_INST(inst))
253
257
258
#ifdef __cplusplus
259
}
260
#endif
261
262
#endif
/* ZEPHYR_INCLUDE_DEVICETREE_SPI_H_ */
zephyr
devicetree
spi.h
Generated on
for Zephyr API Documentation by
1.14.0