Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
87#define DT_CLOCKS_CTLR_BY_NAME(node_id, name) \
88 DT_PHANDLE_BY_NAME(node_id, clocks, name)
89
121#define DT_CLOCKS_CELL_BY_IDX(node_id, idx, cell) \
122 DT_PHA_BY_IDX(node_id, clocks, idx, cell)
123
157#define DT_CLOCKS_CELL_BY_NAME(node_id, name, cell) \
158 DT_PHA_BY_NAME(node_id, clocks, name, cell)
159
167#define DT_CLOCKS_CELL(node_id, cell) DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell)
168
179#define DT_INST_CLOCKS_CTLR_BY_IDX(inst, idx) \
180 DT_CLOCKS_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
181
189#define DT_INST_CLOCKS_CTLR(inst) DT_INST_CLOCKS_CTLR_BY_IDX(inst, 0)
190
202#define DT_INST_CLOCKS_CTLR_BY_NAME(inst, name) \
203 DT_CLOCKS_CTLR_BY_NAME(DT_DRV_INST(inst), name)
204
214#define DT_INST_CLOCKS_CELL_BY_IDX(inst, idx, cell) \
215 DT_CLOCKS_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
216
226#define DT_INST_CLOCKS_CELL_BY_NAME(inst, name, cell) \
227 DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
228
235#define DT_INST_CLOCKS_CELL(inst, cell) \
236 DT_INST_CLOCKS_CELL_BY_IDX(inst, 0, cell)
237
242#ifdef __cplusplus
243}
244#endif
245
246#endif /* ZEPHYR_INCLUDE_DEVICETREE_CLOCKS_H_ */