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