Backlight driver driving the LED with a PWM output.
More...
Backlight driver driving the LED with a PWM output.
The duty cycle follows the brightness linearly, full brightness being 100%: a lower ceiling for the product is set above, e.g. by CONFIG_SERVICE_LIGHT_BACKLIGHT_ON_PERCENT.
#define PBL_BACKLIGHT_PWM_DEFINE(sym, _name, _enable,...)
Define a PWM backlight.
Definition pwm.h:51
Backlight.
Definition backlight.h:80
const struct pbl_backlight *const BACKLIGHT
The board's backlight.
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:158
#define PBL_PWM_HZ(hz)
Period of a hz Hz output, in nanoseconds.
Definition pwm.h:51
#define PBL_PWM(_ctrl, _channel, _period, _flags)
Initializer for a struct pbl_pwm.
Definition pwm.h:96
◆ pbl_backlight_pwm
| Data Fields |
|
struct pbl_backlight |
backlight |
Backlight. |
|
struct pbl_gpio |
enable |
Optional enable output, active while the backlight is on. |
|
struct pbl_pwm |
pwm |
PWM output, with the period to run it at. |
◆ PBL_BACKLIGHT_PWM_DEFINE
| #define PBL_BACKLIGHT_PWM_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_enable, |
|
|
|
... |
|
) |
| |
Value:
.enable = _enable, .pwm = __VA_ARGS__, \
}
PWM backlight.
Definition pwm.h:30
#define PBL_BACKLIGHT_INIT(sym, _name, _parent, _ops)
Initialize a struct pbl_backlight.
Definition backlight.h:117
#define PBL_BACKLIGHT_STATE_DEFINE(sym)
Define the class state of a backlight.
Definition backlight.h:102
Define a PWM backlight.
- Parameters
-
| sym | Symbol of the backlight. |
| _name | Name. |
| _enable | Enable output, from PBL_GPIO(), or unconnected. |
| ... | PWM output, from PBL_PWM(), with the period to run it at. |