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
9#pragma once
10
26
27#include "saul.h"
28#include "periph/i2c.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
37typedef enum {
38 SI114X_OK,
39 SI114X_ERR_I2C,
40 SI114X_ERR_NODEV
42
63
71
75typedef struct {
77} si114x_t;
78
89int8_t si114x_init(si114x_t *dev, const si114x_params_t * params);
90
98uint16_t si114x_read_uv(si114x_t *dev);
99
108
117
127
136
137#ifdef __cplusplus
138}
139#endif
140
Definition of the generic [S]ensor [A]ctuator [U]ber [L]ayer.
uint_fast8_t i2c_t
Default i2c_t type definition.
Definition i2c.h:144
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:37
si114x_led_current_t
Active LED current parameters.
Definition si114x.h:46
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:48
@ SI114X_PS_LED9
157mA
Definition si114x.h:55
@ SI114X_PS_LED4
45mA
Definition si114x.h:50
@ SI114X_PS_LED15
359mA
Definition si114x.h:61
@ SI114X_PS_LED11
202mA
Definition si114x.h:57
@ SI114X_PS_LED6
90mA
Definition si114x.h:52
@ SI114X_PS_LED1
5.6mA
Definition si114x.h:47
@ SI114X_PS_LED3
22.4mA
Definition si114x.h:49
@ SI114X_PS_LED14
314mA
Definition si114x.h:60
@ SI114X_PS_LED8
135mA
Definition si114x.h:54
@ SI114X_PS_LED13
269mA
Definition si114x.h:59
@ SI114X_PS_LED5
67mA
Definition si114x.h:51
@ SI114X_PS_LED10
180mA
Definition si114x.h:56
@ SI114X_PS_LED7
112mA
Definition si114x.h:53
@ SI114X_PS_LED12
224mA
Definition si114x.h:58
Low-level I2C peripheral driver interface definition.
Device initialization parameters.
Definition si114x.h:67
i2c_t i2c_dev
I2C device which is used.
Definition si114x.h:68
si114x_led_current_t led_current
Proximity LED current.
Definition si114x.h:69
Device descriptor for the Si114x sensor.
Definition si114x.h:75
si114x_params_t params
Si114x initialization parameters.
Definition si114x.h:76