Loading...
Searching...
No Matches
isl29020_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "isl29020.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef ISL29020_PARAM_I2C
31#define ISL29020_PARAM_I2C I2C_DEV(0)
32#endif
33#ifndef ISL29020_PARAM_ADDR
34#define ISL29020_PARAM_ADDR (CONFIG_ISL29020_DEFAULT_ADDRESS)
35#endif
36#ifndef ISL29020_PARAM_RANGE
37#define ISL29020_PARAM_RANGE (ISL29020_RANGE_16K)
38#endif
39#ifndef ISL29020_PARAM_MODE
40#define ISL29020_PARAM_MODE (ISL29020_MODE_AMBIENT)
41#endif
42
43#ifndef ISL29020_PARAMS
44#define ISL29020_PARAMS { .i2c = ISL29020_PARAM_I2C, \
45 .addr = ISL29020_PARAM_ADDR, \
46 .range = ISL29020_PARAM_RANGE, \
47 .mode = ISL29020_PARAM_MODE }
48#endif
49#ifndef ISL29020_SAUL_INFO
50#define ISL29020_SAUL_INFO { .name = "isl29020" }
51#endif
53
58{
59 ISL29020_PARAMS
60};
61
66{
67 ISL29020_SAUL_INFO
68};
69
70#ifdef __cplusplus
71}
72#endif
73
Device driver interface for the ISL29020 light sensor.
static const isl29020_params_t isl29020_params[]
Allocate some memory to store the actual configuration.
static const saul_reg_info_t isl29020_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
Data structure holding the full set of configuration parameters.
Definition isl29020.h:68
Additional data to collect for each entry.
Definition saul_reg.h:48