VEML6070 UV sensor

Device driver interface for the VEML6070 UV sensor.

This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.

enum veml6070_integrationtime
VEML6070_HALF_T = 0
1/2 T integration time
VEML6070_1_T
1 T integration time
VEML6070_2_T
2 T integration time
VEML6070_4_T
4 T integration time
enum @171
VEML6070_OK = 0
Everything was fine.
VEML6070_ERR_I2C
Error initializing the I2C bus.
enum veml6070.h::veml6070_integrationtime veml6070_itime_t

Integration times.

int veml6070_init(veml6070_t * dev, const veml6070_params_t * params)

Initialize the given VEML6070 device.

Parameters

dev:Initialized device descriptor of VEML6070 device
params:The parameters for the VEML6070 device (integration time)

Return values

  • VEML6070_OK on success
  • VEML6070_ERR_I2C if given I2C is not enabled in board config
uint16_t veml6070_read_uv(const veml6070_t * dev)

Read UV index from the given VEML6070 device.

Parameters

dev:Device descriptor of VEML6070 device to read from

Return values

  • UV index
struct veml6070_params_t

Device initialization parameters.

i2c.h::i2c_t i2c_dev

I2C device which is used.

veml6070.h::veml6070_itime_t itime

Integration time.

struct veml6070_t

Device descriptor for the VEML6070 sensor.

veml6070_params_t params

Device parameters.