Loading...
Searching...
No Matches
si114x.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2018 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
23
24#include "saul.h"
25#include "periph/i2c.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34typedef enum {
35 SI114X_OK,
36 SI114X_ERR_I2C,
37 SI114X_ERR_NODEV
39
60
68
72typedef struct {
74} si114x_t;
75
86int8_t si114x_init(si114x_t *dev, const si114x_params_t * params);
87
95uint16_t si114x_read_uv(si114x_t *dev);
96
105
114
124
133
134#ifdef __cplusplus
135}
136#endif
137
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:155
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:34
si114x_led_current_t
Active LED current parameters.
Definition si114x.h:43
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:45
@ SI114X_PS_LED9
157mA
Definition si114x.h:52
@ SI114X_PS_LED4
45mA
Definition si114x.h:47
@ SI114X_PS_LED15
359mA
Definition si114x.h:58
@ SI114X_PS_LED11
202mA
Definition si114x.h:54
@ SI114X_PS_LED6
90mA
Definition si114x.h:49
@ SI114X_PS_LED1
5.6mA
Definition si114x.h:44
@ SI114X_PS_LED3
22.4mA
Definition si114x.h:46
@ SI114X_PS_LED14
314mA
Definition si114x.h:57
@ SI114X_PS_LED8
135mA
Definition si114x.h:51
@ SI114X_PS_LED13
269mA
Definition si114x.h:56
@ SI114X_PS_LED5
67mA
Definition si114x.h:48
@ SI114X_PS_LED10
180mA
Definition si114x.h:53
@ SI114X_PS_LED7
112mA
Definition si114x.h:50
@ SI114X_PS_LED12
224mA
Definition si114x.h:55
Low-level I2C peripheral driver interface definition.
Device initialization parameters.
Definition si114x.h:64
i2c_t i2c_dev
I2C device which is used.
Definition si114x.h:65
si114x_led_current_t led_current
Proximity LED current.
Definition si114x.h:66
Device descriptor for the Si114x sensor.
Definition si114x.h:72
si114x_params_t params
Si114x initialization parameters.
Definition si114x.h:73