adcxx1c_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 OTA keys S.A.
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 
20 #ifndef ADCXX1C_PARAMS_H
21 #define ADCXX1C_PARAMS_H
22 
23 #include "board.h"
24 #include "saul_reg.h"
25 #include "adcxx1c.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
39 #ifndef ADCXX1C_PARAM_I2C
40 #define ADCXX1C_PARAM_I2C (I2C_DEV(0))
41 #endif
42 
44 #ifndef ADCXX1C_PARAM_ADDR
45 #define ADCXX1C_PARAM_ADDR (ADCXX1C_I2C_ADDRESS)
46 #endif
47 
49 #ifndef ADCXX1C_PARAM_BITS
50 #define ADCXX1C_PARAM_BITS (ADCXX1C_RES_DEFAULT)
51 #endif
52 
54 #ifndef ADCXX1C_PARAM_CYCLE
55 #define ADCXX1C_PARAM_CYCLE (ADCXX1C_CYCLE_DISABLED)
56 #endif
57 
59 #ifndef ADCXX1C_PARAM_ALERT_PIN
60 #define ADCXX1C_PARAM_ALERT_PIN (GPIO_UNDEF)
61 #endif
62 
64 #ifndef ADCXX1C_PARAM_LOW_LIMIT
65 #define ADCXX1C_PARAM_LOW_LIMIT (0)
66 #endif
67 
69 #ifndef ADCXX1C_PARAM_HIGH_LIMIT
70 #define ADCXX1C_PARAM_HIGH_LIMIT (0)
71 #endif
72 
74 #ifndef ADCXX1C_PARAM_HYSTERESIS
75 #define ADCXX1C_PARAM_HYSTERESIS (0)
76 #endif
77 
82 #ifndef ADCXX1C_PARAMS
83 #define ADCXX1C_PARAMS { .i2c = ADCXX1C_PARAM_I2C, \
84  .addr = ADCXX1C_PARAM_ADDR, \
85  .bits = ADCXX1C_PARAM_BITS, \
86  .cycle = ADCXX1C_PARAM_CYCLE, \
87  .alert_pin = ADCXX1C_PARAM_ALERT_PIN, \
88  .low_limit = ADCXX1C_PARAM_LOW_LIMIT, \
89  .high_limit = ADCXX1C_PARAM_HIGH_LIMIT, \
90  .hysteresis = ADCXX1C_PARAM_HYSTERESIS }
91 #endif
92 
96 #ifndef ADCXX1C_SAUL_INFO
97 #define ADCXX1C_SAUL_INFO { .name = "adcxx1c" }
98 #endif
99 
104 {
106 };
107 
108 
113 {
115 };
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* ADCXX1C_PARAMS_H */
ADCXX1C_SAUL_INFO
#define ADCXX1C_SAUL_INFO
ADCXX1C driver SAUL registry information structures.
Definition: adcxx1c_params.h:97
adcxx1c_params
ADCxx1C params.
Definition: adcxx1c.h:101
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
adcxx1c_saul_info
static const saul_reg_info_t adcxx1c_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: adcxx1c_params.h:112
ADCXX1C_PARAMS
#define ADCXX1C_PARAMS
ADCXX1C driver configuration structures.
Definition: adcxx1c_params.h:83
saul_reg.h
SAUL registry interface definition.
adcxx1c.h
ADCXX1C ADC device driver.