32 #ifndef SENSOR_TSL4531_H_
33 #define SENSOR_TSL4531_H_
37 #define TSL4531_I2C_ADDRESS_LEFT 0x29
38 #define TSL4531_I2C_ADDRESS_RIGHT 0x28
40 #define TSL4531_I2C_ADDRESSES \
41 { (TSL4531_I2C_ADDRESS_LEFT), (TSL4531_I2C_ADDRESS_RIGHT) }
43 #define TSL4531_CHANNEL_DEFAULT 0
46 #define TSL4531_ID 162
48 #define TSL4531_COMMAND 0x80
50 #define TSL4531_REG_CONTROL 0x00
51 #define TSL4531_REG_CONFIG 0x01
52 #define TSL4531_REG_DATALOW 0x04
53 #define TSL4531_REG_DATAHIGH 0x05
54 #define TSL4531_REG_ID 0x0A
56 #define TSL4531_SAMPLE_OFF 0x00
57 #define TSL4531_SAMPLE_SINGLE 0x2
58 #define TSL4531_SAMPLE_CONTINUOUS 0x03
60 #define TSL4531_HIGH_POWER 0x08
61 #define TSL4531_LOW_POWER 0x00
63 #define TSL4531_INT_TIME_100 0x02
64 #define TSL4531_INT_TIME_200 0x01
65 #define TSL4531_INT_TIME_400 0x00
67 #define TSL4531_MULT_100 4
68 #define TSL4531_MULT_200 2
69 #define TSL4531_MULT_400 1
86 #define TSL4531_RANGE_LOW_MAX 65000
87 #define TSL4531_RANGE_MEDIUM_MAX 130000
88 #define TSL4531_RANGE_HYSTERESIS 5000
enum tsl4531_range tsl4531_range_t
int32_t tsl4531_get_value(int sensor_identifier, int channel)
int tsl4531_init(int sensor_identifier)
int tsl4531_read(int sensor_identifier)
void tsl4531_deinit(int sensor_identifier)