ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_driver_enabled_modules.h
Go to the documentation of this file.
1
17
#ifndef RUUVI_DRIVER_ENABLED_MODULES_H
18
#define RUUVI_DRIVER_ENABLED_MODULES_H
19
21
#define RUUVI_DRIVERS_SEMVER "3.10.0"
22
23
#ifdef CEEDLING
24
# define ENABLE_DEFAULT 1
25
#elif defined(DOXYGEN)
26
# define ENABLE_DEFAULT 1
27
#elif defined(RUUVI_RUN_TESTS)
28
# define ENABLE_DEFAULT 1
29
#else
30
# define ENABLE_DEFAULT 0
31
#endif
32
33
#ifdef APPLICATION_DRIVER_CONFIGURED
34
#include "app_config.h"
35
#endif
36
37
#ifdef RUUVI_NRF5_SDK15_ENABLED
38
#include "nrf5_sdk15_app_config.h"
39
#endif
40
41
#ifdef RUUVI_FRUITY_ENABLED
42
#include "
fruity_config.h
"
43
#endif
44
45
#ifndef RI_ADV_EXTENDED_ENABLED
46
# define RI_ADV_EXTENDED_ENABLED ENABLE_DEFAULT
47
#endif
48
49
#ifndef RI_COMM_MESSAGE_MAX_LENGTH
52
# if RI_ADV_EXTENDED_ENABLED
53
# define RI_COMM_MESSAGE_MAX_LENGTH 230
54
# else
55
# define RI_COMM_MESSAGE_MAX_LENGTH 24
56
# endif
57
#endif
58
59
#ifndef RI_ATOMIC_ENABLED
60
# define RI_ATOMIC_ENABLED ENABLE_DEFAULT
61
#endif
62
63
#ifndef RD_LOG_BUFFER_SIZE
65
# define RD_LOG_BUFFER_SIZE (128U)
66
#endif
67
68
#ifndef RT_ADC_ENABLED
70
# define RT_ADC_ENABLED ENABLE_DEFAULT
71
#endif
72
73
#ifndef RI_COMM_ENABLED
75
# define RI_COMM_ENABLED ENABLE_DEFAULT
76
#endif
77
78
#ifndef RI_AES_ENABLED
80
# define RI_AES_ENABLED ENABLE_DEFAULT
81
#endif
82
83
#ifndef RI_RADIO_ENABLED
85
# define RI_RADIO_ENABLED ENABLE_DEFAULT
86
#endif
87
88
89
#ifndef RT_ADV_ENABLED
91
# define RT_ADV_ENABLED ENABLE_DEFAULT
92
#endif
93
94
#define RI_ADV_ENABLED RT_ADV_ENABLED
95
96
#if RT_ADV_ENABLED && !(RI_COMM_ENABLED)
97
# error "Advertisement task requires communication interface."
98
#endif
99
100
#if RT_ADV_ENABLED && !(RI_RADIO_ENABLED)
101
# error "Advertisement task requires radio interface."
102
#endif
103
104
#ifndef RT_BUTTON_ENABLED
106
# define RT_BUTTON_ENABLED ENABLE_DEFAULT
107
#endif
108
109
#ifndef RT_COMMUNICATION_ENABLED
110
# define RT_COMMUNICATION_ENABLED ENABLE_DEFAULT
111
#endif
112
113
#ifndef RT_FLASH_ENABLED
115
# define RT_FLASH_ENABLED ENABLE_DEFAULT
116
#endif
117
118
#ifndef RT_GATT_ENABLED
120
# define RT_GATT_ENABLED ENABLE_DEFAULT
121
#endif
122
123
#if RT_GATT_ENABLED
124
# define RI_GATT_ENABLED (1U)
125
#endif
126
127
#if RT_GATT_ENABLED && ((!RT_ADV_ENABLED) || !(RI_COMM_ENABLED))
128
# error "GATT task requires Advertisement task and communication interface."
129
#endif
130
131
#if RT_GATT_ENABLED && ((!RT_ADV_ENABLED) || !(RI_RADIO_ENABLED))
132
# error "GATT task requires Advertisement task and radio interface."
133
#endif
134
135
#ifndef RT_GPIO_ENABLED
137
# define RT_GPIO_ENABLED ENABLE_DEFAULT
138
#endif
139
140
#if RT_GPIO_ENABLED
141
# ifndef RT_GPIO_INT_TABLE_SIZE
142
# if (!ENABLE_DEFAULT)
143
# warning "Conserving space for 48 GPIOs, are you sure?"
144
# endif
149
# define RT_GPIO_INT_TABLE_SIZE 48
150
# endif
151
#endif
152
153
#ifndef RI_I2C_ENABLED
154
# define RI_I2C_ENABLED ENABLE_DEFAULT
155
#endif
156
157
#ifndef RT_LED_ENABLED
159
# define RT_LED_ENABLED ENABLE_DEFAULT
160
#endif
161
162
#if RT_LED_ENABLED
163
# if (!RT_GPIO_ENABLED)
164
# error "LED task requires GPIO task"
165
# endif
166
# ifndef RT_MAX_LED_CFG
167
# if (!ENABLE_DEFAULT)
168
# warning "Conserving space for 48 LEDs, are you sure?"
169
# endif
174
# define RT_MAX_LED_CFG 48
175
# endif
176
#endif
177
178
#ifndef RT_NFC_ENABLED
179
# define RT_NFC_ENABLED ENABLE_DEFAULT
180
#endif
181
182
#if RT_NFC_ENABLED
183
# ifndef RI_NFC_ENABLED
184
# define RI_NFC_ENABLED 1
185
# endif
186
#endif
187
188
#ifndef RI_RTC_ENABLED
189
# define RI_RTC_ENABLED ENABLE_DEFAULT
190
#endif
191
192
#ifndef RI_SCHEDULER_ENABLED
193
# define RI_SCHEDULER_ENABLED ENABLE_DEFAULT
194
#endif
195
196
#if RI_SCHEDULER_ENABLED
197
# ifndef RI_SCHEDULER_LENGTH
198
# define RI_SCHEDULER_LENGTH (10U)
199
# endif
200
# ifndef RI_SCHEDULER_SIZE
201
# define RI_SCHEDULER_SIZE (32U)
202
# endif
203
#endif
204
205
#ifndef RI_SPI_ENABLED
206
# define RI_SPI_ENABLED ENABLE_DEFAULT
207
#endif
208
209
#if RI_TIMER_ENABLED
210
# ifndef RI_TIMER_MAX_INSTANCES
211
# define RI_TIMER_MAX_INSTANCES (10U)
212
# endif
213
#endif
214
215
#ifndef RI_UART_ENABLED
216
# define RI_UART_ENABLED ENABLE_DEFAULT
217
#endif
218
219
#ifndef RI_YIELD_ENABLED
220
#define RI_YIELD_ENABLED ENABLE_DEFAULT
221
#endif
222
223
#ifndef RI_WATCHDOG_ENABLED
224
#define RI_WATCHDOG_ENABLED ENABLE_DEFAULT
225
#endif
226
228
#ifndef RT_SENSOR_ENABLED
229
# define RT_SENSOR_ENABLED ENABLE_DEFAULT
230
#endif
231
232
#ifndef RI_BME280_ENABLED
233
# define RI_BME280_ENABLED ENABLE_DEFAULT
234
# ifndef RI_BME280_SPI_ENABLED
235
# define RI_BME280_SPI_ENABLED ENABLE_DEFAULT
236
# endif
237
# ifndef RI_BME280_I2C_ENABLED
238
# define RI_BME280_I2C_ENABLED ENABLE_DEFAULT
239
# endif
240
#endif
241
242
#ifndef RI_DPS310_ENABLED
243
# define RI_DPS310_ENABLED ENABLE_DEFAULT
244
# ifndef RI_DPS310_SPI_ENABLED
245
# define RI_DPS310_SPI_ENABLED ENABLE_DEFAULT
246
# endif
247
# ifndef RI_DPS310_I2C_ENABLED
248
# define RI_DPS310_I2C_ENABLED ENABLE_DEFAULT
249
# endif
250
#endif
251
252
#ifndef RI_LIS2DH12_ENABLED
253
# define RI_LIS2DH12_ENABLED ENABLE_DEFAULT
254
#endif
255
256
#ifndef RI_TMP117_ENABLED
257
# define RI_TMP117_ENABLED ENABLE_DEFAULT
258
#endif
259
260
#ifndef RI_SHTCX_ENABLED
261
# define RI_SHTCX_ENABLED ENABLE_DEFAULT
262
#endif
263
264
#ifndef RI_ADC_PHOTO_ENABLED
265
# define RI_ADC_PHOTO_ENABLED ENABLE_DEFAULT
266
#endif
267
268
#ifndef RUUVI_NRF5_SDK15_NRF52832_ENVIRONMENTAL_ENABLED
269
# define RUUVI_NRF5_SDK15_NRF52832_ENVIRONMENTAL_ENABLED ENABLE_DEFAULT
270
#endif
271
272
// TODO: Refactor configuration constants elsewhere
273
# define RI_ADC_PHOTO_CHANNEL 2
274
# define RI_ADC_PHOTO_DIVIDER 1.00f
275
276
#ifndef RI_ADC_NTC_ENABLED
277
# define RI_ADC_NTC_ENABLED ENABLE_DEFAULT
278
#endif
279
// TODO: Refactor configuration constants elsewhere
280
// NTC is installed as VDD - fixed resistor - ADC - NTC - GND.
281
#define RI_ADC_NTC_CHANNEL 1
282
#define RI_ADC_NTC_DIVIDER 1.00f
283
#define RI_ADC_NTC_BALANCE 10000.00f
284
#define RI_ADC_NTC_DEFAULT_RES 10000.00f
285
#define RI_ADC_NTC_DEFAULT_TEMP 25.00f
286
#define RI_ADC_NTC_DEFAULT_BETA 3974.0f
287
288
289
#endif
fruity_config.h
src
ruuvi_driver_enabled_modules.h
Generated by
1.9.1