Loading...
Searching...
No Matches
tsl2561_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "saul_reg.h"
20#include "tsl2561.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef TSL2561_PARAM_I2C_DEV
31#define TSL2561_PARAM_I2C_DEV I2C_DEV(0)
32#endif
33#ifndef TSL2561_PARAM_ADDR
34#define TSL2561_PARAM_ADDR TSL2561_ADDR_FLOAT
35#endif
36#ifndef TSL2561_PARAM_GAIN
37#define TSL2561_PARAM_GAIN TSL2561_GAIN_1X
38#endif
39#ifndef TSL2561_PARAM_INTEGRATION
40#define TSL2561_PARAM_INTEGRATION TSL2561_INTEGRATIONTIME_402MS
41#endif
42
43#ifndef TSL2561_PARAMS
44#define TSL2561_PARAMS { .i2c_dev = TSL2561_PARAM_I2C_DEV, \
45 .addr = TSL2561_PARAM_ADDR, \
46 .gain = TSL2561_PARAM_GAIN, \
47 .integration = TSL2561_PARAM_INTEGRATION }
48#endif
49#ifndef TSL2561_SAUL_INFO
50#define TSL2561_SAUL_INFO { .name= "tsl2561" }
51#endif
53
58{
59 TSL2561_PARAMS
60};
61
66{
67 TSL2561_SAUL_INFO
68};
69
70#ifdef __cplusplus
71}
72#endif
73
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.