|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Public NVMEM header file. More...
#include <sys/types.h>#include <zephyr/device.h>#include <zephyr/devicetree.h>#include <zephyr/devicetree/nvmem.h>#include <zephyr/sys/byteorder.h>Go to the source code of this file.
Data Structures | |
| struct | nvmem_cell |
| Non-Volatile Memory cell representation. More... | |
Macros | |
| #define | NVMEM_CELL_INIT(node_id) |
| Get a static initializer for a struct nvmem_cell. | |
| #define | NVMEM_CELL_GET_BY_NAME(node_id, name) |
| Get a static initializer for a struct nvmem_cell by name. | |
| #define | NVMEM_CELL_INST_GET_BY_NAME(inst, name) |
| Get a static initializer for a struct nvmem_cell from a DT_DRV_COMPAT instance by name. | |
| #define | NVMEM_CELL_GET_BY_NAME_OR(node_id, name, default_value) |
| Get a static initializer for a struct nvmem_cell by name, with a fallback. | |
| #define | NVMEM_CELL_INST_GET_BY_NAME_OR(inst, name, default_value) |
| Get a static initializer for a struct nvmem_cell from a DT_DRV_COMPAT instance by name, with a fallback. | |
| #define | NVMEM_CELL_GET_BY_IDX(node_id, idx) |
| Get a static initializer for a struct nvmem_cell by index. | |
| #define | NVMEM_CELL_INST_GET_BY_IDX(inst, idx) |
| Get a static initializer for a struct nvmem_cell from a DT_DRV_COMPAT instance by index. | |
| #define | NVMEM_CELL_GET_BY_IDX_OR(node_id, idx, default_value) |
| Get a static initializer for a struct nvmem_cell by index, with a fallback. | |
| #define | NVMEM_CELL_INST_GET_BY_IDX_OR(inst, idx, default_value) |
| Get a static initializer for a struct nvmem_cell from a DT_DRV_COMPAT instance by index, with a fallback. | |
Functions | |
| int | nvmem_cell_read (const struct nvmem_cell *cell, void *data, off_t off, size_t len) |
| Read data from an NVMEM cell. | |
| int | nvmem_cell_write (const struct nvmem_cell *cell, const void *data, off_t off, size_t len) |
| Write data to an NVMEM cell. | |
| static bool | nvmem_cell_is_ready (const struct nvmem_cell *cell) |
| Check if an NVMEM cell is ready. | |
| static bool | nvmem_cell_is_read_only (const struct nvmem_cell *cell) |
| Check if an NVMEM cell is read-only. | |
| static int | nvmem_cell_read_le16 (const struct nvmem_cell *cell, uint16_t *val, off_t off) |
| Read a little-endian 16-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_be16 (const struct nvmem_cell *cell, uint16_t *val, off_t off) |
| Read a big-endian 16-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_le32 (const struct nvmem_cell *cell, uint32_t *val, off_t off) |
| Read a little-endian 32-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_be32 (const struct nvmem_cell *cell, uint32_t *val, off_t off) |
| Read a big-endian 32-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_le48 (const struct nvmem_cell *cell, uint64_t *val, off_t off) |
| Read a little-endian 48-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_be48 (const struct nvmem_cell *cell, uint64_t *val, off_t off) |
| Read a big-endian 48-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_le64 (const struct nvmem_cell *cell, uint64_t *val, off_t off) |
| Read a little-endian 64-bit value from an NVMEM cell. | |
| static int | nvmem_cell_read_be64 (const struct nvmem_cell *cell, uint64_t *val, off_t off) |
| Read a big-endian 64-bit value from an NVMEM cell. | |
| static int | nvmem_cell_write_le16 (const struct nvmem_cell *cell, uint16_t val, off_t off) |
| Write a little-endian 16-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_be16 (const struct nvmem_cell *cell, uint16_t val, off_t off) |
| Write a big-endian 16-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_le32 (const struct nvmem_cell *cell, uint32_t val, off_t off) |
| Write a little-endian 32-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_be32 (const struct nvmem_cell *cell, uint32_t val, off_t off) |
| Write a big-endian 32-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_le48 (const struct nvmem_cell *cell, uint64_t val, off_t off) |
| Write a little-endian 48-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_be48 (const struct nvmem_cell *cell, uint64_t val, off_t off) |
| Write a big-endian 48-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_le64 (const struct nvmem_cell *cell, uint64_t val, off_t off) |
| Write a little-endian 64-bit value to an NVMEM cell. | |
| static int | nvmem_cell_write_be64 (const struct nvmem_cell *cell, uint64_t val, off_t off) |
| Write a big-endian 64-bit value to an NVMEM cell. | |
Public NVMEM header file.