uint_fast8_t i2c_t
Default i2c_t type definition.
int vcnl40x0_init(vcnl40x0_t *dev, const vcnl40x0_params_t *params)
Initialize the given VCNL40X0 device.
uint16_t vcnl40x0_read_proximity(const vcnl40x0_t *dev)
Read proximity value from the vcnl40X0 device.
uint16_t vcnl40x0_read_ambient_light(const vcnl40x0_t *dev)
Read ambient light value from the vcnl40X0 device.
uint16_t vcnl40x0_read_illuminance(const vcnl40x0_t *dev)
Read illuminance value from the vcnl40X0 device.
@ VCNL40X0_PROXIMITY_RATE_31
31.25 measurements/s
@ VCNL40X0_PROXIMITY_RATE_2
1.95 measurements/s (default)
@ VCNL40X0_PROXIMITY_RATE_8
7.8125 measurements/s
@ VCNL40X0_PROXIMITY_RATE_62
62.5 measurements/s
@ VCNL40X0_PROXIMITY_RATE_4
3.90625 measurements/s
@ VCNL40X0_PROXIMITY_RATE_16
16.625 measurements/s
@ VCNL40X0_PROXIMITY_RATE_250
250 measurements/s
@ VCNL40X0_PROXIMITY_RATE_125
125 measurements/s
@ VCNL40X0_ERR_NODEV
Error wrong device.
@ VCNL40X0_ERR_I2C
Error initializing the I2C bus.
@ VCNL40X0_OK
Everything was fine.
@ VCNL40X0_AMBIENT_AVERAGE_64
Decimal value 64.
@ VCNL40X0_AMBIENT_AVERAGE_1
Decimal value 1.
@ VCNL40X0_AMBIENT_AVERAGE_128
Decimal value 128.
@ VCNL40X0_AMBIENT_AVERAGE_2
Decimal value 2.
@ VCNL40X0_AMBIENT_AVERAGE_16
Decimal value 16.
@ VCNL40X0_AMBIENT_AVERAGE_8
Decimal value 8.
@ VCNL40X0_AMBIENT_AVERAGE_32
Decimal value 32 (default)
@ VCNL40X0_AMBIENT_AVERAGE_4
Decimal value 4.
@ VCNL40X0_AMBIENT_RATE_2
2 sample/s (default)
@ VCNL40X0_AMBIENT_RATE_6
6 sample/s
@ VCNL40X0_AMBIENT_RATE_3
3 sample/s
@ VCNL40X0_AMBIENT_RATE_8
8 sample/s
@ VCNL40X0_AMBIENT_RATE_10
10 sample/s
@ VCNL40X0_AMBIENT_RATE_4
4 sample/s
@ VCNL40X0_AMBIENT_RATE_5
5 sample/s
@ VCNL40X0_AMBIENT_RATE_1
1 sample/s
Low-level I2C peripheral driver interface definition.
Device initialization parameters.
uint8_t ambient_rate
Ambient light rate.
uint8_t i2c_addr
Address on I2C bus.
uint8_t led_current
LED current.
uint8_t ambient_avg
Ambient light conversion average.
uint8_t proximity_rate
Proximity rate.
i2c_t i2c_dev
I2C device which is used.
Device descriptor for the VCNL40X0 sensor.
vcnl40x0_params_t params
Device parameters.
Functionality for reading [S]ensor [A]ctuator [U]ber [L]ayer sensors as SenML.