Loading...
Searching...
No Matches
tsl4531x_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Inria
3 * SPDX-FileCopyrightText: 2018 Freie Universität Berlin
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
21
22#include "board.h"
23#include "saul_reg.h"
24#include "tsl4531x.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef TSL4531X_PARAM_I2C_DEV
35#define TSL4531X_PARAM_I2C_DEV I2C_DEV(0)
36#endif
37#ifndef TSL4531X_PARAM_I2C_ADDR
38#define TSL4531X_PARAM_I2C_ADDR TSL45315_ADDR
39#endif
40#ifndef TSL4531X_PARAM_INTEGRATION
41#define TSL4531X_PARAM_INTEGRATION TSL4531X_INTEGRATE_400MS
42#endif
43#ifndef TSL4531X_LOW_POWER_MODE
44#define TSL4531X_LOW_POWER_MODE (false)
45#endif
46#ifndef TSL4531X_PARAM_PARTNO
47#define TSL4531X_PARAM_PARTNO TSL45315_PARTNO
48#endif
49#ifndef TSL4531X_PARAMS
50#define TSL4531X_PARAMS { .i2c_dev = TSL4531X_PARAM_I2C_DEV, \
51 .i2c_addr = TSL4531X_PARAM_I2C_ADDR, \
52 .integration_time = TSL4531X_PARAM_INTEGRATION, \
53 .low_power_mode = TSL4531X_LOW_POWER_MODE, \
54 .part_number = TSL4531X_PARAM_PARTNO }
55#endif
56
57#ifndef TSL4531X_SAUL_INFO
58#define TSL4531X_SAUL_INFO { .name = "tsl4531x" }
59#endif
61
66{
67 TSL4531X_PARAMS
68};
69
74{
75 TSL4531X_SAUL_INFO
76};
77
78#ifdef __cplusplus
79}
80#endif
81
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.