Zephyr API Documentation 4.2.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
137#define DT_CLOCKS_CTLR_BY_IDX(node_id, idx) \
138 DT_PHANDLE_BY_IDX(node_id, clocks, idx)
139
147#define DT_CLOCKS_CTLR(node_id) DT_CLOCKS_CTLR_BY_IDX(node_id, 0)
148
174#define DT_CLOCKS_CTLR_BY_NAME(node_id, name) \
175 DT_PHANDLE_BY_NAME(node_id, clocks, name)
176
208#define DT_CLOCKS_CELL_BY_IDX(node_id, idx, cell) \
209 DT_PHA_BY_IDX(node_id, clocks, idx, cell)
210
244#define DT_CLOCKS_CELL_BY_NAME(node_id, name, cell) \
245 DT_PHA_BY_NAME(node_id, clocks, name, cell)
246
254#define DT_CLOCKS_CELL(node_id, cell) DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell)
255
262#define DT_INST_CLOCKS_HAS_IDX(inst, idx) \
263 DT_CLOCKS_HAS_IDX(DT_DRV_INST(inst), idx)
264
271#define DT_INST_CLOCKS_HAS_NAME(inst, name) \
272 DT_CLOCKS_HAS_NAME(DT_DRV_INST(inst), name)
273
279#define DT_INST_NUM_CLOCKS(inst) \
280 DT_NUM_CLOCKS(DT_DRV_INST(inst))
281
292#define DT_INST_CLOCKS_CTLR_BY_IDX(inst, idx) \
293 DT_CLOCKS_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
294
302#define DT_INST_CLOCKS_CTLR(inst) DT_INST_CLOCKS_CTLR_BY_IDX(inst, 0)
303
315#define DT_INST_CLOCKS_CTLR_BY_NAME(inst, name) \
316 DT_CLOCKS_CTLR_BY_NAME(DT_DRV_INST(inst), name)
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
354
355#ifdef __cplusplus
356}
357#endif
358
359#endif /* ZEPHYR_INCLUDE_DEVICETREE_CLOCKS_H_ */