Zephyr API Documentation
4.0.0
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
40
#define DT_PINCTRL_BY_IDX(node_id, pc_idx, idx) \
41
DT_CAT6(node_id, _P_pinctrl_, pc_idx, _IDX_, idx, _PH)
42
57
#define DT_PINCTRL_0(node_id, idx) DT_PINCTRL_BY_IDX(node_id, 0, idx)
58
81
#define DT_PINCTRL_BY_NAME(node_id, name, idx) \
82
DT_CAT6(node_id, _PINCTRL_NAME_, name, _IDX_, idx, _PH)
83
104
#define DT_PINCTRL_NAME_TO_IDX(node_id, name) \
105
DT_CAT4(node_id, _PINCTRL_NAME_, name, _IDX)
106
138
#define DT_PINCTRL_IDX_TO_NAME_TOKEN(node_id, pc_idx) \
139
DT_CAT4(node_id, _PINCTRL_IDX_, pc_idx, _TOKEN)
140
164
#define DT_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(node_id, pc_idx) \
165
DT_CAT4(node_id, _PINCTRL_IDX_, pc_idx, _UPPER_TOKEN)
166
189
#define DT_NUM_PINCTRLS_BY_IDX(node_id, pc_idx) \
190
DT_CAT4(node_id, _P_pinctrl_, pc_idx, _LEN)
191
212
#define DT_NUM_PINCTRLS_BY_NAME(node_id, name) \
213
DT_NUM_PINCTRLS_BY_IDX(node_id, DT_PINCTRL_NAME_TO_IDX(node_id, name))
214
239
#define DT_NUM_PINCTRL_STATES(node_id) DT_CAT(node_id, _PINCTRL_NUM)
240
268
#define DT_PINCTRL_HAS_IDX(node_id, pc_idx) \
269
IS_ENABLED(DT_CAT4(node_id, _PINCTRL_IDX_, pc_idx, _EXISTS))
270
297
#define DT_PINCTRL_HAS_NAME(node_id, name) \
298
IS_ENABLED(DT_CAT4(node_id, _PINCTRL_NAME_, name, _EXISTS))
299
311
#define DT_INST_PINCTRL_BY_IDX(inst, pc_idx, idx) \
312
DT_PINCTRL_BY_IDX(DT_DRV_INST(inst), pc_idx, idx)
313
329
#define DT_INST_PINCTRL_0(inst, idx) \
330
DT_PINCTRL_BY_IDX(DT_DRV_INST(inst), 0, idx)
331
344
#define DT_INST_PINCTRL_BY_NAME(inst, name, idx) \
345
DT_PINCTRL_BY_NAME(DT_DRV_INST(inst), name, idx)
346
358
#define DT_INST_PINCTRL_NAME_TO_IDX(inst, name) \
359
DT_PINCTRL_NAME_TO_IDX(DT_DRV_INST(inst), name)
360
371
#define DT_INST_PINCTRL_IDX_TO_NAME_TOKEN(inst, pc_idx) \
372
DT_PINCTRL_IDX_TO_NAME_TOKEN(DT_DRV_INST(inst), pc_idx)
373
384
#define DT_INST_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(inst, pc_idx) \
385
DT_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(DT_DRV_INST(inst), pc_idx)
386
398
#define DT_INST_NUM_PINCTRLS_BY_IDX(inst, pc_idx) \
399
DT_NUM_PINCTRLS_BY_IDX(DT_DRV_INST(inst), pc_idx)
400
411
#define DT_INST_NUM_PINCTRLS_BY_NAME(inst, name) \
412
DT_NUM_PINCTRLS_BY_NAME(DT_DRV_INST(inst), name)
413
422
#define DT_INST_NUM_PINCTRL_STATES(inst) \
423
DT_NUM_PINCTRL_STATES(DT_DRV_INST(inst))
424
435
#define DT_INST_PINCTRL_HAS_IDX(inst, pc_idx) \
436
DT_PINCTRL_HAS_IDX(DT_DRV_INST(inst), pc_idx)
437
447
#define DT_INST_PINCTRL_HAS_NAME(inst, name) \
448
DT_PINCTRL_HAS_NAME(DT_DRV_INST(inst), name)
449
450
455
#endif
/* ZEPHYR_INCLUDE_DEVICETREE_PINCTRL_H_ */
zephyr
devicetree
pinctrl.h
Generated on Sat Nov 16 2024 04:55:03 for Zephyr API Documentation by
1.12.0