Zephyr API Documentation
4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pinctrl.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Nordic Semiconductor ASA
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
6
#ifndef ZEPHYR_INCLUDE_DEVICETREE_PINCTRL_H_
7
#define ZEPHYR_INCLUDE_DEVICETREE_PINCTRL_H_
8
13
20
41
#define DT_PINCTRL_BY_IDX(node_id, pc_idx, idx) \
42
DT_CAT6(node_id, _P_pinctrl_, pc_idx, _IDX_, idx, _PH)
43
58
#define DT_PINCTRL_0(node_id, idx) DT_PINCTRL_BY_IDX(node_id, 0, idx)
59
82
#define DT_PINCTRL_BY_NAME(node_id, name, idx) \
83
DT_CAT6(node_id, _PINCTRL_NAME_, name, _IDX_, idx, _PH)
84
105
#define DT_PINCTRL_NAME_TO_IDX(node_id, name) \
106
DT_CAT4(node_id, _PINCTRL_NAME_, name, _IDX)
107
139
#define DT_PINCTRL_IDX_TO_NAME_TOKEN(node_id, pc_idx) \
140
DT_CAT4(node_id, _PINCTRL_IDX_, pc_idx, _TOKEN)
141
165
#define DT_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(node_id, pc_idx) \
166
DT_CAT4(node_id, _PINCTRL_IDX_, pc_idx, _UPPER_TOKEN)
167
190
#define DT_NUM_PINCTRLS_BY_IDX(node_id, pc_idx) \
191
DT_CAT4(node_id, _P_pinctrl_, pc_idx, _LEN)
192
213
#define DT_NUM_PINCTRLS_BY_NAME(node_id, name) \
214
DT_NUM_PINCTRLS_BY_IDX(node_id, DT_PINCTRL_NAME_TO_IDX(node_id, name))
215
240
#define DT_NUM_PINCTRL_STATES(node_id) DT_CAT(node_id, _PINCTRL_NUM)
241
269
#define DT_PINCTRL_HAS_IDX(node_id, pc_idx) \
270
IS_ENABLED(DT_CAT4(node_id, _PINCTRL_IDX_, pc_idx, _EXISTS))
271
298
#define DT_PINCTRL_HAS_NAME(node_id, name) \
299
IS_ENABLED(DT_CAT4(node_id, _PINCTRL_NAME_, name, _EXISTS))
300
312
#define DT_INST_PINCTRL_BY_IDX(inst, pc_idx, idx) \
313
DT_PINCTRL_BY_IDX(DT_DRV_INST(inst), pc_idx, idx)
314
330
#define DT_INST_PINCTRL_0(inst, idx) \
331
DT_PINCTRL_BY_IDX(DT_DRV_INST(inst), 0, idx)
332
345
#define DT_INST_PINCTRL_BY_NAME(inst, name, idx) \
346
DT_PINCTRL_BY_NAME(DT_DRV_INST(inst), name, idx)
347
359
#define DT_INST_PINCTRL_NAME_TO_IDX(inst, name) \
360
DT_PINCTRL_NAME_TO_IDX(DT_DRV_INST(inst), name)
361
372
#define DT_INST_PINCTRL_IDX_TO_NAME_TOKEN(inst, pc_idx) \
373
DT_PINCTRL_IDX_TO_NAME_TOKEN(DT_DRV_INST(inst), pc_idx)
374
385
#define DT_INST_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(inst, pc_idx) \
386
DT_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(DT_DRV_INST(inst), pc_idx)
387
399
#define DT_INST_NUM_PINCTRLS_BY_IDX(inst, pc_idx) \
400
DT_NUM_PINCTRLS_BY_IDX(DT_DRV_INST(inst), pc_idx)
401
412
#define DT_INST_NUM_PINCTRLS_BY_NAME(inst, name) \
413
DT_NUM_PINCTRLS_BY_NAME(DT_DRV_INST(inst), name)
414
423
#define DT_INST_NUM_PINCTRL_STATES(inst) \
424
DT_NUM_PINCTRL_STATES(DT_DRV_INST(inst))
425
436
#define DT_INST_PINCTRL_HAS_IDX(inst, pc_idx) \
437
DT_PINCTRL_HAS_IDX(DT_DRV_INST(inst), pc_idx)
438
448
#define DT_INST_PINCTRL_HAS_NAME(inst, name) \
449
DT_PINCTRL_HAS_NAME(DT_DRV_INST(inst), name)
450
451
455
456
#endif
/* ZEPHYR_INCLUDE_DEVICETREE_PINCTRL_H_ */
zephyr
devicetree
pinctrl.h
Generated on
for Zephyr API Documentation by
1.14.0