Loading...
Searching...
No Matches
si114x.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2018 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
25#ifndef SI114X_H
26#define SI114X_H
27
28#include "saul.h"
29#include "periph/i2c.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
38typedef enum {
39 SI114X_OK,
40 SI114X_ERR_I2C,
41 SI114X_ERR_NODEV
43
64
72
76typedef struct {
78} si114x_t;
79
90int8_t si114x_init(si114x_t *dev, const si114x_params_t * params);
91
99uint16_t si114x_read_uv(si114x_t *dev);
100
109
118
128
137
138#ifdef __cplusplus
139}
140#endif
141
142#endif /* SI114X_H */
uint_fast8_t i2c_t
Default i2c_t type definition.
Definition i2c.h:151
uint16_t si114x_read_distance(si114x_t *dev)
Read distance measure from the given Si114x device, returned in ADC counts.
uint16_t si114x_read_visible(si114x_t *dev)
Read visible light value from the given Si114x device, returned in lx.
si114x_ret_code_t
Initialization return codes.
Definition si114x.h:38
si114x_led_current_t
Active LED current parameters.
Definition si114x.h:47
int8_t si114x_init(si114x_t *dev, const si114x_params_t *params)
Initialize the given Si114x device.
uint8_t si114x_read_response(si114x_t *dev)
Read the response register.
uint16_t si114x_read_ir(si114x_t *dev)
Read IR light value from the given Si114x device, returned in lx.
uint16_t si114x_read_uv(si114x_t *dev)
Read UV index from the given Si114x device.
@ SI114X_PS_LED2
11.2mA
Definition si114x.h:49
@ SI114X_PS_LED9
157mA
Definition si114x.h:56
@ SI114X_PS_LED4
45mA
Definition si114x.h:51
@ SI114X_PS_LED15
359mA
Definition si114x.h:62
@ SI114X_PS_LED11
202mA
Definition si114x.h:58
@ SI114X_PS_LED6
90mA
Definition si114x.h:53
@ SI114X_PS_LED1
5.6mA
Definition si114x.h:48
@ SI114X_PS_LED3
22.4mA
Definition si114x.h:50
@ SI114X_PS_LED14
314mA
Definition si114x.h:61
@ SI114X_PS_LED8
135mA
Definition si114x.h:55
@ SI114X_PS_LED13
269mA
Definition si114x.h:60
@ SI114X_PS_LED5
67mA
Definition si114x.h:52
@ SI114X_PS_LED10
180mA
Definition si114x.h:57
@ SI114X_PS_LED7
112mA
Definition si114x.h:54
@ SI114X_PS_LED12
224mA
Definition si114x.h:59
Low-level I2C peripheral driver interface definition.
Device initialization parameters.
Definition si114x.h:68
i2c_t i2c_dev
I2C device which is used.
Definition si114x.h:69
si114x_led_current_t led_current
Proximity LED current.
Definition si114x.h:70
Device descriptor for the Si114x sensor.
Definition si114x.h:76
si114x_params_t params
Si114x initialization parameters.
Definition si114x.h:77
Functionality for reading [S]ensor [A]ctuator [U]ber [L]ayer sensors as SenML.