Interface for backlight drivers.
More...
Interface for backlight drivers.
A driver embeds a struct pbl_backlight in its instance, sets it up with PBL_BACKLIGHT_STATE_DEFINE() and PBL_BACKLIGHT_INIT(), and implements the struct pbl_backlight_ops the class calls.
◆ pbl_backlight_state
| struct pbl_backlight_state |
◆ pbl_backlight
◆ PBL_BACKLIGHT_INIT
| #define PBL_BACKLIGHT_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_parent, |
|
|
|
_ops |
|
) |
| |
Value: { \
.dev = \
PBL_DEVICE_INIT_CLASS(sym, _name, pbl_backlight_dev_init, _parent, &pbl_backlight_class), \
.ops = (_ops), \
.state = &sym##_backlight_state, \
}
Initialize a struct pbl_backlight.
- Parameters
-
◆ PBL_BACKLIGHT_STATE_DEFINE
| #define PBL_BACKLIGHT_STATE_DEFINE |
( |
|
sym | ) |
|
Value:
}
struct pbl_mutex lock
Device lock.
Definition driver.h:43
Backlight runtime state.
Definition driver.h:41
#define BACKLIGHT_COLOR_WARM_WHITE
Warm white.
Definition backlight.h:43
#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
Define the class state of a backlight.
- Parameters
-
| sym | Symbol of the instance. |