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 
10 #pragma once
11 
25 #include "board.h"
26 #include "saul_reg.h"
27 #include "tsl4531x.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #ifndef TSL4531X_PARAM_I2C_DEV
38 #define TSL4531X_PARAM_I2C_DEV I2C_DEV(0)
39 #endif
40 #ifndef TSL4531X_PARAM_I2C_ADDR
41 #define TSL4531X_PARAM_I2C_ADDR TSL45315_ADDR
42 #endif
43 #ifndef TSL4531X_PARAM_INTEGRATION
44 #define TSL4531X_PARAM_INTEGRATION TSL4531X_INTEGRATE_400MS
45 #endif
46 #ifndef TSL4531X_LOW_POWER_MODE
47 #define TSL4531X_LOW_POWER_MODE (false)
48 #endif
49 #ifndef TSL4531X_PARAM_PARTNO
50 #define TSL4531X_PARAM_PARTNO TSL45315_PARTNO
51 #endif
52 #ifndef TSL4531X_PARAMS
53 #define TSL4531X_PARAMS { .i2c_dev = TSL4531X_PARAM_I2C_DEV, \
54  .i2c_addr = TSL4531X_PARAM_I2C_ADDR, \
55  .integration_time = TSL4531X_PARAM_INTEGRATION, \
56  .low_power_mode = TSL4531X_LOW_POWER_MODE, \
57  .part_number = TSL4531X_PARAM_PARTNO }
58 #endif
59 
60 #ifndef TSL4531X_SAUL_INFO
61 #define TSL4531X_SAUL_INFO { .name = "tsl4531x" }
62 #endif
69 {
70  TSL4531X_PARAMS
71 };
72 
77 {
78  TSL4531X_SAUL_INFO
79 };
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
SAUL registry interface definition.
Additional data to collect for each entry.
Definition: saul_reg.h:48
Device initialization parameters.
Definition: tsl4531x.h:83
Device driver for the AMS TSL4531 sensor.
static const tsl4531x_params_t tsl4531x_params[]
Configure TSL4531x.
saul_reg_info_t tsl4531x_saul_info[]
Allocate and configure entries to the SAUL registry.