Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
clocks.h
Go to the documentation of this file.
1
5
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
25
53#define DT_CLOCKS_HAS_IDX(node_id, idx) \
54 DT_PROP_HAS_IDX(node_id, clocks, idx)
55
84#define DT_CLOCKS_HAS_NAME(node_id, name) \
85 DT_PROP_HAS_NAME(node_id, clocks, name)
86
108#define DT_NUM_CLOCKS(node_id) \
109 DT_PROP_LEN(node_id, clocks)
110
111
136#define DT_CLOCKS_CTLR_BY_IDX(node_id, idx) \
137 DT_PHANDLE_BY_IDX(node_id, clocks, idx)
138
145#define DT_CLOCKS_CTLR(node_id) DT_CLOCKS_CTLR_BY_IDX(node_id, 0)
146
172#define DT_CLOCKS_CTLR_BY_NAME(node_id, name) \
173 DT_PHANDLE_BY_NAME(node_id, clocks, name)
174
206#define DT_CLOCKS_CELL_BY_IDX(node_id, idx, cell) \
207 DT_PHA_BY_IDX(node_id, clocks, idx, cell)
208
242#define DT_CLOCKS_CELL_BY_NAME(node_id, name, cell) \
243 DT_PHA_BY_NAME(node_id, clocks, name, cell)
244
252#define DT_CLOCKS_CELL(node_id, cell) DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell)
253
260#define DT_INST_CLOCKS_HAS_IDX(inst, idx) \
261 DT_CLOCKS_HAS_IDX(DT_DRV_INST(inst), idx)
262
270#define DT_INST_CLOCKS_HAS_NAME(inst, name) \
271 DT_CLOCKS_HAS_NAME(DT_DRV_INST(inst), name)
272
278#define DT_INST_NUM_CLOCKS(inst) \
279 DT_NUM_CLOCKS(DT_DRV_INST(inst))
280
290#define DT_INST_CLOCKS_CTLR_BY_IDX(inst, idx) \
291 DT_CLOCKS_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
292
299#define DT_INST_CLOCKS_CTLR(inst) DT_INST_CLOCKS_CTLR_BY_IDX(inst, 0)
300
312#define DT_INST_CLOCKS_CTLR_BY_NAME(inst, name) \
313 DT_CLOCKS_CTLR_BY_NAME(DT_DRV_INST(inst), name)
314
324#define DT_INST_CLOCKS_CELL_BY_IDX(inst, idx, cell) \
325 DT_CLOCKS_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
326
336#define DT_INST_CLOCKS_CELL_BY_NAME(inst, name, cell) \
337 DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
338
345#define DT_INST_CLOCKS_CELL(inst, cell) \
346 DT_INST_CLOCKS_CELL_BY_IDX(inst, 0, cell)
347
351
352#ifdef __cplusplus
353}
354#endif
355
356#endif /* ZEPHYR_INCLUDE_DEVICETREE_CLOCKS_H_ */