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 
9 #pragma once
10 
26 #include "saul.h"
27 #include "periph/i2c.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
42 
46 enum {
49 };
50 
54 typedef struct {
58 
62 typedef struct {
64 } veml6070_t;
65 
75 int veml6070_init(veml6070_t *dev, const veml6070_params_t * params);
76 
84 uint16_t veml6070_read_uv(const veml6070_t *dev);
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
uint_fast8_t i2c_t
Default i2c_t type definition.
Definition: i2c.h:144
int veml6070_init(veml6070_t *dev, const veml6070_params_t *params)
Initialize the given VEML6070 device.
veml6070_integrationtime
Integration times.
Definition: veml6070.h:36
uint16_t veml6070_read_uv(const veml6070_t *dev)
Read UV index from the given VEML6070 device.
enum veml6070_integrationtime veml6070_itime_t
Integration times.
@ VEML6070_1_T
1 T integration time
Definition: veml6070.h:38
@ VEML6070_4_T
4 T integration time
Definition: veml6070.h:40
@ VEML6070_HALF_T
1/2 T integration time
Definition: veml6070.h:37
@ VEML6070_2_T
2 T integration time
Definition: veml6070.h:39
@ VEML6070_ERR_I2C
Error initializing the I2C bus.
Definition: veml6070.h:48
@ VEML6070_OK
Everything was fine.
Definition: veml6070.h:47
Low-level I2C peripheral driver interface definition.
Device initialization parameters.
Definition: veml6070.h:54
i2c_t i2c_dev
I2C device which is used.
Definition: veml6070.h:55
veml6070_itime_t itime
Integration time.
Definition: veml6070.h:56
Device descriptor for the VEML6070 sensor.
Definition: veml6070.h:62
veml6070_params_t params
Device parameters.
Definition: veml6070.h:63
Functionality for reading [S]ensor [A]ctuator [U]ber [L]ayer sensors as SenML.