Loading...
Searching...
No Matches
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
19#ifndef TSL2561_PARAMS_H
20#define TSL2561_PARAMS_H
21
22#include "board.h"
23#include "saul_reg.h"
24#include "tsl2561.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef TSL2561_PARAM_I2C_DEV
35#define TSL2561_PARAM_I2C_DEV I2C_DEV(0)
36#endif
37#ifndef TSL2561_PARAM_ADDR
38#define TSL2561_PARAM_ADDR TSL2561_ADDR_FLOAT
39#endif
40#ifndef TSL2561_PARAM_GAIN
41#define TSL2561_PARAM_GAIN TSL2561_GAIN_1X
42#endif
43#ifndef TSL2561_PARAM_INTEGRATION
44#define TSL2561_PARAM_INTEGRATION TSL2561_INTEGRATIONTIME_402MS
45#endif
46
47#ifndef TSL2561_PARAMS
48#define TSL2561_PARAMS { .i2c_dev = TSL2561_PARAM_I2C_DEV, \
49 .addr = TSL2561_PARAM_ADDR, \
50 .gain = TSL2561_PARAM_GAIN, \
51 .integration = TSL2561_PARAM_INTEGRATION }
52#endif
53#ifndef TSL2561_SAUL_INFO
54#define TSL2561_SAUL_INFO { .name= "tsl2561" }
55#endif
62{
63 TSL2561_PARAMS
64};
65
70{
71 TSL2561_SAUL_INFO
72};
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* TSL2561_PARAMS_H */
SAUL registry interface definition.
Additional data to collect for each entry.
Definition saul_reg.h:49
Device initialization parameters.
Definition tsl2561.h:73
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.