Revision 4c72a54c modules/DiWheelDrive_1-2/module.h

View differences:

modules/DiWheelDrive_1-2/module.h
306 306
}
307 307

  
308 308
/**
309
 * @brief   Unit test initialization hook.
309
 * @brief   Test initialization hook.
310 310
 */
311 311
#define MODULE_INIT_TESTS() {                                                 \
312
  /* add unit-test shell commands */                                          \
313
  aosShellAddCommand(&aos.shell, &moduleUtAlldA3906.shellcmd);                \
314
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01b.shellcmd);             \
315
  aosShellAddCommand(&aos.shell, &moduleUtAlldIna219.shellcmd);               \
316
  aosShellAddCommand(&aos.shell, &moduleUtAlldLed.shellcmd);                  \
317
  aosShellAddCommand(&aos.shell, &moduleUtAlldLtc4412.shellcmd);              \
318
  aosShellAddCommand(&aos.shell, &moduleUtAlldPca9544a.shellcmd);             \
319
  aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113.shellcmd);             \
320
  aosShellAddCommand(&aos.shell, &moduleUtAlldVcnl4020.shellcmd);             \
312
  /* initialize tests and add to shell */                                     \
313
  aosShellAddCommand(&aos.shell, &moduleTestA3906ShellCmd);                   \
314
  aosShellAddCommand(&aos.shell, &moduleTestAt24c01bShellCmd);                \
315
  /* TODO: add BNO055 test command */                                         \
316
  aosShellAddCommand(&aos.shell, &moduleTestIna219ShellCmd);                  \
317
  aosShellAddCommand(&aos.shell, &moduleTestLedShellCmd);                     \
318
  aosShellAddCommand(&aos.shell, &moduleTestLtc4412ShellCmd);                 \
319
  aosShellAddCommand(&aos.shell, &moduleTestPca9544aShellCmd);                \
320
  aosShellAddCommand(&aos.shell, &moduleTestTps62113ShellCmd);                \
321
  aosShellAddCommand(&aos.shell, &moduleTestVcnl4020ShellCmd);                \
322
  aosShellAddCommand(&aos.shell, &moduleTestAllShellCmd);                     \
321 323
}
322 324

  
323 325
/**
324 326
 * @brief   Periphery communication interfaces initialization hook.
325 327
 */
326
#define MODULE_INIT_PERIPHERY_COMM() {                                        \
328
#define MODULE_INIT_PERIPHERY_IF() {                                          \
327 329
  /* serial driver */                                                         \
328 330
  sdStart(&MODULE_HAL_PROGIF, &moduleHalProgIfConfig);                        \
329 331
  /* I2C */                                                                   \
......
347 349
/**
348 350
 * @brief   Periphery communication interface deinitialization hook.
349 351
 */
350
#define MODULE_SHUTDOWN_PERIPHERY_COMM() {                                    \
352
#define MODULE_SHUTDOWN_PERIPHERY_IF() {                                      \
351 353
  /* PWM */                                                                   \
352 354
  pwmStop(&MODULE_HAL_PWM_DRIVE);                                             \
353 355
  /* QEI */                                                                   \
......
410 412
/*===========================================================================*/
411 413
#include <alld_A3906.h>
412 414
#include <alld_AT24C01B.h>
415
// TODO: add BNO055 IMU
413 416
#include <alld_INA219.h>
414 417
#include <alld_LED.h>
415 418
#include <alld_LTC4412.h>
......
417 420
#include <alld_TPS6211x.h>
418 421
#include <alld_VCNL4020.h>
419 422

  
420
// TODO: add BNO055 IMU
421

  
422 423
/**
423 424
 * @brief   Motor driver.
424 425
 */
......
429 430
 */
430 431
extern AT24C01BDriver moduleLldEeprom;
431 432

  
433
// TODO: add BNO055 IMU
434

  
432 435
/**
433 436
 * @brief   Power monitor (VDD) driver.
434 437
 */
......
463 466

  
464 467
/*===========================================================================*/
465 468
/**
466
 * @name Unit tests (UT)
469
 * @name Tests
467 470
 * @{
468 471
 */
469 472
/*===========================================================================*/
470 473
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
471
#include <ut_alld_A3906_v1.h>
472
#include <ut_alld_AT24C01B_v1.h>
473
#include <ut_alld_INA219_v1.h>
474
#include <ut_alld_LED_v1.h>
475
#include <ut_alld_LTC4412_v1.h>
476
#include <ut_alld_PCA9544A_v1.h>
477
#include <ut_alld_TPS6211x_v1.h>
478
#include <ut_alld_VCNL4020_v1.h>
479 474

  
480
// TODO: add BNO055 IMU
475
/**
476
 * @brief   A3906 (motor driver) test command.
477
 */
478
extern aos_shellcommand_t moduleTestA3906ShellCmd;
481 479

  
482 480
/**
483
 * @brief   A3906 (motor driver) unit test object.
481
 * @brief   AT24C01BN-SH-B (EEPROM) test command.
484 482
 */
485
extern aos_unittest_t moduleUtAlldA3906;
483
extern aos_shellcommand_t moduleTestAt24c01bShellCmd;
484

  
485
// TODO: add BNO055
486 486

  
487 487
/**
488
 * @brief   AT24C01BN-SH-B (EEPROM) unit test object.
488
 * @brief   INA219 (power monitor) test command.
489 489
 */
490
extern aos_unittest_t moduleUtAlldAt24c01b;
490
extern aos_shellcommand_t moduleTestIna219ShellCmd;
491 491

  
492 492
/**
493
 * @brief   INA219 (power monitor) unit test object.
493
 * @brief   Status LED test command.
494 494
 */
495
extern aos_unittest_t moduleUtAlldIna219;
495
extern aos_shellcommand_t moduleTestLedShellCmd;
496 496

  
497 497
/**
498
 * @brief   Status LED unit test object.
498
 * @brief   LTC4412 (power path controller) test command.
499 499
 */
500
extern aos_unittest_t moduleUtAlldLed;
500
extern aos_shellcommand_t moduleTestLtc4412ShellCmd;
501 501

  
502 502
/**
503
 * @brief   LTC4412 (power path controller) unit test object.
503
 * @brief   PCA9544A (I2C multiplexer) test command.
504 504
 */
505
extern aos_unittest_t moduleUtAlldLtc4412;
505
extern aos_shellcommand_t moduleTestPca9544aShellCmd;
506 506

  
507 507
/**
508
 * @brief   PCA9544A (I2C multiplexer) unit test object.
508
 * @brief   TPS62113 (step-down converter) test command.
509 509
 */
510
extern aos_unittest_t moduleUtAlldPca9544a;
510
extern aos_shellcommand_t moduleTestTps62113ShellCmd;
511 511

  
512 512
/**
513
 * @brief   TPS62113 (step-down converter) unit test object.
513
 * @brief   VCNL4020 (proximity sensor) test command.
514 514
 */
515
extern aos_unittest_t moduleUtAlldTps62113;
515
extern aos_shellcommand_t moduleTestVcnl4020ShellCmd;
516 516

  
517 517
/**
518
 * @brief   VCNL4020 (proximity sensor) unit test object.
518
 * @brief   Entire module test command.
519 519
 */
520
extern aos_unittest_t moduleUtAlldVcnl4020;
520
extern aos_shellcommand_t moduleTestAllShellCmd;
521 521

  
522 522
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) */
523 523

  

Also available in: Unified diff