|
PebbleOS
|
TI OPT3001 Ambient light sensor driver. More...
Data Structures | |
| struct | pbl_opt3001 |
| OPT3001 ambient light sensor. More... | |
Macros | |
| #define | PBL_OPT3001_DEFINE(sym, _bus, _addr, _scale, ...) |
| Define an OPT3001. | |
TI OPT3001 Ambient light sensor driver.
| struct pbl_opt3001 |
OPT3001 ambient light sensor.
| Data Fields | ||
|---|---|---|
| struct pbl_als | als | Ambient light sensor, child of the I2C bus. |
| bool | always_on | Convert continuously instead of once per read. |
| struct pbl_i2c_dev | i2c | I2C device. |
| #define PBL_OPT3001_DEFINE | ( | sym, | |
| _bus, | |||
| _addr, | |||
| _scale, | |||
| ... | |||
| ) |
Define an OPT3001.
| sym | Symbol of the instance; the sensor is sym.als. |
| _bus | I2C bus. |
| _addr | 7-bit I2C address. |
| _scale | Lux calibration (const struct pbl_als_scale *), or nullptr. |
| ... | Designated initializers of the remaining fields: always_on. |