Zephyr API Documentation
4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nvmem.h
Go to the documentation of this file.
1
5
6
/*
7
* Copyright (c) 2024, Andriy Gelman
8
* Copyright (c) 2025, Basalte bv
9
*
10
* SPDX-License-Identifier: Apache-2.0
11
*/
12
13
#ifndef INCLUDE_ZEPHYR_DEVICETREE_NVMEM_H_
14
#define INCLUDE_ZEPHYR_DEVICETREE_NVMEM_H_
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
25
53
#define DT_NVMEM_CELLS_HAS_IDX(node_id, idx) DT_PROP_HAS_IDX(node_id, nvmem_cells, idx)
54
82
#define DT_NVMEM_CELLS_HAS_NAME(node_id, name) DT_PROP_HAS_NAME(node_id, nvmem_cells, name)
83
106
#define DT_NUM_NVMEM_CELLS(node_id) DT_PROP_LEN(node_id, nvmem_cells)
107
144
#define DT_NVMEM_CELL_BY_IDX(node_id, idx) DT_PHANDLE_BY_IDX(node_id, nvmem_cells, idx)
145
156
#define DT_NVMEM_CELL(node_id) DT_NVMEM_CELL_BY_IDX(node_id, 0)
157
195
#define DT_NVMEM_CELL_BY_NAME(node_id, name) DT_PHANDLE_BY_NAME(node_id, nvmem_cells, name)
196
205
#define DT_INST_NVMEM_CELLS_HAS_IDX(inst, idx) DT_NVMEM_CELLS_HAS_IDX(DT_DRV_INST(inst), idx)
206
215
#define DT_INST_NVMEM_CELLS_HAS_NAME(inst, name) DT_NVMEM_CELLS_HAS_NAME(DT_DRV_INST(inst), name)
216
224
#define DT_INST_NUM_NVMEM_CELLS(inst) DT_NUM_NVMEM_CELLS(DT_DRV_INST(inst))
225
238
#define DT_INST_NVMEM_CELL_BY_IDX(inst, idx) DT_NVMEM_CELL_BY_IDX(DT_DRV_INST(inst), idx)
239
250
#define DT_INST_NVMEM_CELL(inst) DT_INST_NVMEM_CELL_BY_IDX(inst, 0)
251
265
#define DT_INST_NVMEM_CELL_BY_NAME(inst, name) DT_NVMEM_CELL_BY_NAME(DT_DRV_INST(inst), name)
266
303
#define DT_MTD_FROM_NVMEM_CELL(node_id) DT_GPARENT(node_id)
304
308
309
#ifdef __cplusplus
310
}
311
#endif
312
313
#endif
/* INCLUDE_ZEPHYR_DEVICETREE_NVMEM_H_ */
zephyr
devicetree
nvmem.h
Generated on
for Zephyr API Documentation by
1.14.0