veml6070.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
24 #ifndef VEML6070_H
25 #define VEML6070_H
26 
27 #include "saul.h"
28 #include "periph/i2c.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
43 
47 enum {
50 };
51 
55 typedef struct {
59 
63 typedef struct {
65 } veml6070_t;
66 
76 int veml6070_init(veml6070_t *dev, const veml6070_params_t * params);
77 
85 uint16_t veml6070_read_uv(const veml6070_t *dev);
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* VEML6070_H */
92 
VEML6070_HALF_T
@ VEML6070_HALF_T
1/2 T integration time
Definition: veml6070.h:38
veml6070_itime_t
enum veml6070_integrationtime veml6070_itime_t
Integration times.
VEML6070_ERR_I2C
@ VEML6070_ERR_I2C
Error initializing the I2C bus.
Definition: veml6070.h:49
veml6070_params_t::itime
veml6070_itime_t itime
Integration time.
Definition: veml6070.h:57
i2c_t
unsigned int i2c_t
Default i2c_t type definition.
Definition: i2c.h:151
VEML6070_1_T
@ VEML6070_1_T
1 T integration time
Definition: veml6070.h:39
veml6070_init
int veml6070_init(veml6070_t *dev, const veml6070_params_t *params)
Initialize the given VEML6070 device.
VEML6070_OK
@ VEML6070_OK
Everything was fine.
Definition: veml6070.h:48
veml6070_params_t::i2c_dev
i2c_t i2c_dev
I2C device which is used.
Definition: veml6070.h:56
veml6070_params_t
Device initialization parameters.
Definition: veml6070.h:55
veml6070_t
Device descriptor for the VEML6070 sensor.
Definition: veml6070.h:63
VEML6070_2_T
@ VEML6070_2_T
2 T integration time
Definition: veml6070.h:40
veml6070_integrationtime
veml6070_integrationtime
Integration times.
Definition: veml6070.h:37
saul.h
Definition of the generic [S]ensor [A]ctuator [U]ber [L]ayer.
VEML6070_4_T
@ VEML6070_4_T
4 T integration time
Definition: veml6070.h:41
veml6070_read_uv
uint16_t veml6070_read_uv(const veml6070_t *dev)
Read UV index from the given VEML6070 device.
i2c.h
Low-level I2C peripheral driver interface definition.
veml6070_t::params
veml6070_params_t params
Device parameters.
Definition: veml6070.h:64