tsl4531x_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  * Copyright (C) 2018 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
23 #ifndef TSL4531X_PARAMS_H
24 #define TSL4531X_PARAMS_H
25 
26 #include "board.h"
27 #include "saul_reg.h"
28 #include "tsl4531x.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 #ifndef TSL4531X_PARAM_I2C_DEV
39 #define TSL4531X_PARAM_I2C_DEV I2C_DEV(0)
40 #endif
41 #ifndef TSL4531X_PARAM_I2C_ADDR
42 #define TSL4531X_PARAM_I2C_ADDR TSL45315_ADDR
43 #endif
44 #ifndef TSL4531X_PARAM_INTEGRATION
45 #define TSL4531X_PARAM_INTEGRATION TSL4531X_INTEGRATE_400MS
46 #endif
47 #ifndef TSL4531X_LOW_POWER_MODE
48 #define TSL4531X_LOW_POWER_MODE (false)
49 #endif
50 #ifndef TSL4531X_PARAM_PARTNO
51 #define TSL4531X_PARAM_PARTNO TSL45315_PARTNO
52 #endif
53 #ifndef TSL4531X_PARAMS
54 #define TSL4531X_PARAMS { .i2c_dev = TSL4531X_PARAM_I2C_DEV, \
55  .i2c_addr = TSL4531X_PARAM_I2C_ADDR, \
56  .integration_time = TSL4531X_PARAM_INTEGRATION, \
57  .low_power_mode = TSL4531X_LOW_POWER_MODE, \
58  .part_number = TSL4531X_PARAM_PARTNO }
59 #endif
60 
61 #ifndef TSL4531X_SAUL_INFO
62 #define TSL4531X_SAUL_INFO { .name = "tsl4531x" }
63 #endif
64 
70 {
71  TSL4531X_PARAMS
72 };
73 
78 {
79  TSL4531X_SAUL_INFO
80 };
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* TSL4531X_PARAMS_H */
87 
tsl4531x_params_t
Device initialization parameters.
Definition: tsl4531x.h:84
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
tsl4531x.h
Device driver for the AMS TSL4531 sensor.
tsl4531x_params
static const tsl4531x_params_t tsl4531x_params[]
Configure TSL4531x.
Definition: tsl4531x_params.h:69
saul_reg.h
SAUL registry interface definition.
tsl4531x_saul_info
saul_reg_info_t tsl4531x_saul_info[]
Allocate and configure entries to the SAUL registry.
Definition: tsl4531x_params.h:77