Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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
51#define DT_PWMS_CTLR_BY_IDX(node_id, idx) \
52 DT_PHANDLE_BY_IDX(node_id, pwms, idx)
53
81#define DT_PWMS_CTLR_BY_NAME(node_id, name) \
82 DT_PHANDLE_BY_NAME(node_id, pwms, name)
83
91#define DT_PWMS_CTLR(node_id) DT_PWMS_CTLR_BY_IDX(node_id, 0)
92
135#define DT_PWMS_CELL_BY_IDX(node_id, idx, cell) \
136 DT_PHA_BY_IDX(node_id, pwms, idx, cell)
137
182#define DT_PWMS_CELL_BY_NAME(node_id, name, cell) \
183 DT_PHA_BY_NAME(node_id, pwms, name, cell)
184
192#define DT_PWMS_CELL(node_id, cell) DT_PWMS_CELL_BY_IDX(node_id, 0, cell)
193
207#define DT_PWMS_CHANNEL_BY_IDX(node_id, idx) \
208 DT_PWMS_CELL_BY_IDX(node_id, idx, channel)
209
224#define DT_PWMS_CHANNEL_BY_NAME(node_id, name) \
225 DT_PWMS_CELL_BY_NAME(node_id, name, channel)
226
233#define DT_PWMS_CHANNEL(node_id) DT_PWMS_CHANNEL_BY_IDX(node_id, 0)
234
248#define DT_PWMS_PERIOD_BY_IDX(node_id, idx) \
249 DT_PWMS_CELL_BY_IDX(node_id, idx, period)
250
265#define DT_PWMS_PERIOD_BY_NAME(node_id, name) \
266 DT_PWMS_CELL_BY_NAME(node_id, name, period)
267
274#define DT_PWMS_PERIOD(node_id) DT_PWMS_PERIOD_BY_IDX(node_id, 0)
275
290#define DT_PWMS_FLAGS_BY_IDX(node_id, idx) \
291 DT_PHA_BY_IDX_OR(node_id, pwms, idx, flags, 0)
292
310#define DT_PWMS_FLAGS_BY_NAME(node_id, name) \
311 DT_PHA_BY_NAME_OR(node_id, pwms, name, flags, 0)
312
319#define DT_PWMS_FLAGS(node_id) DT_PWMS_FLAGS_BY_IDX(node_id, 0)
320
331#define DT_INST_PWMS_CTLR_BY_IDX(inst, idx) \
332 DT_PWMS_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
333
343#define DT_INST_PWMS_CTLR_BY_NAME(inst, name) \
344 DT_PWMS_CTLR_BY_NAME(DT_DRV_INST(inst), name)
345
353#define DT_INST_PWMS_CTLR(inst) DT_INST_PWMS_CTLR_BY_IDX(inst, 0)
354
363#define DT_INST_PWMS_CELL_BY_IDX(inst, idx, cell) \
364 DT_PWMS_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
365
375#define DT_INST_PWMS_CELL_BY_NAME(inst, name, cell) \
376 DT_PWMS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
377
384#define DT_INST_PWMS_CELL(inst, cell) \
385 DT_INST_PWMS_CELL_BY_IDX(inst, 0, cell)
386
394#define DT_INST_PWMS_CHANNEL_BY_IDX(inst, idx) \
395 DT_INST_PWMS_CELL_BY_IDX(inst, idx, channel)
396
405#define DT_INST_PWMS_CHANNEL_BY_NAME(inst, name) \
406 DT_INST_PWMS_CELL_BY_NAME(inst, name, channel)
407
414#define DT_INST_PWMS_CHANNEL(inst) DT_INST_PWMS_CHANNEL_BY_IDX(inst, 0)
415
423#define DT_INST_PWMS_PERIOD_BY_IDX(inst, idx) \
424 DT_INST_PWMS_CELL_BY_IDX(inst, idx, period)
425
434#define DT_INST_PWMS_PERIOD_BY_NAME(inst, name) \
435 DT_INST_PWMS_CELL_BY_NAME(inst, name, period)
436
443#define DT_INST_PWMS_PERIOD(inst) DT_INST_PWMS_PERIOD_BY_IDX(inst, 0)
444
452#define DT_INST_PWMS_FLAGS_BY_IDX(inst, idx) \
453 DT_INST_PWMS_CELL_BY_IDX(inst, idx, flags)
454
464#define DT_INST_PWMS_FLAGS_BY_NAME(inst, name) \
465 DT_INST_PWMS_CELL_BY_NAME(inst, name, flags)
466
473#define DT_INST_PWMS_FLAGS(inst) DT_INST_PWMS_FLAGS_BY_IDX(inst, 0)
474
479#ifdef __cplusplus
480}
481#endif
482
483#endif /* ZEPHYR_INCLUDE_DEVICETREE_PWMS_H_ */