Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / PowerManagement_1-2 / module.h @ 9d8f1b9e

History | View | Annotate | Download (30.539 KB)

1 b010278f Thomas Schöpping
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2019  Thomas Schöpping et al.
4

5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
/**
20
 * @file
21
 * @brief   Structures and constant for the PowerManagement module.
22
 *
23
 * @addtogroup powermanagement_module
24
 * @{
25
 */
26
27
#ifndef AMIROOS_MODULE_H
28
#define AMIROOS_MODULE_H
29
30
#include <amiroos.h>
31
32
/*===========================================================================*/
33
/**
34
 * @name Module specific functions
35
 * @{
36
 */
37
/*===========================================================================*/
38
39
/**
40
 * @brief Makro to store data in the core coupled memory (ccm).
41
 *        Example:
42
 *        int compute_buffer[128] CCM_RAM;
43
 *
44
 * @note The ccm is not connected to any bus system.
45
 */
46
#define CCM_RAM(...)                            __attribute__((section(".ram4"), ##__VA_ARGS__))
47
48
/**
49
 * @brief Makro to store data in the ethernet memory (eth).
50
 *        Example:
51
 *        int dma_buffer[128] ETH_RAM;
52
 *
53
 * @note The eth is a dedicated memory block with its own DMA controller.
54
 */
55
#define ETH_RAM(...)                            __attribute__((section(".ram2"), ##__VA_ARGS__))
56
57
/**
58
 * @brief Makro to store data in the backup memory (bckp).
59
 *        Example:
60
 *        int backup_buffer[128] BCKP_RAM;
61
 *
62
 * @note The eth is a dedicated memory block with its own DMA controller.
63
 */
64
#define BCKP_RAM(...)                           __attribute__((section(".ram5"), ##__VA_ARGS__))
65
66
/** @} */
67
68
/*===========================================================================*/
69
/**
70
 * @name ChibiOS/HAL configuration
71
 * @{
72
 */
73
/*===========================================================================*/
74
75
/**
76
 * @brief   ADC driver for reading the system voltage.
77
 */
78
#define MODULE_HAL_ADC_VSYS                     ADCD1
79
80
/**
81
 * @brief   Configuration for the ADC.
82
 */
83
extern ADCConversionGroup moduleHalAdcVsysConversionGroup;
84
85
/**
86
 * @brief   CAN driver to use.
87
 */
88
#define MODULE_HAL_CAN                          CAND1
89
90
/**
91
 * @brief   Configuration for the CAN driver.
92
 */
93
extern CANConfig moduleHalCanConfig;
94
95
/**
96
 * @brief   I2C driver to access the sensor ring, power monitors for VIO1.8 and VIO3.3, and fuel gauge (rear battery).
97
 * @details Depending on the attached sensor ring, the devices connected to this bus vary:
98
 *          ProximitySensor:
99
 *            - I2C multiplexer (PCA9544A)
100
 *            - proximity sensors (VCNL4020) #1 - #4
101
 *          DistanceSensor (VL53L0X):
102
 *            TODO
103
 *          DistanceSensor (VL53L1X):
104
 *            TODO
105
 */
106
#define MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR   I2CD1
107
108
/**
109
 * @brief   Configuration for the sensor ring, power monitors for VIO1.8 and VIO3.3, and fuel gauge (rear battery) I2C driver.
110
 * @details Depending on the attached sensor ring, the devices connected to this bus vary:
111
 *          ProximitySensor:
112
 *            - I2C multiplexer (PCA9544A)
113
 *            - proximity sensors (VCNL4020) #1 - #4
114
 *          DistanceSensor (VL53L0X):
115
 *            TODO
116
 *          DistanceSensor (VL53L1X):
117
 *            TODO
118
 */
119
extern I2CConfig moduleHalI2cSrPm18Pm33GaugeRearConfig;
120
121
/**
122
 * @brief   I2C driver to access the sensor ring, power monitors for VSYS4.2, VIO5.0 and VDD, EEPROM, and fuel gauge (front battery).
123
 * @details Depending on the attached sensor ring, the devices connected to this bus vary:
124
 *          ProximitySensor:
125
 *            - I2C multiplexer (PCA9544A)
126
 *            - proximity sensors (VCNL4020) #1 - #4
127
 *            - touch sensor (MPR121)
128
 *          DistanceSensor (VL53L0X):
129
 *            TODO
130
 *          DistanceSensor (VL53L1X):
131
 *            TODO
132
 */
133
#define MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT I2CD2
134
135
/**
136
 * @brief   Configuration for the sensor ring, power monitors for VSYS4.2, VIO5.0 and VDD, EEPROM, and fuel gauge (front battery) I2C driver.
137
 * @details Depending on the attached sensor ring, the devices connected to this bus vary:
138
 *          ProximitySensor:
139
 *            - I2C multiplexer (PCA9544A)
140
 *            - proximity sensors (VCNL4020) #1 - #4
141
 *            - touch sensor (MPR121)
142
 *          DistanceSensor (VL53L0X):
143
 *            TODO
144
 *          DistanceSensor (VL53L1X):
145
 *            TODO
146
 */
147
extern I2CConfig moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig;
148
149
/**
150
 * @brief   PWM driver for the buzzer.
151
 */
152
#define MODULE_HAL_PWM_BUZZER                   PWMD3
153
154
/**
155
 * @brief   Configuration of the PWM driver.
156
 */
157
extern PWMConfig moduleHalPwmBuzzerConfig;
158
159
/**
160 243fb4e2 Thomas Schöpping
 * @brief   PWM channel for the buzzer.
161 b010278f Thomas Schöpping
 */
162
#define MODULE_HAL_PWM_BUZZER_CHANNEL           1
163
164
/**
165
 * @brief   Serial driver of the programmer interface.
166
 */
167
#define MODULE_HAL_PROGIF                       SD1
168
169
/**
170
 * @brief   Configuration for the programmer serial interface driver.
171
 */
172
extern SerialConfig moduleHalProgIfConfig;
173
174
/**
175
 * @brief   Real-Time Clock driver.
176
 */
177
#define MODULE_HAL_RTC                          RTCD1
178
179
/** @} */
180
181
/*===========================================================================*/
182
/**
183
 * @name GPIO definitions
184
 * @{
185
 */
186
/*===========================================================================*/
187
188
/**
189
 * @brief   SWITCH_STATUS input signal GPIO.
190
 */
191
extern ROMCONST apalControlGpio_t moduleGpioSwitchStatus;
192
193
/**
194
 * @brief   SYS_REG_EN output signal GPIO.
195
 */
196
extern ROMCONST apalControlGpio_t moduleGpioSysRegEn;
197
198
/**
199
 * @brief   IR_INT1 input signal GPIO.
200
 */
201
extern ROMCONST apalControlGpio_t moduleGpioIrInt1;
202
203
/**
204
 * @brief   POWER_EN output signal GPIO.
205
 */
206
extern ROMCONST apalControlGpio_t moduleGpioPowerEn;
207
208
/**
209
 * @brief   SYS_UART_DN bidirectional signal GPIO.
210
 */
211
extern ROMCONST apalControlGpio_t moduleGpioSysUartDn;
212
213
/**
214
 * @brief   CHARGE_STAT2A input signal GPIO.
215
 */
216
extern ROMCONST apalControlGpio_t moduleGpioChargeStat2A;
217
218
/**
219
 * @brief   GAUGE_BATLOW2 input signal GPIO.
220
 */
221
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2;
222
223
/**
224
 * @brief   GAUGE_BATGD2 input signal GPIO.
225
 */
226
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2;
227
228
/**
229
 * @brief   LED output signal GPIO.
230
 */
231
extern ROMCONST apalControlGpio_t moduleGpioLed;
232
233
/**
234
 * @brief   SYS_UART_UP bidirectional signal GPIO.
235
 */
236
extern ROMCONST apalControlGpio_t moduleGpioSysUartUp;
237
238
/**
239
 * @brief   CHARGE_STAT1A input signal GPIO.
240
 */
241
extern ROMCONST apalControlGpio_t moduleGpioChargeStat1A;
242
243
/**
244
 * @brief   GAUGE_BATLOW1 input signal GPIO.
245
 */
246
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1;
247
248
/**
249
 * @brief   GAUGE_BATGD1 input signal GPIO.
250
 */
251
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1;
252
253
/**
254 340f2bdf Thomas Schöpping
 * @brief   CHARGE_EN1 output signal GPIO.
255 b010278f Thomas Schöpping
 */
256
extern ROMCONST apalControlGpio_t moduleGpioChargeEn1;
257
258
/**
259
 * @brief   IR_INT2 input signal GPIO.
260
 */
261
extern ROMCONST apalControlGpio_t moduleGpioIrInt2;
262
263
/**
264
 * @brief   TOUCH_INT input signal GPIO.
265
 */
266
extern ROMCONST apalControlGpio_t moduleGpioTouchInt;
267
268
/**
269
 * @brief   SYS_DONE input signal GPIO.
270
 */
271
extern ROMCONST apalControlGpio_t moduleGpioSysDone;
272
273
/**
274
 * @brief   SYS_PROG output signal GPIO.
275
 */
276
extern ROMCONST apalControlGpio_t moduleGpioSysProg;
277
278
/**
279
 * @brief   PATH_DC input signal GPIO.
280
 */
281
extern ROMCONST apalControlGpio_t moduleGpioPathDc;
282
283
/**
284
 * @brief   SYS_SPI_DIR bidirectional signal GPIO.
285
 */
286
extern ROMCONST apalControlGpio_t moduleGpioSysSpiDir;
287
288
/**
289
 * @brief   SYS_SYNC bidirectional signal GPIO.
290
 */
291
extern ROMCONST apalControlGpio_t moduleGpioSysSync;
292
293
/**
294
 * @brief   SYS_PD bidirectional signal GPIO.
295
 */
296
extern ROMCONST apalControlGpio_t moduleGpioSysPd;
297
298
/**
299
 * @brief   SYS_WARMRST bidirectional signal GPIO.
300
 */
301
extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
302
303
/**
304
 * @brief   BT_RST output signal GPIO.
305
 */
306
extern ROMCONST apalControlGpio_t moduleGpioBtRst;
307
308
/**
309
 * @brief   CHARGE_EN2 output signal GPIO.
310
 */
311
extern ROMCONST apalControlGpio_t moduleGpioChargeEn2;
312
313
/** @} */
314
315
/*===========================================================================*/
316
/**
317
 * @name AMiRo-OS core configurations
318
 * @{
319
 */
320
/*===========================================================================*/
321
322
/**
323
 * @brief   Event flag to be set on a IR_INT1 / CHARGE_STAT1A interrupt.
324
 */
325 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_IRINT1          AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_IR_INT1_N))
326 b010278f Thomas Schöpping
327
/**
328
 * @brief   Event flag to be set on a GAUGE_BATLOW1 interrupt.
329
 */
330 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_GAUGEBATLOW1    AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATLOW1))
331 b010278f Thomas Schöpping
332
/**
333
 * @brief   Event flag to be set on a GAUGE_BATGD1 interrupt.
334
 */
335 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_GAUGEBATGD1     AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATGD1_N))
336 b010278f Thomas Schöpping
337
/**
338
 * @brief   Event flag to be set on a SYS_UART_DN interrupt.
339
 */
340 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_SYSUARTDN       AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_DN))
341 b010278f Thomas Schöpping
342
/**
343
 * @brief   Event flag to be set on a IR_INT2 / CHARGE_STAT2A interrupt.
344
 */
345 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_IRINT2          AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_IR_INT2_N))
346 b010278f Thomas Schöpping
347
/**
348
 * @brief   Event flag to be set on a TOUCH_INT interrupt.
349
 */
350 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_TOUCHINT        AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_TOUCH_INT_N))
351 b010278f Thomas Schöpping
352
/**
353
 * @brief   Event flag to be set on a GAUGE_BATLOW2 interrupt.
354
 */
355 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_GAUGEBATLOW2    AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATLOW2))
356 b010278f Thomas Schöpping
357
/**
358
 * @brief   Event flag to be set on a GAUGE_BATGD2 interrupt.
359
 */
360 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_GAUGEBATGD2     AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATGD2_N))
361 b010278f Thomas Schöpping
362
/**
363
 * @brief   Event flag to be set on a PATH_DC interrupt.
364
 */
365 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_PATHDC          AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_PATH_DC))
366 b010278f Thomas Schöpping
367
/**
368
 * @brief   Event flag to be set on a SYS_SPI_DIR interrupt.
369
 */
370 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_SYSSPIDIR       AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_SPI_DIR))
371 b010278f Thomas Schöpping
372
/**
373
 * @brief   Event flag to be set on a SYS_SYNC interrupt.
374
 */
375 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_SYSSYNC         AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
376 b010278f Thomas Schöpping
377
/**
378
 * @brief   Event flag to be set on a SYS_PD interrupt.
379
 */
380 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_SYSPD           AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
381 b010278f Thomas Schöpping
382
/**
383
 * @brief   Event flag to be set on a SYS_WARMRST interrupt.
384
 */
385 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_SYSWARMRST      AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_WARMRST_N))
386 b010278f Thomas Schöpping
387
/**
388
 * @brief   Event flag to be set on a SYS_UART_UP interrupt.
389
 */
390 cda14729 Thomas Schöpping
#define MODULE_OS_GPIOEVENTFLAG_SYSUARTUP       AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
391 b010278f Thomas Schöpping
392 cda14729 Thomas Schöpping
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
393 b010278f Thomas Schöpping
/**
394
 * @brief   Shell prompt text.
395
 */
396
extern ROMCONST char* moduleShellPrompt;
397 cda14729 Thomas Schöpping
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */
398 b010278f Thomas Schöpping
399
/**
400
 * @brief   Interrupt initialization macro.
401
 */
402
#define MODULE_INIT_INTERRUPTS() {                                            \
403
  /* IR_INT1 */                                                               \
404 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioIrInt1.gpio->line);  \
405 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                  \
406 b010278f Thomas Schöpping
  /* GAUGE_BATLOW2 */                                                         \
407 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioGaugeBatLow2.gpio->line);  \
408 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                  \
409 b010278f Thomas Schöpping
  /* GAUGE_BATGD2 */                                                          \
410 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioGaugeBatGd2.gpio->line);  \
411 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                  \
412 b010278f Thomas Schöpping
  /* GAUGE_BATLOW1 */                                                         \
413 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioGaugeBatLow1.gpio->line);  \
414 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                  \
415 b010278f Thomas Schöpping
  /* GAUGE_BATGD1 */                                                          \
416 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioGaugeBatGd1.gpio->line);  \
417 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                  \
418 b010278f Thomas Schöpping
  /* IR_INT2 */                                                               \
419 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioIrInt2.gpio->line);  \
420 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                  \
421 b010278f Thomas Schöpping
  /* TOUCH_INT */                                                             \
422 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioTouchInt.gpio->line);  \
423 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                  \
424 b010278f Thomas Schöpping
  /* PATH_DC */                                                               \
425 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioPathDc.gpio->line);  \
426 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                  \
427 b010278f Thomas Schöpping
  /* SYS_SPI_DIR */                                                           \
428 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioSysSpiDir.gpio->line);  \
429 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                  \
430 b010278f Thomas Schöpping
  /* SYS_WARMRST */                                                           \
431 cda14729 Thomas Schöpping
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioSysWarmrst.gpio->line);  \
432 56dc4779 Thomas Schöpping
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                  \
433 b010278f Thomas Schöpping
}
434
435
/**
436 4c72a54c Thomas Schöpping
 * @brief   Test initialization hook.
437 b010278f Thomas Schöpping
 */
438
#define MODULE_INIT_TESTS() {                                                 \
439 cda14729 Thomas Schöpping
  /* add test commands to shell */                                            \
440 4c72a54c Thomas Schöpping
  aosShellAddCommand(&aos.shell, &moduleTestAdcShellCmd);                     \
441
  aosShellAddCommand(&aos.shell, &moduleTestAt24c01bShellCmd);                \
442
  aosShellAddCommand(&aos.shell, &moduleTestBq241xxShellCmd);                 \
443
  aosShellAddCommand(&aos.shell, &moduleTestBq27500ShellCmd);                 \
444
  aosShellAddCommand(&aos.shell, &moduleTestBq27500Bq241xxShellCmd);          \
445
  aosShellAddCommand(&aos.shell, &moduleTestIna219ShellCmd);                  \
446
  aosShellAddCommand(&aos.shell, &moduleTestLedShellCmd);                     \
447
  aosShellAddCommand(&aos.shell, &moduleTestPkxxxexxxShellCmd);               \
448
  aosShellAddCommand(&aos.shell, &moduleTestTps6211xShellCmd);                \
449
  aosShellAddCommand(&aos.shell, &moduleTestTps6211xIna219ShellCmd);          \
450 b010278f Thomas Schöpping
  MODULE_INIT_TEST_SENSORRING();                                              \
451 4c72a54c Thomas Schöpping
  aosShellAddCommand(&aos.shell, &moduleTestAllShellCmd);                     \
452 b010278f Thomas Schöpping
}
453
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
454
  #define MODULE_INIT_TEST_SENSORRING() {                                     \
455 4c72a54c Thomas Schöpping
    aosShellAddCommand(&aos.shell, &moduleTestPca9544aShellCmd);              \
456
    aosShellAddCommand(&aos.shell, &moduleTestMpr121ShellCmd);                \
457
    aosShellAddCommand(&aos.shell, &moduleTestVcnl4020ShellCmd);              \
458 b010278f Thomas Schöpping
  }
459
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
460
  #define MODULE_INIT_TEST_SENSORRING() {                                     \
461 4c72a54c Thomas Schöpping
    aosShellAddCommand(&aos.shell, &moduleTestPcal6524ShellCmd);              \
462
    aosShellAddCommand(&aos.shell, &moduleTestAt42qt1050ShellCmd);            \
463 b010278f Thomas Schöpping
  }
464
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
465
  #define MODULE_INIT_TEST_SENSORRING() {                                     \
466 4c72a54c Thomas Schöpping
    aosShellAddCommand(&aos.shell, &moduleTestPcal6524ShellCmd);              \
467
    aosShellAddCommand(&aos.shell, &moduleTestAt42qt1050ShellCmd);            \
468 b010278f Thomas Schöpping
  }
469
#else /* (BOARD_SENSORRING == ?) */
470
  #define MODULE_INIT_TEST_SENSORRING()         {}
471
#endif /* (BOARD_SENSORRING == ?) */
472
473
/**
474
 * @brief   Periphery communication interfaces initialization hook.
475
 */
476 4c72a54c Thomas Schöpping
#define MODULE_INIT_PERIPHERY_IF() {                                          \
477
  MODULE_INIT_PERIPHERY_IF_SENSORRING();                                      \
478 b010278f Thomas Schöpping
  /* serial driver */                                                         \
479
  sdStart(&MODULE_HAL_PROGIF, &moduleHalProgIfConfig);                        \
480
  /* I2C */                                                                   \
481
  moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
482
  moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
483
  moduleHalI2cSrPm18Pm33GaugeRearConfig.duty_cycle = (moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
484
  i2cStart(&MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR, &moduleHalI2cSrPm18Pm33GaugeRearConfig); \
485
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
486
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT24C01B_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT24C01B_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
487
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
488
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.duty_cycle = (moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
489
  i2cStart(&MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT, &moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig);  \
490
  /* ADC */                                                                   \
491
  adcStart(&MODULE_HAL_ADC_VSYS, NULL);                                       \
492
  /* PWM */                                                                   \
493
  pwmStart(&MODULE_HAL_PWM_BUZZER, &moduleHalPwmBuzzerConfig);                \
494
  moduleHalPwmBuzzerConfig.frequency = MODULE_HAL_PWM_BUZZER.clock;           \
495
  pwmStop(&MODULE_HAL_PWM_BUZZER);                                            \
496
  moduleHalPwmBuzzerConfig.period = moduleHalPwmBuzzerConfig.frequency / PKxxxExxx_LLD_FREQUENCY_SPEC; \
497
  pwmStart(&MODULE_HAL_PWM_BUZZER, &moduleHalPwmBuzzerConfig);                \
498 cda14729 Thomas Schöpping
  /* CAN */                                                                   \
499
  canStart(&MODULE_HAL_CAN, &moduleHalCanConfig);                             \
500 b010278f Thomas Schöpping
}
501
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
502 4c72a54c Thomas Schöpping
  #define MODULE_INIT_PERIPHERY_IF_SENSORRING() {                             \
503 b010278f Thomas Schöpping
    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
504
    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
505
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
506
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
507
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (MPR121_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? MPR121_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
508
  }
509
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
510 4c72a54c Thomas Schöpping
  #define MODULE_INIT_PERIPHERY_IF_SENSORRING() {                             \
511 b010278f Thomas Schöpping
    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
512
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
513
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT42QT1050_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT42QT1050_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
514
  }
515
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
516 4c72a54c Thomas Schöpping
  #define MODULE_INIT_PERIPHERY_IF_SENSORRING() {                             \
517 b010278f Thomas Schöpping
    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
518
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
519
    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT42QT1050_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT42QT1050_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
520
  }
521
#else /* (BOARD_SENSORRING == ?) */
522 4c72a54c Thomas Schöpping
  #define MODULE_INIT_PERIPHERY_IF_SENSORRING() {}
523 b010278f Thomas Schöpping
#endif /* (BOARD_SENSORRING == ?) */
524
525
/**
526
 * @brief   Periphery communication interface deinitialization hook.
527
 */
528 4c72a54c Thomas Schöpping
#define MODULE_SHUTDOWN_PERIPHERY_IF() {                                      \
529 cda14729 Thomas Schöpping
  /* CAN */                                                                   \
530
  canStop(&MODULE_HAL_CAN);                                                   \
531 b010278f Thomas Schöpping
  /* PWM */                                                                   \
532
  pwmStop(&MODULE_HAL_PWM_BUZZER);                                            \
533
  /* ADC */                                                                   \
534
  adcStop(&MODULE_HAL_ADC_VSYS);                                              \
535
  /* I2C */                                                                   \
536
  i2cStop(&MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR);                            \
537
  i2cStop(&MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT);              \
538
  /* don't stop the serial driver so messages can still be printed */         \
539
}
540
541
/** @} */
542
543
/*===========================================================================*/
544
/**
545
 * @name Startup Shutdown Synchronization Protocol (SSSP)
546
 * @{
547
 */
548
/*===========================================================================*/
549
550 c53ef0b1 Thomas Schöpping
#define moduleSsspSignalPD()                    (&moduleGpioSysPd)
551
#define moduleSsspEventflagPD()                 MODULE_OS_GPIOEVENTFLAG_SYSPD
552 b010278f Thomas Schöpping
553 c53ef0b1 Thomas Schöpping
#define moduleSsspSignalS()                     (&moduleGpioSysSync)
554
#define moduleSsspEventflagS()                  MODULE_OS_GPIOEVENTFLAG_SYSSYNC
555 b010278f Thomas Schöpping
556 c53ef0b1 Thomas Schöpping
#define moduleSsspSignalUP()                    (&moduleGpioSysUartUp)
557
#define moduleSsspEventflagUP()                 MODULE_OS_GPIOEVENTFLAG_SYSUARTUP
558 b010278f Thomas Schöpping
559 c53ef0b1 Thomas Schöpping
#define moduleSsspSignalDN()                    (&moduleGpioSysUartDn)
560
#define moduleSsspEventflagDN()                 MODULE_OS_GPIOEVENTFLAG_SYSUARTDN
561 cda14729 Thomas Schöpping
562 b010278f Thomas Schöpping
/** @} */
563
564
/*===========================================================================*/
565
/**
566
 * @name Low-level drivers
567
 * @{
568
 */
569
/*===========================================================================*/
570
#include <alld_AT24C01B.h>
571
#include <alld_bq241xx.h>
572
#include <alld_bq27500.h>
573
#include <alld_INA219.h>
574
#include <alld_LED.h>
575
#include <alld_PKxxxExxx.h>
576
#include <alld_TPS6211x.h>
577
578
/**
579
 * @brief   EEPROM driver.
580
 */
581
extern AT24C01BDriver moduleLldEeprom;
582
583
/**
584
 * @brief   Battery charger (front battery) driver.
585
 */
586
extern BQ241xxDriver moduleLldBatteryChargerFront;
587
588
/**
589
 * @brief   Battery charger (rear battery) driver.
590
 */
591
extern BQ241xxDriver moduleLldBatteryChargerRear;
592
593
/**
594
 * @brief   Fuel gauge (front battery) driver.
595
 */
596
extern BQ27500Driver moduleLldFuelGaugeFront;
597
598
/**
599
 * @brief   Fuel gauge (rear battery) driver.
600
 */
601
extern BQ27500Driver moduleLldFuelGaugeRear;
602
603
/**
604
 * @brief   Power monitor (VDD) driver.
605
 */
606
extern INA219Driver moduleLldPowerMonitorVdd;
607
608
/**
609
 * @brief   Power monitor (VIO 1.8) driver.
610
 */
611
extern INA219Driver moduleLldPowerMonitorVio18;
612
613
/**
614
 * @brief   Power monitor (VIO 3.3) driver.
615
 */
616
extern INA219Driver moduleLldPowerMonitorVio33;
617
618
/**
619
 * @brief   Power monitor (VSYS 4.2) driver.
620
 */
621
extern INA219Driver moduleLldPowerMonitorVsys42;
622
623
/**
624
 * @brief   Power monitor (VIO 5.0) driver.
625
 */
626
extern INA219Driver moduleLldPowerMonitorVio50;
627
628
/**
629
 * @brief   Status LED driver.
630
 */
631
extern LEDDriver moduleLldStatusLed;
632
633
/**
634
 * @brief   Step down converter driver.
635
 * @note    Although there multiple TPS6211x, those are completely identical from driver few (share the same signals).
636
 */
637
extern TPS6211xDriver moduleLldStepDownConverter;
638
639
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
640
641
#include <alld_MPR121.h>
642
#include <alld_PCA9544A.h>
643
#include <alld_VCNL4020.h>
644
645
/**
646
 * @brief   Touch sensor driver.
647
 */
648
extern MPR121Driver moduleLldTouch;
649
650
/**
651
 * @brief   I2C multiplexer (I2C #1) driver.
652
 */
653
extern PCA9544ADriver moduleLldI2cMultiplexer1;
654
655
/**
656
 * @brief   I2C multiplexer (I2C #2) driver.
657
 */
658
extern PCA9544ADriver moduleLldI2cMultiplexer2;
659
660
/**
661
 * @brief   Proximity sensor (I2C #1) driver.
662
 */
663
extern VCNL4020Driver moduleLldProximity1;
664
665
/**
666
 * @brief   Proximity sensor (I2C #2) driver.
667
 */
668
extern VCNL4020Driver moduleLldProximity2;
669
670
#endif /* (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) */
671
672
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
673
674
#include <alld_PCAL6524.h>
675
#include <alld_AT42QT1050.h>
676
677
/**
678
 * @brief   GPIO extender (I2C #1) driver.
679
 */
680
extern PCAL6524Driver moduleLldGpioExtender1;
681
682
/**
683
 * @brief   GPIO extender (I2C #2) driver.
684
 */
685
extern PCAL6524Driver moduleLldGpioExtender2;
686
687
/**
688
 * @brief   Touch sensor driver.
689
 */
690
extern AT42QT1050Driver moduleLldTouch;
691
692
#endif /* (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) */
693
694
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
695
696
#include <alld_PCAL6524.h>
697
#include <alld_AT42QT1050.h>
698
699
/**
700
 * @brief   GPIO extender (I2C #1) driver.
701
 */
702
extern PCAL6524Driver moduleLldGpioExtender1;
703
704
/**
705
 * @brief   GPIO extender (I2C #2) driver.
706
 */
707
extern PCAL6524Driver moduleLldGpioExtender2;
708
709
/**
710
 * @brief   Touch sensor driver.
711
 */
712
extern AT42QT1050Driver moduleLldTouch;
713
714
#endif /* (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) */
715
716
/** @} */
717
718
/*===========================================================================*/
719
/**
720 4c72a54c Thomas Schöpping
 * @name Tests
721 b010278f Thomas Schöpping
 * @{
722
 */
723
/*===========================================================================*/
724
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
725
726
/**
727 4c72a54c Thomas Schöpping
 * @brief   ADC test command.
728 b010278f Thomas Schöpping
 */
729 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestAdcShellCmd;
730 b010278f Thomas Schöpping
731
/**
732 4c72a54c Thomas Schöpping
 * @brief   AT24C01BN-SH-B (EEPROM) test command.
733 b010278f Thomas Schöpping
 */
734 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestAt24c01bShellCmd;
735 b010278f Thomas Schöpping
736
/**
737 4c72a54c Thomas Schöpping
 * @brief   bq24103a (battery charger) test command.
738 b010278f Thomas Schöpping
 */
739 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestBq241xxShellCmd;
740 b010278f Thomas Schöpping
741
/**
742 4c72a54c Thomas Schöpping
 * @brief   bq27500 (fuel gauge) test command.
743 b010278f Thomas Schöpping
 */
744 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestBq27500ShellCmd;
745 b010278f Thomas Schöpping
746
/**
747 4c72a54c Thomas Schöpping
 * @brief   bq27500 (fuel gauge) in combination with bq24103a (battery charger) test command.
748 b010278f Thomas Schöpping
 */
749 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestBq27500Bq241xxShellCmd;
750 b010278f Thomas Schöpping
751
/**
752 4c72a54c Thomas Schöpping
 * @brief   INA219 (power monitor) test command.
753 b010278f Thomas Schöpping
 */
754 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestIna219ShellCmd;
755 b010278f Thomas Schöpping
756
/**
757 4c72a54c Thomas Schöpping
 * @brief   Status LED test command.
758 b010278f Thomas Schöpping
 */
759 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestLedShellCmd;
760 b010278f Thomas Schöpping
761
/**
762 4c72a54c Thomas Schöpping
 * @brief   PKLCS1212E4001 (buzzer) test command.
763 b010278f Thomas Schöpping
 */
764 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestPkxxxexxxShellCmd;
765 b010278f Thomas Schöpping
766
/**
767 4c72a54c Thomas Schöpping
 * @brief   TPS62113 (step-down converter) test command.
768 b010278f Thomas Schöpping
 */
769 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestTps6211xShellCmd;
770 b010278f Thomas Schöpping
771
/**
772 4c72a54c Thomas Schöpping
 * @brief   TPS62113 (step-sown converter) in combination with INA219 (power monitor) test command.
773 b010278f Thomas Schöpping
 */
774 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestTps6211xIna219ShellCmd;
775 b010278f Thomas Schöpping
776
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
777
778
/**
779 4c72a54c Thomas Schöpping
 * @brief   MPR121 (touch sensor) test command.
780 b010278f Thomas Schöpping
 */
781 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestMpr121ShellCmd;
782 b010278f Thomas Schöpping
783
/**
784 4c72a54c Thomas Schöpping
 * @brief   PCA9544A (I2C multiplexer) test command.
785 b010278f Thomas Schöpping
 */
786 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestPca9544aShellCmd;
787 b010278f Thomas Schöpping
788
/**
789 4c72a54c Thomas Schöpping
 * @brief   VCNL4020 (proximity sensor) test command.
790 b010278f Thomas Schöpping
 */
791 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestVcnl4020ShellCmd;
792 b010278f Thomas Schöpping
793
#endif /* (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) */
794
795
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
796
797
/**
798 4c72a54c Thomas Schöpping
 * @brief   PCAL6524 (GPIO extender) test command.
799 b010278f Thomas Schöpping
 */
800 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestPcal6524ShellCmd;
801 b010278f Thomas Schöpping
802
/**
803 4c72a54c Thomas Schöpping
 * @brief   AT42QT1050 (touch sensor) test command.
804 b010278f Thomas Schöpping
 */
805 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestAt42qt1050ShellCmd;
806 b010278f Thomas Schöpping
807
#endif /* (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) */
808
809
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
810
811
/**
812 4c72a54c Thomas Schöpping
 * @brief   PCAL6524 (GPIO extender) test command.
813 b010278f Thomas Schöpping
 */
814 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestPcal6524ShellCmd;
815 b010278f Thomas Schöpping
816
/**
817 4c72a54c Thomas Schöpping
 * @brief   AT42QT1050 (touch sensor) test command.
818 b010278f Thomas Schöpping
 */
819 4c72a54c Thomas Schöpping
extern aos_shellcommand_t moduleTestAt42qt1050ShellCmd;
820 b010278f Thomas Schöpping
821
#endif /* (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) */
822
823 4c72a54c Thomas Schöpping
/**
824
 * @brief   Entire module test command.
825
 */
826
extern aos_shellcommand_t moduleTestAllShellCmd;
827
828 b010278f Thomas Schöpping
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) */
829
830
/** @} */
831
832
#endif /* AMIROOS_MODULE_H */
833
834
/** @} */