isl29020_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef ISL29020_PARAMS_H
20 #define ISL29020_PARAMS_H
21 
22 #include "board.h"
23 #include "isl29020.h"
24 #include "saul_reg.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #ifndef ISL29020_PARAM_I2C
35 #define ISL29020_PARAM_I2C I2C_DEV(0)
36 #endif
37 #ifndef ISL29020_PARAM_ADDR
38 #define ISL29020_PARAM_ADDR (CONFIG_ISL29020_DEFAULT_ADDRESS)
39 #endif
40 #ifndef ISL29020_PARAM_RANGE
41 #define ISL29020_PARAM_RANGE (ISL29020_RANGE_16K)
42 #endif
43 #ifndef ISL29020_PARAM_MODE
44 #define ISL29020_PARAM_MODE (ISL29020_MODE_AMBIENT)
45 #endif
46 
47 #ifndef ISL29020_PARAMS
48 #define ISL29020_PARAMS { .i2c = ISL29020_PARAM_I2C, \
49  .addr = ISL29020_PARAM_ADDR, \
50  .range = ISL29020_PARAM_RANGE, \
51  .mode = ISL29020_PARAM_MODE }
52 #endif
53 #ifndef ISL29020_SAUL_INFO
54 #define ISL29020_SAUL_INFO { .name = "isl29020" }
55 #endif
56 
62 {
63  ISL29020_PARAMS
64 };
65 
70 {
71  ISL29020_SAUL_INFO
72 };
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* ISL29020_PARAMS_H */
79 
isl29020.h
Device driver interface for the ISL29020 light sensor.
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
isl29020_params_t
Data structure holding the full set of configuration parameters.
Definition: isl29020.h:72
saul_reg.h
SAUL registry interface definition.
isl29020_saul_info
static const saul_reg_info_t isl29020_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: isl29020_params.h:69
isl29020_params
static const isl29020_params_t isl29020_params[]
Allocate some memory to store the actual configuration.
Definition: isl29020_params.h:61