Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
pwms.h
Go to the documentation of this file.
1
6/*
7 * Copyright (c) 2020, Linaro Ltd.
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11
12#ifndef ZEPHYR_INCLUDE_DEVICETREE_PWMS_H_
13#define ZEPHYR_INCLUDE_DEVICETREE_PWMS_H_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
56#define DT_PWMS_LABEL_BY_IDX(node_id, idx) \
57 __DEPRECATED_MACRO \
58 DT_PROP_BY_PHANDLE_IDX(node_id, pwms, idx, label)
59
94#define DT_PWMS_LABEL_BY_NAME(node_id, name) \
95 __DEPRECATED_MACRO \
96 DT_PROP(DT_PHANDLE_BY_NAME(node_id, pwms, name), label)
97
104#define DT_PWMS_LABEL(node_id) __DEPRECATED_MACRO DT_PWMS_LABEL_BY_IDX(node_id, 0)
105
132#define DT_PWMS_CTLR_BY_IDX(node_id, idx) \
133 DT_PHANDLE_BY_IDX(node_id, pwms, idx)
134
162#define DT_PWMS_CTLR_BY_NAME(node_id, name) \
163 DT_PHANDLE_BY_NAME(node_id, pwms, name)
164
172#define DT_PWMS_CTLR(node_id) DT_PWMS_CTLR_BY_IDX(node_id, 0)
173
218#define DT_PWMS_CELL_BY_IDX(node_id, idx, cell) \
219 DT_PHA_BY_IDX(node_id, pwms, idx, cell)
220
267#define DT_PWMS_CELL_BY_NAME(node_id, name, cell) \
268 DT_PHA_BY_NAME(node_id, pwms, name, cell)
269
277#define DT_PWMS_CELL(node_id, cell) DT_PWMS_CELL_BY_IDX(node_id, 0, cell)
278
292#define DT_PWMS_CHANNEL_BY_IDX(node_id, idx) \
293 DT_PWMS_CELL_BY_IDX(node_id, idx, channel)
294
309#define DT_PWMS_CHANNEL_BY_NAME(node_id, name) \
310 DT_PWMS_CELL_BY_NAME(node_id, name, channel)
311
318#define DT_PWMS_CHANNEL(node_id) DT_PWMS_CHANNEL_BY_IDX(node_id, 0)
319
333#define DT_PWMS_PERIOD_BY_IDX(node_id, idx) \
334 DT_PWMS_CELL_BY_IDX(node_id, idx, period)
335
350#define DT_PWMS_PERIOD_BY_NAME(node_id, name) \
351 DT_PWMS_CELL_BY_NAME(node_id, name, period)
352
359#define DT_PWMS_PERIOD(node_id) DT_PWMS_PERIOD_BY_IDX(node_id, 0)
360
375#define DT_PWMS_FLAGS_BY_IDX(node_id, idx) \
376 DT_PHA_BY_IDX_OR(node_id, pwms, idx, flags, 0)
377
395#define DT_PWMS_FLAGS_BY_NAME(node_id, name) \
396 DT_PHA_BY_NAME_OR(node_id, pwms, name, flags, 0)
397
404#define DT_PWMS_FLAGS(node_id) DT_PWMS_FLAGS_BY_IDX(node_id, 0)
405
414#define DT_INST_PWMS_LABEL_BY_IDX(inst, idx) \
415 __DEPRECATED_MACRO \
416 DT_PWMS_LABEL_BY_IDX(DT_DRV_INST(inst), idx)
417
427#define DT_INST_PWMS_LABEL_BY_NAME(inst, name) \
428 __DEPRECATED_MACRO \
429 DT_PWMS_LABEL_BY_NAME(DT_DRV_INST(inst), name)
430
437#define DT_INST_PWMS_LABEL(inst) __DEPRECATED_MACRO DT_INST_PWMS_LABEL_BY_IDX(inst, 0)
438
449#define DT_INST_PWMS_CTLR_BY_IDX(inst, idx) \
450 DT_PWMS_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
451
461#define DT_INST_PWMS_CTLR_BY_NAME(inst, name) \
462 DT_PWMS_CTLR_BY_NAME(DT_DRV_INST(inst), name)
463
471#define DT_INST_PWMS_CTLR(inst) DT_INST_PWMS_CTLR_BY_IDX(inst, 0)
472
481#define DT_INST_PWMS_CELL_BY_IDX(inst, idx, cell) \
482 DT_PWMS_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
483
493#define DT_INST_PWMS_CELL_BY_NAME(inst, name, cell) \
494 DT_PWMS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
495
502#define DT_INST_PWMS_CELL(inst, cell) \
503 DT_INST_PWMS_CELL_BY_IDX(inst, 0, cell)
504
512#define DT_INST_PWMS_CHANNEL_BY_IDX(inst, idx) \
513 DT_INST_PWMS_CELL_BY_IDX(inst, idx, channel)
514
523#define DT_INST_PWMS_CHANNEL_BY_NAME(inst, name) \
524 DT_INST_PWMS_CELL_BY_NAME(inst, name, channel)
525
532#define DT_INST_PWMS_CHANNEL(inst) DT_INST_PWMS_CHANNEL_BY_IDX(inst, 0)
533
541#define DT_INST_PWMS_PERIOD_BY_IDX(inst, idx) \
542 DT_INST_PWMS_CELL_BY_IDX(inst, idx, period)
543
552#define DT_INST_PWMS_PERIOD_BY_NAME(inst, name) \
553 DT_INST_PWMS_CELL_BY_NAME(inst, name, period)
554
561#define DT_INST_PWMS_PERIOD(inst) DT_INST_PWMS_PERIOD_BY_IDX(inst, 0)
562
570#define DT_INST_PWMS_FLAGS_BY_IDX(inst, idx) \
571 DT_INST_PWMS_CELL_BY_IDX(inst, idx, flags)
572
582#define DT_INST_PWMS_FLAGS_BY_NAME(inst, name) \
583 DT_INST_PWMS_CELL_BY_NAME(inst, name, flags)
584
591#define DT_INST_PWMS_FLAGS(inst) DT_INST_PWMS_FLAGS_BY_IDX(inst, 0)
592
597#ifdef __cplusplus
598}
599#endif
600
601#endif /* ZEPHYR_INCLUDE_DEVICETREE_PWMS_H_ */