tsl2561_params.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 
21 #include "board.h"
22 #include "saul_reg.h"
23 #include "tsl2561.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef TSL2561_PARAM_I2C_DEV
34 #define TSL2561_PARAM_I2C_DEV I2C_DEV(0)
35 #endif
36 #ifndef TSL2561_PARAM_ADDR
37 #define TSL2561_PARAM_ADDR TSL2561_ADDR_FLOAT
38 #endif
39 #ifndef TSL2561_PARAM_GAIN
40 #define TSL2561_PARAM_GAIN TSL2561_GAIN_1X
41 #endif
42 #ifndef TSL2561_PARAM_INTEGRATION
43 #define TSL2561_PARAM_INTEGRATION TSL2561_INTEGRATIONTIME_402MS
44 #endif
45 
46 #ifndef TSL2561_PARAMS
47 #define TSL2561_PARAMS { .i2c_dev = TSL2561_PARAM_I2C_DEV, \
48  .addr = TSL2561_PARAM_ADDR, \
49  .gain = TSL2561_PARAM_GAIN, \
50  .integration = TSL2561_PARAM_INTEGRATION }
51 #endif
52 #ifndef TSL2561_SAUL_INFO
53 #define TSL2561_SAUL_INFO { .name= "tsl2561" }
54 #endif
61 {
62  TSL2561_PARAMS
63 };
64 
69 {
70  TSL2561_SAUL_INFO
71 };
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
SAUL registry interface definition.
Additional data to collect for each entry.
Definition: saul_reg.h:48
Device initialization parameters.
Definition: tsl2561.h:72
Device driver interface for the illuminance TSL2561 sensor.
static const tsl2561_params_t tsl2561_params[]
Configure TSL2561.
saul_reg_info_t tsl2561_saul_info[]
Allocate and configure entries to the SAUL registry.