|
PebbleOS v4.47.0-1362-gd278268fe
|
Interface for hardware spinlock controller drivers. More...
Data Structures | |
| struct | pbl_hwspinlock_controller_ops |
| Hardware spinlock controller driver operations, called with interrupts locked. More... | |
| struct | pbl_hwspinlock_controller |
| A hardware spinlock controller. More... | |
Macros | |
| #define | PBL_HWSPINLOCK_CONTROLLER_STATE_DEFINE(sym) PBL_DEVICE_STATE_DEFINE(sym) |
Define the class state of hardware spinlock controller sym, for the driver's define macro. | |
| #define | PBL_HWSPINLOCK_CONTROLLER_INIT(sym, _name, _init, _parent, _ops, _num_locks) |
Initializer for the struct pbl_hwspinlock_controller of controller sym. | |
Interface for hardware spinlock controller drivers.
A driver embeds a struct pbl_hwspinlock_controller in its instance, sets it up with PBL_HWSPINLOCK_CONTROLLER_STATE_DEFINE() and PBL_HWSPINLOCK_CONTROLLER_INIT(), and implements the struct pbl_hwspinlock_controller_ops the class calls.
| struct pbl_hwspinlock_controller |
A hardware spinlock controller.
| Data Fields | ||
|---|---|---|
| struct pbl_device | dev | Device. |
| uint16_t | num_locks | Number of locks. |
| const struct pbl_hwspinlock_controller_ops * | ops | Driver operations. |
| #define PBL_HWSPINLOCK_CONTROLLER_INIT | ( | sym, | |
| _name, | |||
| _init, | |||
| _parent, | |||
| _ops, | |||
| _num_locks | |||
| ) |
Initializer for the struct pbl_hwspinlock_controller of controller sym.
| sym | Symbol of the controller instance, with its state defined by PBL_HWSPINLOCK_CONTROLLER_STATE_DEFINE(). |
| _name | Name. |
| _init | Device init function, or NULL. |
| _parent | Parent device, or NULL. |
| _ops | Driver operations. |
| _num_locks | Number of locks. |
| #define PBL_HWSPINLOCK_CONTROLLER_STATE_DEFINE | ( | sym | ) | PBL_DEVICE_STATE_DEFINE(sym) |
Define the class state of hardware spinlock controller sym, for the driver's define macro.
| sym | Symbol of the controller instance. |