Go to the documentation of this file.
38 #define TSL2561_ADDR_LOW (0x29)
39 #define TSL2561_ADDR_FLOAT (0x39)
40 #define TSL2561_ADDR_HIGH (0x49)
47 #define TSL2561_INTEGRATIONTIME_13MS (0x00)
48 #define TSL2561_INTEGRATIONTIME_101MS (0x01)
49 #define TSL2561_INTEGRATIONTIME_402MS (0x02)
50 #define TSL2561_INTEGRATIONTIME_NA (0x03)
57 #define TSL2561_GAIN_1X (0x00)
58 #define TSL2561_GAIN_16X (0x10)
65 #define TSL2561_OK (0)
66 #define TSL2561_NOI2C (-1)
67 #define TSL2561_BADDEV (-2)
uint8_t addr
address on I2C bus
uint8_t integration
integration time
uint16_t tsl2561_read_illuminance(const tsl2561_t *dev)
Read illuminance value from the given TSL2561 device, returned in lx.
tsl2561_params_t params
device initialization parameters
unsigned int i2c_t
Default i2c_t type definition.
int tsl2561_init(tsl2561_t *dev, const tsl2561_params_t *params)
Initialize the given TSL2561 device.
i2c_t i2c_dev
I2C device which is used.
Definition of the generic [S]ensor [A]ctuator [U]ber [L]ayer.
Device initialization parameters.
Low-level I2C peripheral driver interface definition.
Device descriptor for the TSL2561 sensor.