amiro-os / os / modules / DiWheelDrive_1-1 / module.h @ 76ca5065
History | View | Annotate | Download (17.355 KB)
1 |
/*
|
---|---|
2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
3 |
Copyright (C) 2016..2018 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 |
#ifndef _AMIROOS_MODULE_H_
|
20 |
#define _AMIROOS_MODULE_H_
|
21 |
|
22 |
/*===========================================================================*/
|
23 |
/**
|
24 |
* @name Module specific functions
|
25 |
* @{
|
26 |
*/
|
27 |
/*===========================================================================*/
|
28 |
|
29 |
/** @} */
|
30 |
|
31 |
/*===========================================================================*/
|
32 |
/**
|
33 |
* @name ChibiOS/HAL configuration
|
34 |
* @{
|
35 |
*/
|
36 |
/*===========================================================================*/
|
37 |
#include <hal.h> |
38 |
#include <hal_qei.h> |
39 |
|
40 |
/**
|
41 |
* @brief CAN driver to use.
|
42 |
*/
|
43 |
#define MODULE_HAL_CAN CAND1
|
44 |
|
45 |
/**
|
46 |
* @brief Configuration for the CAN driver.
|
47 |
*/
|
48 |
extern CANConfig moduleHalCanConfig;
|
49 |
|
50 |
/**
|
51 |
* @brief Interrupt driver to use.
|
52 |
*/
|
53 |
#define MODULE_HAL_EXT EXTD1
|
54 |
|
55 |
/**
|
56 |
* @brief Interrupt driver configuration.
|
57 |
*/
|
58 |
extern EXTConfig moduleHalExtConfig;
|
59 |
|
60 |
/**
|
61 |
* @brief I2C driver to access the compass.
|
62 |
*/
|
63 |
#define MODULE_HAL_I2C_COMPASS I2CD1
|
64 |
|
65 |
/**
|
66 |
* @brief Configuration for the compass I2C driver.
|
67 |
*/
|
68 |
extern I2CConfig moduleHalI2cCompassConfig;
|
69 |
|
70 |
/**
|
71 |
* @brief I2C driver to access multiplexer, proximity sensors, EEPROM and power monitor.
|
72 |
*/
|
73 |
#define MODULE_HAL_I2C_PROX_EEPROM_PWRMTR I2CD2
|
74 |
|
75 |
/**
|
76 |
* @brief Configuration for the multiplexer, proximity, EEPROM and power monitor I2C driver.
|
77 |
*/
|
78 |
extern I2CConfig moduleHalI2cProxEepromPwrmtrConfig;
|
79 |
|
80 |
/**
|
81 |
* @brief PWM driver to use.
|
82 |
*/
|
83 |
#define MODULE_HAL_PWM_DRIVE PWMD2
|
84 |
|
85 |
/**
|
86 |
* @brief Configuration for the PWM driver.
|
87 |
*/
|
88 |
extern PWMConfig moduleHalPwmDriveConfig;
|
89 |
|
90 |
/**
|
91 |
* @brief Drive PWM channel for the left wheel forward direction.
|
92 |
*/
|
93 |
#define MODULE_HAL_PWM_DRIVE_CHANNEL_LEFT_FORWARD 0 |
94 |
|
95 |
/**
|
96 |
* @brief Drive PWM channel for the left wheel backward direction.
|
97 |
*/
|
98 |
#define MODULE_HAL_PWM_DRIVE_CHANNEL_LEFT_BACKWARD 1 |
99 |
|
100 |
/**
|
101 |
* @brief Drive PWM channel for the right wheel forward direction.
|
102 |
*/
|
103 |
#define MODULE_HAL_PWM_DRIVE_CHANNEL_RIGHT_FORWARD 2 |
104 |
|
105 |
/**
|
106 |
* @brief Drive PWM channel for the right wheel backward direction.
|
107 |
*/
|
108 |
#define MODULE_HAL_PWM_DRIVE_CHANNEL_RIGHT_BACKWARD 3 |
109 |
|
110 |
/**
|
111 |
* @brief Quadrature encooder for the left wheel.
|
112 |
*/
|
113 |
#define MODULE_HAL_QEI_LEFT_WHEEL QEID3
|
114 |
|
115 |
/**
|
116 |
* @brief Quadrature encooder for the right wheel.
|
117 |
*/
|
118 |
#define MODULE_HAL_QEI_RIGHT_WHEEL QEID4
|
119 |
|
120 |
/**
|
121 |
* @brief Configuration for both quadrature encoders.
|
122 |
*/
|
123 |
extern QEIConfig moduleHalQeiConfig;
|
124 |
|
125 |
/**
|
126 |
* @brief QEI increments per wheel revolution.
|
127 |
* @details 2 signal edges per pulse * 2 signals * 16 pulses per motor revolution * 22:1 gearbox
|
128 |
*/
|
129 |
#define MODULE_HAL_QEI_INCREMENTS_PER_REVOLUTION (apalQEICount_t)(2 * 2 * 16 * 22) |
130 |
|
131 |
/**
|
132 |
* @brief Serial driver of the programmer interface.
|
133 |
*/
|
134 |
#define MODULE_HAL_PROGIF SD1
|
135 |
|
136 |
/**
|
137 |
* @brief Configuration for the programmer serial interface driver.
|
138 |
*/
|
139 |
extern SerialConfig moduleHalProgIfConfig;
|
140 |
|
141 |
/**
|
142 |
* @brief SPI interface driver for the motion sensors (gyroscope and accelerometer).
|
143 |
*/
|
144 |
#define MODULE_HAL_SPI_MOTION SPID1
|
145 |
|
146 |
/**
|
147 |
* @brief Configuration for the motion sensor SPI interface driver to communicate with the accelerometer.
|
148 |
*/
|
149 |
extern SPIConfig moduleHalSpiAccelerometerConfig;
|
150 |
|
151 |
/**
|
152 |
* @brief Configuration for the motion sensor SPI interface driver to communicate with the gyroscope.
|
153 |
*/
|
154 |
extern SPIConfig moduleHalSpiGyroscopeConfig;
|
155 |
|
156 |
/** @} */
|
157 |
|
158 |
/*===========================================================================*/
|
159 |
/**
|
160 |
* @name GPIO definitions
|
161 |
* @{
|
162 |
*/
|
163 |
/*===========================================================================*/
|
164 |
#include <amiro-lld.h> |
165 |
|
166 |
/**
|
167 |
* @brief Interrupt channel for the SYS_SYNC signal.
|
168 |
*/
|
169 |
#define MODULE_GPIO_EXTCHANNEL_SYSSYNC ((expchannel_t)1) |
170 |
|
171 |
/**
|
172 |
* @brief Interrupt channel for the SYS_WARMRST signal.
|
173 |
*/
|
174 |
#define MODULE_GPIO_EXTCHANNEL_SYSWARMRST ((expchannel_t)2) |
175 |
|
176 |
/**
|
177 |
* @brief Interrupt channel for the PATH_DCSTAT signal.
|
178 |
*/
|
179 |
#define MODULE_GPIO_EXTCHANNEL_PATHDCSTAT ((expchannel_t)3) |
180 |
|
181 |
/**
|
182 |
* @brief Interrupt channel for the COMPASS_DRDY signal.
|
183 |
*/
|
184 |
#define MODULE_GPIO_EXTCHANNEL_COMPASSDRDY ((expchannel_t)5) |
185 |
|
186 |
/**
|
187 |
* @brief Interrupt channel for the SYS_PD signal.
|
188 |
*/
|
189 |
#define MODULE_GPIO_EXTCHANNEL_SYSPD ((expchannel_t)7) |
190 |
|
191 |
/**
|
192 |
* @brief Interrupt channel for the SYS_REG_EN signal.
|
193 |
*/
|
194 |
#define MODULE_GPIO_EXTCHANNEL_SYSREGEN ((expchannel_t)8) |
195 |
|
196 |
/**
|
197 |
* @brief Interrupt channel for the IR_INT signal.
|
198 |
*/
|
199 |
#define MODULE_GPIO_EXTCHANNEL_IRINT ((expchannel_t)12) |
200 |
|
201 |
/**
|
202 |
* @brief Interrupt channel for the GYRO_DRDY signal.
|
203 |
*/
|
204 |
#define MODULE_GPIO_EXTCHANNEL_GYRODRDY ((expchannel_t)13) |
205 |
|
206 |
/**
|
207 |
* @brief Interrupt channel for the SYS_UART_UP signal.
|
208 |
*/
|
209 |
#define MODULE_GPIO_EXTCHANNEL_SYSUARTUP ((expchannel_t)14) |
210 |
|
211 |
/**
|
212 |
* @brief Interrupt channel for the ACCEL_INT signal.
|
213 |
*/
|
214 |
#define MODULE_GPIO_EXTCHANNEL_ACCELINT ((expchannel_t)15) |
215 |
|
216 |
/**
|
217 |
* @brief LED output signal GPIO.
|
218 |
*/
|
219 |
extern apalGpio_t moduleGpioLed;
|
220 |
|
221 |
/**
|
222 |
* @brief POWER_EN output signal GPIO.
|
223 |
*/
|
224 |
extern apalGpio_t moduleGpioPowerEn;
|
225 |
|
226 |
/**
|
227 |
* @brief COMPASS_DRDY input signal GPIO.
|
228 |
*/
|
229 |
extern apalGpio_t moduleGpioCompassDrdy;
|
230 |
|
231 |
/**
|
232 |
* @brief IR_INT input signal GPIO.
|
233 |
*/
|
234 |
extern apalGpio_t moduleGpioIrInt;
|
235 |
|
236 |
/**
|
237 |
* @brief GYRO_DRDY input signal GPIO.
|
238 |
*/
|
239 |
extern apalGpio_t moduleGpioGyroDrdy;
|
240 |
|
241 |
/**
|
242 |
* @brief SYS_UART_UP bidirectional signal GPIO.
|
243 |
*/
|
244 |
extern apalGpio_t moduleGpioSysUartUp;
|
245 |
|
246 |
/**
|
247 |
* @brief ACCEL_INT input signal GPIO.
|
248 |
*/
|
249 |
extern apalGpio_t moduleGpioAccelInt;
|
250 |
|
251 |
/**
|
252 |
* @brief SYS_SNYC bidirectional signal GPIO.
|
253 |
*/
|
254 |
extern apalGpio_t moduleGpioSysSync;
|
255 |
|
256 |
/**
|
257 |
* @brief PATH_DCSTAT input signal GPIO.
|
258 |
*/
|
259 |
extern apalGpio_t moduleGpioPathDcStat;
|
260 |
|
261 |
/**
|
262 |
* @brief PATH_DCEN output signal GPIO.
|
263 |
*/
|
264 |
extern apalGpio_t moduleGpioPathDcEn;
|
265 |
|
266 |
/**
|
267 |
* @brief SYS_PD bidirectional signal GPIO.
|
268 |
*/
|
269 |
extern apalGpio_t moduleGpioSysPd;
|
270 |
|
271 |
/**
|
272 |
* @brief SYS_REG_EN input signal GPIO.
|
273 |
*/
|
274 |
extern apalGpio_t moduleGpioSysRegEn;
|
275 |
|
276 |
/**
|
277 |
* @brief SYS_WARMRST bidirectional signal GPIO.
|
278 |
*/
|
279 |
extern apalGpio_t moduleGpioSysWarmrst;
|
280 |
|
281 |
/** @} */
|
282 |
|
283 |
/*===========================================================================*/
|
284 |
/**
|
285 |
* @name AMiRo-OS core configurations
|
286 |
* @{
|
287 |
*/
|
288 |
/*===========================================================================*/
|
289 |
|
290 |
/**
|
291 |
* @brief Event flag to be set on a SYS_SYNC interrupt.
|
292 |
*/
|
293 |
#define MODULE_OS_IOEVENTFLAGS_SYSSYNC ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_SYSSYNC)) |
294 |
|
295 |
/**
|
296 |
* @brief Event flag to be set on a SYS_WARMRST interrupt.
|
297 |
*/
|
298 |
#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_SYSWARMRST)) |
299 |
|
300 |
/**
|
301 |
* @brief Event flag to be set on a PATH_DCSTAT interrupt.
|
302 |
*/
|
303 |
#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_PATHDCSTAT)) |
304 |
|
305 |
/**
|
306 |
* @brief Event flag to be set on a COMPASS_DRDY interrupt.
|
307 |
*/
|
308 |
#define MODULE_OS_IOEVENTFLAGS_COMPASSDRDY ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_COMPASSDRDY)) |
309 |
|
310 |
/**
|
311 |
* @brief Event flag to be set on a SYS_PD interrupt.
|
312 |
*/
|
313 |
#define MODULE_OS_IOEVENTFLAGS_SYSPD ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_SYSPD)) |
314 |
|
315 |
/**
|
316 |
* @brief Event flag to be set on a SYS_REG_EN interrupt.
|
317 |
*/
|
318 |
#define MODULE_OS_IOEVENTFLAGS_SYSREGEN ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_SYSREGEN)) |
319 |
|
320 |
/**
|
321 |
* @brief Event flag to be set on a IR_INT interrupt.
|
322 |
*/
|
323 |
#define MODULE_OS_IOEVENTFLAGS_IRINT ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_IRINT)) |
324 |
|
325 |
/**
|
326 |
* @brief Event flag to be set on a GYRO_DRDY interrupt.
|
327 |
*/
|
328 |
#define MODULE_OS_IOEVENTFLAGS_GYRODRDY ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_GYRODRDY)) |
329 |
|
330 |
/**
|
331 |
* @brief Event flag to be set on a SYS_UART_UP interrupt.
|
332 |
*/
|
333 |
#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_SYSUARTUP)) |
334 |
|
335 |
/**
|
336 |
* @brief Event flag to be set on a ACCEL_INT interrupt.
|
337 |
*/
|
338 |
#define MODULE_OS_IOEVENTFLAGS_ACCELINT ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_ACCELINT)) |
339 |
|
340 |
/**
|
341 |
* @brief PD signal for SSSP.
|
342 |
*/
|
343 |
extern apalControlGpio_t moduleSsspPd;
|
344 |
|
345 |
/**
|
346 |
* @brief SYNC signal for SSSP.
|
347 |
*/
|
348 |
extern apalControlGpio_t moduleSsspSync;
|
349 |
|
350 |
/**
|
351 |
* @brief Shell prompt text.
|
352 |
*/
|
353 |
extern const char* moduleShellPrompt; |
354 |
|
355 |
/**
|
356 |
* @brief Additional HAL initialization hook.
|
357 |
*/
|
358 |
#define MODULE_INIT_HAL_EXTRA() { \
|
359 |
qeiInit(); \ |
360 |
} |
361 |
|
362 |
/**
|
363 |
* @brief Unit test initialization hook.
|
364 |
*/
|
365 |
#define MODULE_INIT_TESTS() { \
|
366 |
/* add unit-test shell commands */ \
|
367 |
aosShellAddCommand(aos.shell, &moduleUtAlldA3906.shellcmd); \ |
368 |
aosShellAddCommand(aos.shell, &moduleUtAlldAt24c01bn.shellcmd); \ |
369 |
aosShellAddCommand(aos.shell, &moduleUtAlldHmc5883l.shellcmd); \ |
370 |
aosShellAddCommand(aos.shell, &moduleUtAlldIna219.shellcmd); \ |
371 |
aosShellAddCommand(aos.shell, &moduleUtAlldL3g4200d.shellcmd); \ |
372 |
aosShellAddCommand(aos.shell, &moduleUtAlldLed.shellcmd); \ |
373 |
aosShellAddCommand(aos.shell, &moduleUtAlldLis331dlh.shellcmd); \ |
374 |
aosShellAddCommand(aos.shell, &moduleUtAlldLtc4412.shellcmd); \ |
375 |
aosShellAddCommand(aos.shell, &moduleUtAlldPca9544a.shellcmd); \ |
376 |
aosShellAddCommand(aos.shell, &moduleUtAlldTps62113.shellcmd); \ |
377 |
aosShellAddCommand(aos.shell, &moduleUtAlldVcnl4020.shellcmd); \ |
378 |
} |
379 |
|
380 |
/**
|
381 |
* @brief Periphery communication interfaces initialization hook.
|
382 |
*/
|
383 |
#define MODULE_INIT_PERIPHERY_COMM() { \
|
384 |
/* serial driver */ \
|
385 |
sdStart(&MODULE_HAL_PROGIF, &moduleHalProgIfConfig); \ |
386 |
/* I2C */ \
|
387 |
moduleHalI2cCompassConfig.clock_speed = (HMC5883L_LLD_I2C_MAXFREQUENCY < moduleHalI2cCompassConfig.clock_speed) ? HMC5883L_LLD_I2C_MAXFREQUENCY : moduleHalI2cCompassConfig.clock_speed; \ |
388 |
moduleHalI2cCompassConfig.duty_cycle = (moduleHalI2cCompassConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2; \
|
389 |
i2cStart(&MODULE_HAL_I2C_COMPASS, &moduleHalI2cCompassConfig); \ |
390 |
moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \ |
391 |
moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \ |
392 |
moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (AT24C01BN_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? AT24C01BN_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \ |
393 |
moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \ |
394 |
moduleHalI2cProxEepromPwrmtrConfig.duty_cycle = (moduleHalI2cProxEepromPwrmtrConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2; \
|
395 |
i2cStart(&MODULE_HAL_I2C_PROX_EEPROM_PWRMTR, &moduleHalI2cProxEepromPwrmtrConfig); \ |
396 |
/* SPI is shared between accelerometer and gyroscope and needs to be restarted for each transmission */ \
|
397 |
/* PWM */ \
|
398 |
pwmStart(&MODULE_HAL_PWM_DRIVE, &moduleHalPwmDriveConfig); \ |
399 |
/* QEI */ \
|
400 |
qeiStart(&MODULE_HAL_QEI_LEFT_WHEEL, &moduleHalQeiConfig); \ |
401 |
qeiStart(&MODULE_HAL_QEI_RIGHT_WHEEL, &moduleHalQeiConfig); \ |
402 |
qeiEnable(&MODULE_HAL_QEI_LEFT_WHEEL); \ |
403 |
qeiEnable(&MODULE_HAL_QEI_RIGHT_WHEEL); \ |
404 |
} |
405 |
|
406 |
/**
|
407 |
* @brief Hook to handle IO events during SSSP startup synchronization.
|
408 |
*/
|
409 |
#define MODULE_SSP_STARTUP_OUTRO_IO_EVENT(mask, flags) { \
|
410 |
/* ignore all events */ \
|
411 |
(void)mask; \
|
412 |
(void)flags; \
|
413 |
} |
414 |
|
415 |
/**
|
416 |
* @brief Periphery communication interface deinitialization hook.
|
417 |
*/
|
418 |
#define MODULE_SHUTDOWN_PERIPHERY_COMM() { \
|
419 |
/* PWM */ \
|
420 |
pwmStop(&MODULE_HAL_PWM_DRIVE); \ |
421 |
/* QEI */ \
|
422 |
qeiDisable(&MODULE_HAL_QEI_LEFT_WHEEL); \ |
423 |
qeiDisable(&MODULE_HAL_QEI_RIGHT_WHEEL); \ |
424 |
qeiStop(&MODULE_HAL_QEI_LEFT_WHEEL); \ |
425 |
qeiStop(&MODULE_HAL_QEI_RIGHT_WHEEL); \ |
426 |
/* I2C */ \
|
427 |
i2cStop(&MODULE_HAL_I2C_COMPASS); \ |
428 |
i2cStop(&MODULE_HAL_I2C_PROX_EEPROM_PWRMTR); \ |
429 |
/* don't stop the serial driver so messages can still be printed */ \
|
430 |
} |
431 |
|
432 |
/** @} */
|
433 |
|
434 |
/*===========================================================================*/
|
435 |
/**
|
436 |
* @name Low-level drivers
|
437 |
* @{
|
438 |
*/
|
439 |
/*===========================================================================*/
|
440 |
#include <alld_a3906.h> |
441 |
#include <alld_at24c01bn-sh-b.h> |
442 |
#include <alld_hmc5883l.h> |
443 |
#include <alld_ina219.h> |
444 |
#include <alld_l3g4200d.h> |
445 |
#include <alld_led.h> |
446 |
#include <alld_lis331dlh.h> |
447 |
#include <alld_ltc4412.h> |
448 |
#include <alld_pca9544a.h> |
449 |
#include <alld_tps62113.h> |
450 |
#include <alld_vcnl4020.h> |
451 |
|
452 |
/**
|
453 |
* @brief Motor driver.
|
454 |
*/
|
455 |
extern A3906Driver moduleLldMotors;
|
456 |
|
457 |
/**
|
458 |
* @brief EEPROM driver.
|
459 |
*/
|
460 |
extern AT24C01BNDriver moduleLldEeprom;
|
461 |
|
462 |
/**
|
463 |
* @brief Compass driver.
|
464 |
*/
|
465 |
extern HMC5883LDriver moduleLldCompass;
|
466 |
|
467 |
/**
|
468 |
* @brief Power monitor (VDD) driver.
|
469 |
*/
|
470 |
extern INA219Driver moduleLldPowerMonitorVdd;
|
471 |
|
472 |
/**
|
473 |
* @brief Gyroscope driver.
|
474 |
*/
|
475 |
extern L3G4200DDriver moduleLldGyroscope;
|
476 |
|
477 |
/**
|
478 |
* @brief Status LED driver.
|
479 |
*/
|
480 |
extern LEDDriver moduleLldStatusLed;
|
481 |
|
482 |
/**
|
483 |
* @brief Accelerometer driver.
|
484 |
*/
|
485 |
extern LIS331DLHDriver moduleLldAccelerometer;
|
486 |
|
487 |
/**
|
488 |
* @brief Power path controler (charging pins) driver.
|
489 |
*/
|
490 |
extern LTC4412Driver moduleLldPowerPathController;
|
491 |
|
492 |
/**
|
493 |
* @brief I2C multiplexer driver.
|
494 |
*/
|
495 |
extern PCA9544ADriver moduleLldI2cMultiplexer;
|
496 |
|
497 |
/**
|
498 |
* @brief Step down converter (VDRIVE) driver.
|
499 |
*/
|
500 |
extern TPS62113Driver moduleLldStepDownConverterVdrive;
|
501 |
|
502 |
/**
|
503 |
* @brief Proximity sensor driver.
|
504 |
*/
|
505 |
extern VCNL4020Driver moduleLldProximity;
|
506 |
|
507 |
/** @} */
|
508 |
|
509 |
/*===========================================================================*/
|
510 |
/**
|
511 |
* @name Unit tests (UT)
|
512 |
* @{
|
513 |
*/
|
514 |
/*===========================================================================*/
|
515 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
516 |
#include <ut_alld_a3906.h> |
517 |
#include <ut_alld_at24c01bn-sh-b.h> |
518 |
#include <ut_alld_hmc5883l.h> |
519 |
#include <ut_alld_ina219.h> |
520 |
#include <ut_alld_l3g4200d.h> |
521 |
#include <ut_alld_led.h> |
522 |
#include <ut_alld_lis331dlh.h> |
523 |
#include <ut_alld_ltc4412.h> |
524 |
#include <ut_alld_pca9544a.h> |
525 |
#include <ut_alld_tps62113.h> |
526 |
#include <ut_alld_vcnl4020.h> |
527 |
|
528 |
/**
|
529 |
* @brief A3906 (motor driver) unit test object.
|
530 |
*/
|
531 |
extern aos_unittest_t moduleUtAlldA3906;
|
532 |
|
533 |
/**
|
534 |
* @brief AT24C01BN-SH-B (EEPROM) unit test object.
|
535 |
*/
|
536 |
extern aos_unittest_t moduleUtAlldAt24c01bn;
|
537 |
|
538 |
/**
|
539 |
* @brief HMC5883L (compass) unit test object.
|
540 |
*/
|
541 |
extern aos_unittest_t moduleUtAlldHmc5883l;
|
542 |
|
543 |
/**
|
544 |
* @brief INA219 (power monitor) unit test object.
|
545 |
*/
|
546 |
extern aos_unittest_t moduleUtAlldIna219;
|
547 |
|
548 |
/**
|
549 |
* @brief L3G4200D (gyroscope) unit test object.
|
550 |
*/
|
551 |
extern aos_unittest_t moduleUtAlldL3g4200d;
|
552 |
|
553 |
/**
|
554 |
* @brief Status LED unit test object.
|
555 |
*/
|
556 |
extern aos_unittest_t moduleUtAlldLed;
|
557 |
|
558 |
/**
|
559 |
* @brief LIS331DLH (accelerometer) unit test object.
|
560 |
*/
|
561 |
extern aos_unittest_t moduleUtAlldLis331dlh;
|
562 |
|
563 |
/**
|
564 |
* @brief LTC4412 (power path controller) unit test object.
|
565 |
*/
|
566 |
extern aos_unittest_t moduleUtAlldLtc4412;
|
567 |
|
568 |
/**
|
569 |
* @brief PCA9544A (I2C multiplexer) unit test object.
|
570 |
*/
|
571 |
extern aos_unittest_t moduleUtAlldPca9544a;
|
572 |
|
573 |
/**
|
574 |
* @brief TPS62113 (step-down converter) unit test object.
|
575 |
*/
|
576 |
extern aos_unittest_t moduleUtAlldTps62113;
|
577 |
|
578 |
/**
|
579 |
* @brief VCNL4020 (proximity sensor) unit test object.
|
580 |
*/
|
581 |
extern aos_unittest_t moduleUtAlldVcnl4020;
|
582 |
|
583 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
584 |
|
585 |
/** @} */
|
586 |
|
587 |
#endif /* _AMIROOS_MODULE_H_ */ |