46#ifndef CONFIG_ISL29020_DEFAULT_ADDRESS
47#define CONFIG_ISL29020_DEFAULT_ADDRESS 0x44
int isl29020_init(isl29020_t *dev, const isl29020_params_t *params)
Initialize a new ISL29020 device.
isl29020_mode_t
Possible modes for the ISL29020 sensor.
int isl29020_disable(const isl29020_t *dev)
Disable the given sensor.
int isl29020_enable(const isl29020_t *dev)
Enable the given sensor.
int isl29020_read(const isl29020_t *dev)
Read a lighting value from the sensor, the result is given in lux.
isl29020_range_t
Possible range values for the ISL29020 sensor.
@ ISL29020_MODE_AMBIENT
set sensor to detect ambient light
@ ISL29020_MODE_IR
set sensor to detect infrared light
@ ISL29020_RANGE_64K
set range to 0-64000 lux
@ ISL29020_RANGE_16K
set range to 0-16000 lux
@ ISL29020_RANGE_1K
set range to 0-1000 lux
@ ISL29020_RANGE_4K
set range to 0-4000 lux
uint_fast8_t i2c_t
Default i2c_t type definition.
Low-level I2C peripheral driver interface definition.
Data structure holding the full set of configuration parameters.
isl29020_range_t range
range setting to use
uint8_t addr
address on that bus
isl29020_mode_t mode
measurement mode to use
i2c_t i2c
I2C bus the device is connected to.
Device descriptor for ISL29020 sensors.
isl29020_params_t params
device initialization parameters
float lux_fac
factor to calculate actual lux value