Interface for reset cause drivers.
More...
Interface for reset cause drivers.
A driver embeds a struct pbl_reset_cause in its instance, sets it up with PBL_RESET_CAUSE_STATE_DEFINE() and PBL_RESET_CAUSE_INIT(), and implements the struct pbl_reset_cause_ops the class calls.
◆ pbl_reset_cause
◆ PBL_RESET_CAUSE_INIT
| #define PBL_RESET_CAUSE_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_parent, |
|
|
|
_ops |
|
) |
| |
Value: { \
&pbl_reset_cause_class), \
.ops = (_ops), \
.causes = &sym##_reset_causes, \
}
#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
Initialize a struct pbl_reset_cause.
- Parameters
-
◆ PBL_RESET_CAUSE_STATE_DEFINE
| #define PBL_RESET_CAUSE_STATE_DEFINE |
( |
|
sym | ) |
|
Value:
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:132
uint32_t pbl_reset_cause_t
Reset causes, as PBL_RESET_CAUSE_* flags.
Definition reset_cause.h:31
Define the class state of a reset cause.
- Parameters
-
| sym | Symbol of the instance. |