Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
clocks.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_CLOCKS_H_
13#define ZEPHYR_INCLUDE_DEVICETREE_CLOCKS_H_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
50#define DT_CLOCKS_CTLR_BY_IDX(node_id, idx) \
51 DT_PHANDLE_BY_IDX(node_id, clocks, idx)
52
60#define DT_CLOCKS_CTLR(node_id) DT_CLOCKS_CTLR_BY_IDX(node_id, 0)
61
88#define DT_CLOCKS_CTLR_BY_NAME(node_id, name) \
89 DT_PHANDLE_BY_NAME(node_id, clocks, name)
90
122#define DT_CLOCKS_LABEL_BY_IDX(node_id, idx) \
123 __DEPRECATED_MACRO \
124 DT_PROP_BY_PHANDLE_IDX(node_id, clocks, idx, label)
125
158#define DT_CLOCKS_LABEL_BY_NAME(node_id, name) \
159 __DEPRECATED_MACRO \
160 DT_PROP(DT_PHANDLE_BY_NAME(node_id, clocks, name), label)
161
168#define DT_CLOCKS_LABEL(node_id) __DEPRECATED_MACRO DT_CLOCKS_LABEL_BY_IDX(node_id, 0)
169
201#define DT_CLOCKS_CELL_BY_IDX(node_id, idx, cell) \
202 DT_PHA_BY_IDX(node_id, clocks, idx, cell)
203
237#define DT_CLOCKS_CELL_BY_NAME(node_id, name, cell) \
238 DT_PHA_BY_NAME(node_id, clocks, name, cell)
239
247#define DT_CLOCKS_CELL(node_id, cell) DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell)
248
259#define DT_INST_CLOCKS_CTLR_BY_IDX(inst, idx) \
260 DT_CLOCKS_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
261
269#define DT_INST_CLOCKS_CTLR(inst) DT_INST_CLOCKS_CTLR_BY_IDX(inst, 0)
270
282#define DT_INST_CLOCKS_CTLR_BY_NAME(inst, name) \
283 DT_CLOCKS_CTLR_BY_NAME(DT_DRV_INST(inst), name)
284
293#define DT_INST_CLOCKS_LABEL_BY_IDX(inst, idx) \
294 __DEPRECATED_MACRO \
295 DT_CLOCKS_LABEL_BY_IDX(DT_DRV_INST(inst), idx)
296
306#define DT_INST_CLOCKS_LABEL_BY_NAME(inst, name) \
307 __DEPRECATED_MACRO \
308 DT_CLOCKS_LABEL_BY_NAME(DT_DRV_INST(inst), name)
309
316#define DT_INST_CLOCKS_LABEL(inst) DT_INST_CLOCKS_LABEL_BY_IDX(inst, 0) __DEPRECATED_MACRO
317
327#define DT_INST_CLOCKS_CELL_BY_IDX(inst, idx, cell) \
328 DT_CLOCKS_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
329
339#define DT_INST_CLOCKS_CELL_BY_NAME(inst, name, cell) \
340 DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
341
348#define DT_INST_CLOCKS_CELL(inst, cell) \
349 DT_INST_CLOCKS_CELL_BY_IDX(inst, 0, cell)
350
355#ifdef __cplusplus
356}
357#endif
358
359#endif /* ZEPHYR_INCLUDE_DEVICETREE_CLOCKS_H_ */