Zephyr API Documentation
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nvmem.h
Go to the documentation of this file.
1
6
7
/*
8
* Copyright (c) 2024, Andriy Gelman
9
* Copyright (c) 2025, Basalte bv
10
*
11
* SPDX-License-Identifier: Apache-2.0
12
*/
13
14
#ifndef ZEPHYR_INCLUDE_DEVICETREE_NVMEM_H_
15
#define ZEPHYR_INCLUDE_DEVICETREE_NVMEM_H_
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
28
56
#define DT_NVMEM_CELLS_HAS_IDX(node_id, idx) DT_PROP_HAS_IDX(node_id, nvmem_cells, idx)
57
85
#define DT_NVMEM_CELLS_HAS_NAME(node_id, name) DT_PROP_HAS_NAME(node_id, nvmem_cells, name)
86
109
#define DT_NUM_NVMEM_CELLS(node_id) DT_PROP_LEN(node_id, nvmem_cells)
110
147
#define DT_NVMEM_CELL_BY_IDX(node_id, idx) DT_PHANDLE_BY_IDX(node_id, nvmem_cells, idx)
148
161
#define DT_NVMEM_CELL(node_id) DT_NVMEM_CELL_BY_IDX(node_id, 0)
162
200
#define DT_NVMEM_CELL_BY_NAME(node_id, name) DT_PHANDLE_BY_NAME(node_id, nvmem_cells, name)
201
212
#define DT_INST_NVMEM_CELLS_HAS_IDX(inst, idx) DT_NVMEM_CELLS_HAS_IDX(DT_DRV_INST(inst), idx)
213
225
#define DT_INST_NVMEM_CELLS_HAS_NAME(inst, name) DT_NVMEM_CELLS_HAS_NAME(DT_DRV_INST(inst), name)
226
236
#define DT_INST_NUM_NVMEM_CELLS(inst) DT_NUM_NVMEM_CELLS(DT_DRV_INST(inst))
237
250
#define DT_INST_NVMEM_CELL_BY_IDX(inst, idx) DT_NVMEM_CELL_BY_IDX(DT_DRV_INST(inst), idx)
251
264
#define DT_INST_NVMEM_CELL(inst) DT_INST_NVMEM_CELL_BY_IDX(inst, 0)
265
279
#define DT_INST_NVMEM_CELL_BY_NAME(inst, name) DT_NVMEM_CELL_BY_NAME(DT_DRV_INST(inst), name)
280
317
#define DT_MTD_FROM_NVMEM_CELL(node_id) DT_GPARENT(node_id)
318
322
323
#ifdef __cplusplus
324
}
325
#endif
326
327
#endif
/* ZEPHYR_INCLUDE_DEVICETREE_NVMEM_H_ */
zephyr
devicetree
nvmem.h
Generated on
for Zephyr API Documentation by
1.16.1