Interface for RAM drivers.
More...
Interface for RAM drivers.
A driver embeds a struct pbl_ram in its instance, sets it up with PBL_RAM_STATE_DEFINE() and PBL_RAM_INIT(), and implements the struct pbl_ram_ops the class calls.
◆ pbl_ram
| Data Fields |
|
struct pbl_device |
dev |
Device. |
|
const struct pbl_ram_ops * |
ops |
Driver operations. |
|
struct pbl_ram_state * |
state |
Runtime state. |
◆ PBL_RAM_INIT
| #define PBL_RAM_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_parent, |
|
|
|
_ops |
|
) |
| |
Value: { \
.ops = (_ops), \
.state = &sym##_ram_state, \
}
#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
◆ PBL_RAM_STATE_DEFINE
| #define PBL_RAM_STATE_DEFINE |
( |
|
sym | ) |
|
Value:
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:132
#define PBL_MUTEX_INITIALIZER
Static initializer for an unlocked mutex.
Definition mutex.h:50