isl29125_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universität Berlin
3  * Copyright (C) 2018 HAW-Hamburg
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 
23 #include "board.h"
24 #include "isl29125.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #ifndef ISL29125_PARAM_I2C
35 #define ISL29125_PARAM_I2C I2C_DEV(0)
36 #endif
37 #ifndef ISL29125_PARAM_GPIO
38 #define ISL29125_PARAM_GPIO (GPIO_PIN(0, 0))
39 #endif
40 #ifndef ISL29125_PARAM_RANGE
41 #define ISL29125_PARAM_RANGE (ISL29125_RANGE_10K)
42 #endif
43 #ifndef ISL29125_PARAM_MODE
44 #define ISL29125_PARAM_MODE (ISL29125_MODE_RGB)
45 #endif
46 #ifndef ISL29125_PARAM_RES
47 #define ISL29125_PARAM_RES (ISL29125_RESOLUTION_16)
48 #endif
49 
50 #ifndef ISL29125_PARAMS
51 #define ISL29125_PARAMS { .i2c = ISL29125_PARAM_I2C, \
52  .gpio = ISL29125_PARAM_GPIO, \
53  .range = ISL29125_PARAM_RANGE, \
54  .mode = ISL29125_PARAM_MODE, \
55  .res = ISL29125_PARAM_RES }
56 #endif
63 {
64  ISL29125_PARAMS
65 };
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
Device driver interface for the ISL29125 RGB light sensor.
static const isl29125_params_t isl29125_params[]
Allocate some memory to store the actual configuration.
Device parameters for ISL29125 sensors.
Definition: isl29125.h:104