Interface for non-volatile memory drivers.
More...
|
| #define | PBL_NVMEM_INIT(sym, _name, _init, _parent, _ops, _size, _word_size, _stride) |
| | Initializer of a struct pbl_nvmem, for providers.
|
| |
Interface for non-volatile memory drivers.
A driver embeds a struct pbl_nvmem in its instance, sets it up with PBL_DEVICE_STATE_DEFINE() and PBL_NVMEM_INIT(), and implements the struct pbl_nvmem_ops the class calls.
◆ pbl_nvmem
| Data Fields |
|
struct pbl_device |
dev |
Device. |
|
const struct pbl_nvmem_ops * |
ops |
Operations. |
|
size_t |
size |
Size in bytes. |
|
uint8_t |
stride |
Minimum read alignment in bytes. |
|
uint8_t |
word_size |
Minimum read size in bytes; reads are a multiple of it. |
◆ PBL_NVMEM_INIT
| #define PBL_NVMEM_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_init, |
|
|
|
_parent, |
|
|
|
_ops, |
|
|
|
_size, |
|
|
|
_word_size, |
|
|
|
_stride |
|
) |
| |
Value: { \
.ops = (_ops), \
.size = (_size), \
.word_size = (_word_size), \
.stride = (_stride), \
}
#define PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, _cls)
Initializer for the struct pbl_device of device instance sym, in class _cls.
Definition device.h:153
const struct pbl_device_class pbl_nvmem_class
Class of the non-volatile memories.
Initializer of a struct pbl_nvmem, for providers.
- Parameters
-
| sym | Memory symbol, with its PBL_DEVICE_STATE_DEFINE(). |
| _name | Device name. |
| _init | Device init function, or NULL. |
| _parent | Parent device, or NULL. |
| _ops | Operations. |
| _size | Size in bytes. |
| _word_size | Minimum read size in bytes. |
| _stride | Minimum read alignment in bytes. |
◆ pbl_nvmem_class
Class of the non-volatile memories.