PebbleOS v4.47.0
Loading...
Searching...
No Matches
AW2016

Awinic AW2016 RGB LED controller, driving one multicolor LED on its three channels. More...

Data Structures

struct  pbl_aw2016
 AW2016 RGB LED controller. More...
 

Macros

#define PBL_AW2016_DEFINE(sym, _bus, _addr)
 Define an AW2016 and its LED.
 

Detailed Description

Awinic AW2016 RGB LED controller, driving one multicolor LED on its three channels.

The chip is shut down while the LED is off.


Data Structure Documentation

◆ pbl_aw2016

struct 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.

Macro Definition Documentation

◆ PBL_AW2016_DEFINE

#define PBL_AW2016_DEFINE (   sym,
  _bus,
  _addr 
)
Value:
static struct pbl_aw2016_state sym##_aw2016_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_aw2016, struct pbl_led, led) { \
.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
LED.
Definition led.h:34
#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
symSymbol of the LED.
_busI2C bus.
_addr7-bit I2C address.