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