Awinic AW2016 RGB LED controller, driving one multicolor LED on its three channels.
More...
Awinic AW2016 RGB LED controller, driving one multicolor LED on its three channels.
The chip is shut down while the LED is off.
◆ pbl_aw2016
AW2016 RGB LED controller.
| Data Fields |
|
struct pbl_i2c_dev |
i2c |
I2C device. |
|
struct pbl_led |
led |
LED, child of the I2C bus. |
|
struct pbl_aw2016_state * |
state |
Runtime state. |
◆ PBL_AW2016_DEFINE
| #define PBL_AW2016_DEFINE |
( |
|
sym, |
|
|
|
_bus, |
|
|
|
_addr |
|
) |
| |
Value:
static struct pbl_aw2016_state sym##_aw2016_state; \
.led =
PBL_LED_INIT(sym,
"aw2016", pbl_aw2016_init, &(_bus)->dev, &pbl_aw2016_ops), \
.state = &sym##_aw2016_state, .i2c =
PBL_I2C_DEV(_bus, _addr), \
}
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:131
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:136
AW2016 RGB LED controller.
Definition aw2016.h:26
#define PBL_LED_INIT(sym, _name, _init, _parent, _ops)
Initialize a struct pbl_led.
Definition led.h:54
Define an AW2016 and its LED.
- Parameters
-
| sym | Symbol of the LED. |
| _bus | I2C bus. |
| _addr | 7-bit I2C address. |