Revision ddf34c3d

View differences:

modules/DiWheelDrive_1-1/alldconf.h
46 46
/**
47 47
 * @brief   Enable flag for the A3906 motor driver.
48 48
 */
49
#define AMIROLLD_CFG_USE_A3906
49
#define AMIROLLD_CFG_A3906              1
50 50

  
51 51
/**
52 52
 * @brief   Enable flag for the AT24C01BN-SH-B EEPROM.
53 53
 */
54
#define AMIROLLD_CFG_USE_AT24C01BN
54
#define AMIROLLD_CFG_AT24C01B           1
55 55

  
56 56
/**
57 57
 * @brief   Enable flag for the MHC5883L compass.
58 58
 */
59
#define AMIROLLD_CFG_USE_HMC5883L
59
#define AMIROLLD_CFG_HMC5883L           1
60 60

  
61 61
/**
62 62
 * @brief   Enable flag for the INA219 power monitor.
63 63
 */
64
#define AMIROLLD_CFG_USE_INA219
64
#define AMIROLLD_CFG_INA219             1
65 65

  
66 66
/**
67 67
 * @brief   Enable flag for the L3G4200D gyroscope.
68 68
 */
69
#define AMIROLLD_CFG_USE_L3G4200D
69
#define AMIROLLD_CFG_L3G4200D           1
70 70

  
71 71
/**
72 72
 * @brief   Enable flag for the status LED.
73 73
 */
74
#define AMIROLLD_CFG_USE_LED
74
#define AMIROLLD_CFG_LED                1
75 75

  
76 76
/**
77 77
 * @brief   Enable flag for the LIS331DLH accelerometer.
78 78
 */
79
#define AMIROLLD_CFG_USE_LIS331DLH
79
#define AMIROLLD_CFG_LIS331DLH          1
80 80

  
81 81
/**
82 82
 * @brief   Enable flag for the LTC4412 power path controller.
83 83
 */
84
#define AMIROLLD_CFG_USE_LTC4412
84
#define AMIROLLD_CFG_LTC4412            1
85 85

  
86 86
/**
87 87
 * @brief   Enable flag for the PCA9544A I2C multiplexer.
88 88
 */
89
#define AMIROLLD_CFG_USE_PCA9544A
89
#define AMIROLLD_CFG_PCA9544A           1
90 90

  
91 91
/**
92 92
 * @brief   Enable flag for the TPS62113 step-down converter.
93 93
 */
94
#define AMIROLLD_CFG_USE_TPS62113
94
#define AMIROLLD_CFG_TPS6211x           1
95 95

  
96 96
/**
97 97
 * @brief   Enable flag for the VCNL4020 proximity sensor.
98 98
 */
99
#define AMIROLLD_CFG_USE_VCNL4020
99
#define AMIROLLD_CFG_VCNL4020           1
100 100

  
101 101
#endif /* ALLDCONF_H */
102 102

  
modules/DiWheelDrive_1-1/module.c
378 378
  /* power enable GPIO  */ &moduleGpioPowerEn,
379 379
};
380 380

  
381
AT24C01BNDriver moduleLldEeprom = {
381
AT24C01BDriver moduleLldEeprom = {
382 382
  /* I2C driver   */ &MODULE_HAL_I2C_PROX_EEPROM_PWRMTR,
383
  /* I²C address  */ AT24C01BN_LLD_I2C_ADDR_FIXED,
383
  /* I²C address  */ AT24C01B_LLD_I2C_ADDR_FIXED,
384 384
};
385 385

  
386 386
HMC5883LDriver moduleLldCompass = {
......
416 416
  /* I²C address  */ PCA9544A_LLD_I2C_ADDR_FIXED | PCA9544A_LLD_I2C_ADDR_A0 | PCA9544A_LLD_I2C_ADDR_A1 | PCA9544A_LLD_I2C_ADDR_A2,
417 417
};
418 418

  
419
TPS62113Driver moduleLldStepDownConverterVdrive = {
419
TPS6211xDriver moduleLldStepDownConverterVdrive = {
420 420
  /* Power enable Gpio */ &moduleGpioPowerEn,
421 421
};
422 422

  
......
480 480
};
481 481

  
482 482
/*
483
 * AT24C01BN (EEPROM)
483
 * AT24C01B (EEPROM)
484 484
 */
485
static int _utShellCmdCb_AlldAt24c01bn(BaseSequentialStream* stream, int argc, char* argv[])
485
static int _utShellCmdCb_AlldAt24c01b(BaseSequentialStream* stream, int argc, char* argv[])
486 486
{
487 487
  (void)argc;
488 488
  (void)argv;
489
  aosUtRun(stream, &moduleUtAlldAt24c01bn, NULL);
489
  aosUtRun(stream, &moduleUtAlldAt24c01b, NULL);
490 490
  return AOS_OK;
491 491
}
492
static ut_at24c01bndata_t _utAt24c01bnData = {
492
static ut_at24c01bdata_t _utAlldAt24c01bData = {
493 493
  /* driver   */ &moduleLldEeprom,
494 494
  /* timeout  */ MICROSECONDS_PER_SECOND,
495 495
};
496
aos_unittest_t moduleUtAlldAt24c01bn = {
497
  /* name           */ "AT24C01BN-SH-B",
496
aos_unittest_t moduleUtAlldAt24c01b = {
497
  /* name           */ "AT24C01B",
498 498
  /* info           */ "1kbit EEPROM",
499
  /* test function  */ utAlldAt24c01bnFunc,
499
  /* test function  */ utAlldAt24c01bFunc,
500 500
  /* shell command  */ {
501 501
    /* name     */ "unittest:EEPROM",
502
    /* callback */ _utShellCmdCb_AlldAt24c01bn,
502
    /* callback */ _utShellCmdCb_AlldAt24c01b,
503 503
    /* next     */ NULL,
504 504
  },
505
  /* data           */ &_utAt24c01bnData,
505
  /* data           */ &_utAlldAt24c01bData,
506 506
};
507 507

  
508 508
/*
......
704 704
aos_unittest_t moduleUtAlldTps62113 = {
705 705
  /* name           */ "TPS62113",
706 706
  /* info           */ "Step down converter",
707
  /* test function  */ utAlldTps62113Func,
707
  /* test function  */ utAlldTps6211xFunc,
708 708
  /* shell command  */ {
709 709
    /* name     */ "unittest:StepDownConverter",
710 710
    /* callback */ _utShellCmdCb_AlldTps62113,
modules/DiWheelDrive_1-1/module.h
337 337
#define MODULE_INIT_TESTS() {                                                 \
338 338
  /* add unit-test shell commands */                                          \
339 339
  aosShellAddCommand(&aos.shell, &moduleUtAlldA3906.shellcmd);                \
340
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01bn.shellcmd);            \
340
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01b.shellcmd);            \
341 341
  aosShellAddCommand(&aos.shell, &moduleUtAlldHmc5883l.shellcmd);             \
342 342
  aosShellAddCommand(&aos.shell, &moduleUtAlldIna219.shellcmd);               \
343 343
  aosShellAddCommand(&aos.shell, &moduleUtAlldL3g4200d.shellcmd);             \
......
361 361
  i2cStart(&MODULE_HAL_I2C_COMPASS, &moduleHalI2cCompassConfig);              \
362 362
  moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \
363 363
  moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \
364
  moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (AT24C01BN_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? AT24C01BN_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \
364
  moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (AT24C01B_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? AT24C01B_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \
365 365
  moduleHalI2cProxEepromPwrmtrConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxEepromPwrmtrConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxEepromPwrmtrConfig.clock_speed; \
366 366
  moduleHalI2cProxEepromPwrmtrConfig.duty_cycle = (moduleHalI2cProxEepromPwrmtrConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
367 367
  i2cStart(&MODULE_HAL_I2C_PROX_EEPROM_PWRMTR, &moduleHalI2cProxEepromPwrmtrConfig);  \
......
439 439
 * @{
440 440
 */
441 441
/*===========================================================================*/
442
#include <alld_a3906.h>
443
#include <alld_at24c01bn-sh-b.h>
444
#include <alld_hmc5883l.h>
445
#include <alld_ina219.h>
446
#include <alld_l3g4200d.h>
447
#include <alld_led.h>
448
#include <alld_lis331dlh.h>
449
#include <alld_ltc4412.h>
450
#include <alld_pca9544a.h>
451
#include <alld_tps62113.h>
452
#include <alld_vcnl4020.h>
442
#include <alld_A3906.h>
443
#include <alld_AT24C01B.h>
444
#include <alld_HMC5883L.h>
445
#include <alld_INA219.h>
446
#include <alld_L3G4200D.h>
447
#include <alld_LED.h>
448
#include <alld_LIS331DLH.h>
449
#include <alld_LTC4412.h>
450
#include <alld_PCA9544A.h>
451
#include <alld_TPS6211x.h>
452
#include <alld_VCNL4020.h>
453 453

  
454 454
/**
455 455
 * @brief   Motor driver.
......
459 459
/**
460 460
 * @brief   EEPROM driver.
461 461
 */
462
extern AT24C01BNDriver moduleLldEeprom;
462
extern AT24C01BDriver moduleLldEeprom;
463 463

  
464 464
/**
465 465
 * @brief   Compass driver.
......
499 499
/**
500 500
 * @brief   Step down converter (VDRIVE) driver.
501 501
 */
502
extern TPS62113Driver moduleLldStepDownConverterVdrive;
502
extern TPS6211xDriver moduleLldStepDownConverterVdrive;
503 503

  
504 504
/**
505 505
 * @brief   Proximity sensor driver.
......
515 515
 */
516 516
/*===========================================================================*/
517 517
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
518
#include <ut_alld_a3906.h>
519
#include <ut_alld_at24c01bn-sh-b.h>
520
#include <ut_alld_hmc5883l.h>
521
#include <ut_alld_ina219.h>
522
#include <ut_alld_l3g4200d.h>
523
#include <ut_alld_led.h>
524
#include <ut_alld_lis331dlh.h>
525
#include <ut_alld_ltc4412.h>
526
#include <ut_alld_pca9544a.h>
527
#include <ut_alld_tps62113.h>
528
#include <ut_alld_vcnl4020.h>
518
#include <ut_alld_A3906_v1.h>
519
#include <ut_alld_AT24C01B_v1.h>
520
#include <ut_alld_HMC5883L_v1.h>
521
#include <ut_alld_INA219_v1.h>
522
#include <ut_alld_L3G4200D_v1.h>
523
#include <ut_alld_LED_v1.h>
524
#include <ut_alld_LIS331DLH_v1.h>
525
#include <ut_alld_LTC4412_v1.h>
526
#include <ut_alld_PCA9544A_v1.h>
527
#include <ut_alld_TPS6211x_v1.h>
528
#include <ut_alld_VCNL4020_v1.h>
529 529

  
530 530
/**
531 531
 * @brief   A3906 (motor driver) unit test object.
......
535 535
/**
536 536
 * @brief   AT24C01BN-SH-B (EEPROM) unit test object.
537 537
 */
538
extern aos_unittest_t moduleUtAlldAt24c01bn;
538
extern aos_unittest_t moduleUtAlldAt24c01b;
539 539

  
540 540
/**
541 541
 * @brief   HMC5883L (compass) unit test object.
modules/LightRing_1-0/alldconf.h
46 46
/**
47 47
 * @brief   Enable flag for the AT24C01BN-SH-B EEPROM.
48 48
 */
49
#define AMIROLLD_CFG_USE_AT24C01BN
49
#define AMIROLLD_CFG_AT24C01B           1
50 50

  
51 51
/**
52 52
 * @brief   Enable flag for the TLC5947 LED driver.
53 53
 */
54
#define AMIROLLD_CFG_USE_TLC5947
54
#define AMIROLLD_CFG_TLC5947            1
55 55

  
56 56
/**
57 57
 * @brief   Enable flag for the TPS2051BDBV power switch.
58 58
 */
59
#define AMIROLLD_CFG_USE_TPS2051BDBV
59
#define AMIROLLD_CFG_TPS20xxB           1
60 60

  
61 61
#endif /* ALLDCONF_H */
62 62

  
modules/LightRing_1-0/module.c
112 112
  /* GPIO */ &_gpioLaserEn,
113 113
  /* meta */ {
114 114
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
115
    /* active state   */ TPS2051B_LLD_ENABLE_ACTIVE_STATE,
115
    /* active state   */ TPS20xxB_LLD_ENABLE_ACTIVE_STATE,
116 116
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
117 117
  },
118 118
};
......
128 128
  /* GPIO */ &_gpioLaserOc,
129 129
  /* meta */ {
130 130
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
131
    /* active state   */ TPS2051B_LLD_OVERCURRENT_ACTIVE_STATE,
131
    /* active state   */ TPS20xxB_LLD_OVERCURRENT_ACTIVE_STATE,
132 132
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
133 133
  },
134 134
};
......
260 260
 */
261 261
/*===========================================================================*/
262 262

  
263
AT24C01BNDriver moduleLldEeprom = {
263
AT24C01BDriver moduleLldEeprom = {
264 264
  /* I2C driver   */ &MODULE_HAL_I2C_EEPROM,
265 265
  /* I2C address  */ 0x00u,
266 266
};
......
271 271
  /* XLAT signal GPIO   */ &moduleGpioLightXlat,
272 272
};
273 273

  
274
TPS2051BDriver moduleLldPowerSwitchLaser = {
274
TPS20xxBDriver moduleLldPowerSwitchLaser = {
275 275
  /* laser enable GPIO      */ &moduleGpioLaserEn,
276 276
  /* laser overcurrent GPIO */ &moduleGpioLaserOc,
277 277
};
......
287 287
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
288 288

  
289 289
/*
290
 * EEPROM (AT24C01BN)
290
 * EEPROM (AT24C01B)
291 291
 */
292
static int _utShellCmdCb_AlldAt24c01bn(BaseSequentialStream* stream, int argc, char* argv[])
292
static int _utShellCmdCb_AlldAt24c01b(BaseSequentialStream* stream, int argc, char* argv[])
293 293
{
294 294
  (void)argc;
295 295
  (void)argv;
296
  aosUtRun(stream, &moduleUtAlldAt24c01bn, NULL);
296
  aosUtRun(stream, &moduleUtAlldAt24c01b, NULL);
297 297
  return AOS_OK;
298 298
}
299
static ut_at24c01bndata_t _utAt24c01bnData = {
299
static ut_at24c01bdata_t _utAlldAt24c01bData = {
300 300
  /* driver   */ &moduleLldEeprom,
301 301
  /* timeout  */ MICROSECONDS_PER_SECOND,
302 302
};
303
aos_unittest_t moduleUtAlldAt24c01bn = {
304
  /* name           */ "AT24C01BN-SH-B",
303
aos_unittest_t moduleUtAlldAt24c01b = {
304
  /* name           */ "AT24C01B",
305 305
  /* info           */ "1kbit EEPROM",
306
  /* test function  */ utAlldAt24c01bnFunc,
306
  /* test function  */ utAlldAt24c01bFunc,
307 307
  /* shell command  */ {
308 308
    /* name     */ "unittest:EEPROM",
309
    /* callback */ _utShellCmdCb_AlldAt24c01bn,
309
    /* callback */ _utShellCmdCb_AlldAt24c01b,
310 310
    /* next     */ NULL,
311 311
  },
312
  /* data           */ &_utAt24c01bnData,
312
  /* data           */ &_utAlldAt24c01bData,
313 313
};
314 314

  
315 315
/*
316
 * LED PWM driver (TLD5947)
316
 * LED PWM driver (TLC5947)
317 317
 */
318 318
static int _utShellCmdCb_Tlc5947(BaseSequentialStream* stream, int argc, char* argv[])
319 319
{
......
335 335
};
336 336

  
337 337
/*
338
 * power switch (Laser)
338
 * power switch (TPS2051BDBV)
339 339
 */
340 340
static int _utShellCmdCb_Tps2051bdbv(BaseSequentialStream* stream, int argc, char* argv[])
341 341
{
......
347 347
aos_unittest_t moduleUtAlldTps2051bdbv = {
348 348
  /* info           */ "TPS2051BDBV",
349 349
  /* name           */ "current-limited power switch",
350
  /* test function  */ utAlldTps2051bdbvFunc,
350
  /* test function  */ utAlldTps20xxbFunc,
351 351
  /* shell command  */ {
352 352
    /* name     */ "unittest:PowerSwitch",
353 353
    /* callback */ _utShellCmdCb_Tps2051bdbv,
modules/LightRing_1-0/module.h
221 221
 */
222 222
#define MODULE_INIT_TESTS() {                                                 \
223 223
  /* add unit-test shell commands */                                          \
224
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01bn.shellcmd);            \
224
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01b.shellcmd);            \
225 225
  aosShellAddCommand(&aos.shell, &moduleUtAlldTlc5947.shellcmd);              \
226 226
  aosShellAddCommand(&aos.shell, &moduleUtAlldTps2051bdbv.shellcmd);          \
227 227
}
......
233 233
  /* serial driver */                                                         \
234 234
  sdStart(&MODULE_HAL_PROGIF, &moduleHalProgIfConfig);                        \
235 235
  /* I2C */                                                                   \
236
  moduleHalI2cEepromConfig.clock_speed = (AT24C01BN_LLD_I2C_MAXFREQUENCY < moduleHalI2cEepromConfig.clock_speed) ? AT24C01BN_LLD_I2C_MAXFREQUENCY : moduleHalI2cEepromConfig.clock_speed; \
236
  moduleHalI2cEepromConfig.clock_speed = (AT24C01B_LLD_I2C_MAXFREQUENCY < moduleHalI2cEepromConfig.clock_speed) ? AT24C01B_LLD_I2C_MAXFREQUENCY : moduleHalI2cEepromConfig.clock_speed; \
237 237
  moduleHalI2cEepromConfig.duty_cycle = (moduleHalI2cEepromConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
238 238
  i2cStart(&MODULE_HAL_I2C_EEPROM, &moduleHalI2cEepromConfig);                \
239 239
  /* SPI */                                                                   \
......
300 300
 * @{
301 301
 */
302 302
/*===========================================================================*/
303
#include <alld_at24c01bn-sh-b.h>
304
#include <alld_tlc5947.h>
305
#include <alld_tps2051bdbv.h>
303
#include <alld_AT24C01B.h>
304
#include <alld_TLC5947.h>
305
#include <alld_TPS20xxB.h>
306 306

  
307 307
/**
308 308
 * @brief   EEPROM driver.
309 309
 */
310
extern AT24C01BNDriver moduleLldEeprom;
310
extern AT24C01BDriver moduleLldEeprom;
311 311

  
312 312
/**
313 313
 * @brief   LED PWM driver.
......
317 317
/**
318 318
 * @brief   Power switch driver for the laser supply power.
319 319
 */
320
extern TPS2051BDriver moduleLldPowerSwitchLaser;
320
extern TPS20xxBDriver moduleLldPowerSwitchLaser;
321 321

  
322 322
/** @} */
323 323

  
......
328 328
 */
329 329
/*===========================================================================*/
330 330
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
331
#include <ut_alld_at24c01bn-sh-b.h>
332
#include <ut_alld_tlc5947.h>
333
#include <ut_alld_tps2051bdbv.h>
331
#include <ut_alld_AT24C01B_v1.h>
332
#include <ut_alld_TLC5947_v1.h>
333
#include <ut_alld_TPS20xxB_v1.h>
334 334

  
335 335
/**
336 336
 * @brief   EEPROM unit test object.
337 337
 */
338
extern aos_unittest_t moduleUtAlldAt24c01bn;
338
extern aos_unittest_t moduleUtAlldAt24c01b;
339 339

  
340 340
/**
341 341
 * @brief   LED PWM driver unit test object.
modules/PowerManagement_1-1/alldconf.h
49 49
/**
50 50
 * @brief   Enable flag for the AT24C01BN-SH-B EEPROM.
51 51
 */
52
#define AMIROLLD_CFG_USE_AT24C01BN
52
#define AMIROLLD_CFG_AT24C01B           1
53 53

  
54 54
/**
55 55
 * @brief   Enable flag for the BQ24103A charger.
56 56
 */
57
#define AMIROLLD_CFG_USE_BQ24103A
57
#define AMIROLLD_CFG_BQ241xx            1
58 58

  
59 59
/**
60 60
 * @brief   Enable flag for the BQ27500 fuel gauge.
61 61
 */
62
#define AMIROLLD_CFG_USE_BQ27500
62
#define AMIROLLD_CFG_BQ27500            1
63 63

  
64 64
/**
65 65
 * @brief   Enable flag for the INA219 power monitor.
66 66
 */
67
#define AMIROLLD_CFG_USE_INA219
67
#define AMIROLLD_CFG_INA219             1
68 68

  
69 69
/**
70 70
 * @brief   Enable flag for the status LED.
71 71
 */
72
#define AMIROLLD_CFG_USE_LED
72
#define AMIROLLD_CFG_LED                1
73 73

  
74 74
/**
75 75
 * @brief   Enable flag for the PKLCS1212E4001 buzzer.
76 76
 */
77
#define AMIROLLD_CFG_USE_PKLCS1212E4001
77
#define AMIROLLD_CFG_PKxxxExxx          1
78
#define PKxxxExxx_LLD_FREQUENCY_MIN     2000
79
#define PKxxxExxx_LLD_FREQUENCY_SPEC    4000
80
#define PKxxxExxx_LLD_FREQUENCY_MAX     6000
78 81

  
79 82
/**
80 83
 * @brief   Enable flag for the TPS2051BDBV power switch.
81 84
 */
82
#define AMIROLLD_CFG_USE_TPS2051BDBV
85
#define AMIROLLD_CFG_TPS20xxB           1
83 86

  
84 87
/**
85 88
 * @brief   Enable flag for the TPS62113 step-down converter.
86 89
 */
87
#define AMIROLLD_CFG_USE_TPS62113
90
#define AMIROLLD_CFG_TPS6211x           1
88 91

  
89 92
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
90 93

  
91 94
/**
92 95
 * @brief   Enable flag for the MPR121 touch sensor.
93 96
 */
94
#define AMIROLLD_CFG_USE_MPR121
97
#define AMIROLLD_CFG_MPR121             1
95 98

  
96 99
/**
97 100
 * @brief   Enable flag for the PCA9544A I2C multiplexer.
98 101
 */
99
#define AMIROLLD_CFG_USE_PCA9544A
102
#define AMIROLLD_CFG_PCA9544A           1
100 103

  
101 104
/**
102 105
 * @brief   Enable flag for the VCNL4020 proximity sensor.
103 106
 */
104
#define AMIROLLD_CFG_USE_VCNL4020
107
#define AMIROLLD_CFG_VCNL4020           1
105 108

  
106 109
#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
107 110

  
......
110 113
/**
111 114
 * @brief   Enable flag for the PCAL6524 GPIO extender
112 115
 */
113
#define AMIROLLD_CFG_USE_PCAL6524
116
#define AMIROLLD_CFG_PCAL6524           1
114 117

  
115 118
/**
116 119
 * @brief   Enable flag for the AT42Q1050 touch sensor.
117 120
 */
118
#define AMIROLLD_CFG_USE_AT42QT1050
121
#define AMIROLLD_CFG_AT42QT1050         1
119 122

  
120 123
#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
121 124

  
......
124 127
/**
125 128
 * @brief   Enable flag for the PCAL6524 GPIO extender
126 129
 */
127
#define AMIROLLD_CFG_USE_PCAL6524
130
#define AMIROLLD_CFG_PCAL6524           1
128 131

  
129 132
/**
130 133
 * @brief   Enable flag for the AT42Q1050 touch sensor.
131 134
 */
132
#define AMIROLLD_CFG_USE_AT42QT1050
135
#define AMIROLLD_CFG_AT42QT1050         1
133 136

  
134 137
#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
135 138

  
modules/PowerManagement_1-1/board.h
91 91
/*
92 92
 * Configuration macro to define which type of sensor ring is attached.
93 93
 */
94
#define BOARD_SENSORRING                  BOARD_PROXIMITYSENSOR
94
#define BOARD_SENSORRING                BOARD_PROXIMITYSENSOR
95 95

  
96 96
/*
97 97
 * IO pins assignments.
modules/PowerManagement_1-1/module.c
206 206
  /* GPIO */ &_gpioChargeStat2A,
207 207
  /* meta */ {
208 208
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
209
    /* active state   */ BQ24103A_LLD_CHARGE_STATUS_GPIO_ACTIVE_STATE,
209
    /* active state   */ BQ241xx_LLD_CHARGE_STATUS_GPIO_ACTIVE_STATE,
210 210
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
211 211
  },
212 212
};
......
286 286
  /* GPIO */ &_gpioChargeStat1A,
287 287
  /* meta */ {
288 288
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
289
    /* active state   */ BQ24103A_LLD_CHARGE_STATUS_GPIO_ACTIVE_STATE,
289
    /* active state   */ BQ241xx_LLD_CHARGE_STATUS_GPIO_ACTIVE_STATE,
290 290
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
291 291
  },
292 292
};
......
334 334
  /* GPIO */ &_gpioChargeEn1,
335 335
  /* meta */ {
336 336
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
337
    /* active state   */ BQ24103A_LLD_ENABLED_GPIO_ACTIVE_STATE,
337
    /* active state   */ BQ241xx_LLD_ENABLED_GPIO_ACTIVE_STATE,
338 338
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
339 339
  },
340 340
};
......
532 532
  /* GPIO */ &_gpioChargeEn2,
533 533
  /* meta */ {
534 534
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
535
    /* active state   */ BQ24103A_LLD_ENABLED_GPIO_ACTIVE_STATE,
535
    /* active state   */ BQ241xx_LLD_ENABLED_GPIO_ACTIVE_STATE,
536 536
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
537 537
  },
538 538
};
......
568 568
 */
569 569
/*===========================================================================*/
570 570

  
571
AT24C01BNDriver moduleLldEeprom = {
571
AT24C01BDriver moduleLldEeprom = {
572 572
  /* I2C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
573
  /* I2C address  */ AT24C01BN_LLD_I2C_ADDR_FIXED,
573
  /* I2C address  */ AT24C01B_LLD_I2C_ADDR_FIXED,
574 574
};
575 575

  
576
BQ24103ADriver moduleLldBatteryChargerFront = {
576
BQ241xxDriver moduleLldBatteryChargerFront = {
577 577
  /* charge enable GPIO */ &moduleGpioChargeEn1,
578 578
  /* charge status GPIO */ &moduleGpioChargeStat1A,
579 579
};
580 580

  
581
BQ24103ADriver moduleLldBatteryChargerRear = {
581
BQ241xxDriver moduleLldBatteryChargerRear = {
582 582
  /* charge enable GPIO */ &moduleGpioChargeEn2,
583 583
  /* charge status GPIO */ &moduleGpioChargeStat2A,
584 584
};
......
634 634
  /* LED GPIO */ &moduleGpioLed,
635 635
};
636 636

  
637
TPS62113Driver moduleLldStepDownConverter = {
637
TPS6211xDriver moduleLldStepDownConverter = {
638 638
  /* Power enable GPIO */ &moduleGpioPowerEn,
639 639
};
640 640

  
......
740 740
};
741 741

  
742 742
/*
743
 * AT24C01BN-SH-B (EEPROM)
743
 * AT24C01B (EEPROM)
744 744
 */
745
static int _utShellCmdCb_AlldAt24c01bn(BaseSequentialStream* stream, int argc, char* argv[])
745
static int _utShellCmdCb_AlldAt24c01b(BaseSequentialStream* stream, int argc, char* argv[])
746 746
{
747 747
  (void)argc;
748 748
  (void)argv;
749
  aosUtRun(stream, &moduleUtAlldAt24c01bn, NULL);
749
  aosUtRun(stream, &moduleUtAlldAt24c01b, NULL);
750 750
  return AOS_OK;
751 751
}
752
static ut_at24c01bndata_t _utAlldAt24c01bnData = {
752
static ut_at24c01bdata_t _utAlldAt24c01bData = {
753 753
  /* driver   */ &moduleLldEeprom,
754 754
  /* timeout  */ MICROSECONDS_PER_SECOND,
755 755
};
756
aos_unittest_t moduleUtAlldAt24c01bn = {
757
  /* name           */ "AT24C01BN-SH-B",
756
aos_unittest_t moduleUtAlldAt24c01b = {
757
  /* name           */ "AT24C01B",
758 758
  /* info           */ "1kbit EEPROM",
759
  /* test function  */ utAlldAt24c01bnFunc,
759
  /* test function  */ utAlldAt24c01bFunc,
760 760
  /* shell command  */ {
761 761
    /* name     */ "unittest:EEPROM",
762
    /* callback */ _utShellCmdCb_AlldAt24c01bn,
762
    /* callback */ _utShellCmdCb_AlldAt24c01b,
763 763
    /* next     */ NULL,
764 764
  },
765
  /* data           */ &_utAlldAt24c01bnData,
765
  /* data           */ &_utAlldAt24c01bData,
766 766
};
767 767

  
768 768
/*
769
 * BQ24103A (battery charger)
769
 * bq24103a (battery charger)
770 770
 */
771 771
static int _utShellCmdCb_AlldBq24103a(BaseSequentialStream* stream, int argc, char* argv[])
772 772
{
......
806 806
  }
807 807
}
808 808
aos_unittest_t moduleUtAlldBq24103a = {
809
  /* name           */ "BQ24103A",
809
  /* name           */ "bq24103a",
810 810
  /* info           */ "battery charger",
811
  /* test function  */ utAlldBq24103aFunc,
811
  /* test function  */ utAlldBq241xxFunc,
812 812
  /* shell command  */ {
813 813
    /* name     */ "unittest:BatteryCharger",
814 814
    /* callback */ _utShellCmdCb_AlldBq24103a,
......
818 818
};
819 819

  
820 820
/*
821
 * BQ27500 (fuel gauge)
821
 * bq27500 (fuel gauge)
822 822
 */
823 823
static int _utShellCmdCb_AlldBq27500(BaseSequentialStream* stream, int argc, char* argv[])
824 824
{
......
851 851
  /* timeout  */ MICROSECONDS_PER_SECOND,
852 852
};
853 853
aos_unittest_t moduleUtAlldBq27500 = {
854
  /* name           */ "BQ27500",
854
  /* name           */ "bq27500",
855 855
  /* info           */ "fuel gauge",
856 856
  /* test function  */ utAlldBq27500Func,
857 857
  /* shell command  */ {
......
863 863
};
864 864

  
865 865
/*
866
 * BQ27500 (fuel gauge) in combination with BQ24103A (battery charger)
866
 * bq27500 (fuel gauge) in combination with bq24103a (battery charger)
867 867
 */
868 868
static int _utShellCmdCb_AlldBq27500Bq24103a(BaseSequentialStream* stream, int argc, char* argv[])
869 869
{
870 870
  // evaluate arguments
871 871
  if (argc == 2) {
872 872
    if (strcmp(argv[1], "-f") == 0 || strcmp(argv[1], "--front") == 0) {
873
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = &moduleLldFuelGaugeFront;
874
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq24103a = &moduleLldBatteryChargerFront;
873
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = &moduleLldFuelGaugeFront;
874
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq241xx = &moduleLldBatteryChargerFront;
875 875
      aosUtRun(stream, &moduleUtAlldBq27500Bq24103a, "front battery");
876
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = NULL;
877
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq24103a = NULL;
876
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = NULL;
877
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq241xx = NULL;
878 878
      return AOS_OK;
879 879
    }
880 880
    else if (strcmp(argv[1], "-r") == 0 || strcmp(argv[1], "--rear") == 0) {
881
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = &moduleLldFuelGaugeRear;
882
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq24103a = &moduleLldBatteryChargerRear;
881
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = &moduleLldFuelGaugeRear;
882
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq241xx = &moduleLldBatteryChargerRear;
883 883
      aosUtRun(stream, &moduleUtAlldBq27500Bq24103a, "rear battery");
884
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = NULL;
885
      ((ut_bq27500bq24103adata_t*)moduleUtAlldBq27500Bq24103a.data)->bq24103a = NULL;
884
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq27500 = NULL;
885
      ((ut_bq27500bq241xxdata_t*)moduleUtAlldBq27500Bq24103a.data)->bq241xx = NULL;
886 886
      return AOS_OK;
887 887
    }
888 888
  }
......
895 895
  chprintf(stream, "    Test the rear battery fuel gauge and charger.\n");
896 896
  return AOS_INVALID_ARGUMENTS;
897 897
}
898
static ut_bq27500bq24103adata_t _utAlldBq27500Bq24103aData= {
899
  /* BQ27500 driver   */ NULL,
900
  /* BQ23203A driver  */ NULL,
898
static ut_bq27500bq241xxdata_t _utAlldBq27500Bq24103aData= {
899
  /* bq27500 driver   */ NULL,
900
  /* bq24103a driver  */ NULL,
901 901
  /* timeout          */ MICROSECONDS_PER_SECOND,
902 902
};
903 903
aos_unittest_t moduleUtAlldBq27500Bq24103a = {
904 904
  /* name           */ "BQ27500 & BQ24103A",
905 905
  /* info           */ "fuel gauge & battery charger",
906
  /* test function  */ utAlldBq27500Bq24103aFunc,
906
  /* test function  */ utAlldBq27500Bq241xxFunc,
907 907
  /* shell command  */ {
908 908
    /* name     */ "unittest:FuelGauge&BatteryCharger",
909 909
    /* callback */ _utShellCmdCb_AlldBq27500Bq24103a,
......
1025 1025
  aosUtRun(stream, &moduleUtAlldPklcs1212e4001, NULL);
1026 1026
  return AOS_OK;
1027 1027
}
1028
static ut_pklcs1212e4001_t _utAlldPklcs1212e4001Data = {
1028
static ut_pkxxxexxx_t _utAlldPklcs1212e4001Data = {
1029 1029
  /* PWM driver   */ &MODULE_HAL_PWM_BUZZER,
1030 1030
  /* PWM channel  */ MODULE_HAL_PWM_BUZZER_CHANNEL
1031 1031
};
1032 1032
aos_unittest_t moduleUtAlldPklcs1212e4001 = {
1033 1033
  /* name           */ "PKLCS1212E4001",
1034 1034
  /* info           */ "buzzer",
1035
  /* test function  */ utAlldPklcs1212e4001Func,
1035
  /* test function  */ utAlldPkxxxexxxFunc,
1036 1036
  /* shell command  */ {
1037 1037
    /* name     */ "unittest:Buzzer",
1038 1038
    /* callback */ _utShellCmdCb_AlldPklcs1212e4001,
......
1042 1042
};
1043 1043

  
1044 1044
/*
1045
 * TPS62113 (stop-down converter)
1045
 * TPS62113 (step-down converter)
1046 1046
 */
1047 1047
static int _utShellCmdCb_AlldTps62113(BaseSequentialStream* stream, int argc, char* argv[])
1048 1048
{
......
1056 1056
aos_unittest_t moduleUtAlldTps62113 = {
1057 1057
  /* name           */ "TPS62113",
1058 1058
  /* info           */ "step-down converter",
1059
  /* test function  */ utAlldTps62113Func,
1059
  /* test function  */ utAlldTps6211xFunc,
1060 1060
  /* shell command  */ {
1061 1061
    /* name     */ "unittest:StepDownConverter",
1062 1062
    /* callback */ _utShellCmdCb_AlldTps62113,
......
1075 1075
  aosUtRun(stream, &moduleUtAlldTps62113Ina219, "VSYS (4.2V)");
1076 1076
  return AOS_OK;
1077 1077
}
1078
static ut_tps62113ina219data_t _utAlldTps62113Ina219Data = {
1078
static ut_tps6211xina219data_t _utAlldTps62113Ina219Data = {
1079 1079
  /* TPS62113 */ &moduleLldStepDownConverter,
1080 1080
  /* INA219   */ &moduleLldPowerMonitorVsys42,
1081 1081
  /* timeout  */ MICROSECONDS_PER_SECOND,
......
1083 1083
aos_unittest_t moduleUtAlldTps62113Ina219 = {
1084 1084
  /* name           */ "TPS62113 & INA219",
1085 1085
  /* info           */ "step-down converter & power monitor",
1086
  /* test function  */ utAlldTps62113Ina219Func,
1086
  /* test function  */ utAlldTps6211xIna219Func,
1087 1087
  /* shell command  */ {
1088 1088
    /* name     */ "unittest:StepDownConverter&PowerMonitor",
1089 1089
    /* callback */ _utShellCmdCb_AlldTps62113Ina219,
modules/PowerManagement_1-1/module.h
434 434
#define MODULE_INIT_TESTS() {                                                 \
435 435
  /* add unit-test shell commands */                                          \
436 436
  aosShellAddCommand(&aos.shell, &moduleUtAdcVsys.shellcmd);                  \
437
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01bn.shellcmd);            \
437
  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01b.shellcmd);            \
438 438
  aosShellAddCommand(&aos.shell, &moduleUtAlldBq24103a.shellcmd);             \
439 439
  aosShellAddCommand(&aos.shell, &moduleUtAlldBq27500.shellcmd);              \
440 440
  aosShellAddCommand(&aos.shell, &moduleUtAlldBq27500Bq24103a.shellcmd);      \
......
478 478
  moduleHalI2cSrPm18Pm33GaugeRearConfig.duty_cycle = (moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
479 479
  i2cStart(&MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR, &moduleHalI2cSrPm18Pm33GaugeRearConfig); \
480 480
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
481
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT24C01BN_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT24C01BN_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
481
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT24C01B_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT24C01B_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
482 482
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
483 483
  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.duty_cycle = (moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
484 484
  i2cStart(&MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT, &moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig);  \
......
488 488
  pwmStart(&MODULE_HAL_PWM_BUZZER, &moduleHalPwmBuzzerConfig);                \
489 489
  moduleHalPwmBuzzerConfig.frequency = MODULE_HAL_PWM_BUZZER.clock;           \
490 490
  pwmStop(&MODULE_HAL_PWM_BUZZER);                                            \
491
  moduleHalPwmBuzzerConfig.period = moduleHalPwmBuzzerConfig.frequency / PKLCS1212E4001_LLD_FREQUENCY_SPEC; \
491
  moduleHalPwmBuzzerConfig.period = moduleHalPwmBuzzerConfig.frequency / PKxxxExxx_LLD_FREQUENCY_SPEC; \
492 492
  pwmStart(&MODULE_HAL_PWM_BUZZER, &moduleHalPwmBuzzerConfig);                \
493 493
}
494 494
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
......
586 586
 * @{
587 587
 */
588 588
/*===========================================================================*/
589
#include <alld_at24c01bn-sh-b.h>
590
#include <alld_bq24103a.h>
589
#include <alld_AT24C01B.h>
590
#include <alld_bq241xx.h>
591 591
#include <alld_bq27500.h>
592
#include <alld_ina219.h>
593
#include <alld_led.h>
594
#include <alld_pklcs1212e4001.h>
595
#include <alld_tps62113.h>
592
#include <alld_INA219.h>
593
#include <alld_LED.h>
594
#include <alld_PKxxxExxx.h>
595
#include <alld_TPS6211x.h>
596 596

  
597 597
/**
598 598
 * @brief   EEPROM driver.
599 599
 */
600
extern AT24C01BNDriver moduleLldEeprom;
600
extern AT24C01BDriver moduleLldEeprom;
601 601

  
602 602
/**
603 603
 * @brief   Battery charger (front battery) driver.
604 604
 */
605
extern BQ24103ADriver moduleLldBatteryChargerFront;
605
extern BQ241xxDriver moduleLldBatteryChargerFront;
606 606

  
607 607
/**
608 608
 * @brief   Battery charger (rear battery) driver.
609 609
 */
610
extern BQ24103ADriver moduleLldBatteryChargerRear;
610
extern BQ241xxDriver moduleLldBatteryChargerRear;
611 611

  
612 612
/**
613 613
 * @brief   Fuel gauge (front battery) driver.
......
651 651

  
652 652
/**
653 653
 * @brief   Step down converter driver.
654
 * @note    Although there multiple TPS62113, those are completely identical from driver few (share the same signals).
654
 * @note    Although there multiple TPS6211x, those are completely identical from driver few (share the same signals).
655 655
 */
656
extern TPS62113Driver moduleLldStepDownConverter;
656
extern TPS6211xDriver moduleLldStepDownConverter;
657 657

  
658 658
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
659 659

  
660
#include <alld_mpr121.h>
661
#include <alld_pca9544a.h>
662
#include <alld_vcnl4020.h>
660
#include <alld_MPR121.h>
661
#include <alld_PCA9544A.h>
662
#include <alld_VCNL4020.h>
663 663

  
664 664
/**
665 665
 * @brief   Touch sensor driver.
......
690 690

  
691 691
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
692 692

  
693
#include <alld_pcal6524.h>
694
#include <alld_at42qt1050.h>
693
#include <alld_PCAL6524.h>
694
#include <alld_AT42QT1050.h>
695 695

  
696 696
/**
697 697
 * @brief   GPIO extender (I2C #1) driver.
......
712 712

  
713 713
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
714 714

  
715
#include <alld_pcal6524.h>
716
#include <alld_at42qt1050.h>
715
#include <alld_PCAL6524.h>
716
#include <alld_AT42QT1050.h>
717 717

  
718 718
/**
719 719
 * @brief   GPIO extender (I2C #1) driver.
......
742 742
/*===========================================================================*/
743 743
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
744 744
#include <ut_lld_adc.h>
745
#include <ut_alld_at24c01bn-sh-b.h>
746
#include <ut_alld_bq24103a.h>
747
#include <ut_alld_bq27500.h>
748
#include <ut_alld_bq27500_bq24103a.h>
749
#include <ut_alld_ina219.h>
750
#include <ut_alld_led.h>
751
#include <ut_alld_pklcs1212e4001.h>
752
#include <ut_alld_tps62113.h>
753
#include <ut_alld_tps62113_ina219.h>
745
#include <ut_alld_AT24C01B_v1.h>
746
#include <ut_alld_bq241xx_v1.h>
747
#include <ut_alld_bq27500_v1.h>
748
#include <ut_alld_bq27500_v1_bq241xx_v1.h>
749
#include <ut_alld_INA219_v1.h>
750
#include <ut_alld_LED_v1.h>
751
#include <ut_alld_PKxxxExxx_v1.h>
752
#include <ut_alld_TPS6211x_v1.h>
753
#include <ut_alld_TPS6211x_v1_INA219_v1.h>
754 754

  
755 755
/**
756 756
 * @brief   ADC unit test object.
......
760 760
/**
761 761
 * @brief   AT24C01BN-SH-B (EEPROM) unit test object.
762 762
 */
763
extern aos_unittest_t moduleUtAlldAt24c01bn;
763
extern aos_unittest_t moduleUtAlldAt24c01b;
764 764

  
765 765
/**
766 766
 * @brief   BQ24103A (battery charger) unit test object.
......
804 804

  
805 805
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
806 806

  
807
#include <ut_alld_mpr121.h>
808
#include <ut_alld_pca9544a.h>
809
#include <ut_alld_vcnl4020.h>
807
#include <ut_alld_MPR121_v1.h>
808
#include <ut_alld_PCA9544A_v1.h>
809
#include <ut_alld_VCNL4020_v1.h>
810 810

  
811 811
/**
812 812
 * @brief   MPR121 (touch sensor) unit test object.
......
827 827

  
828 828
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
829 829

  
830
#include <ut_alld_pcal6524.h>
831
#include <ut_alld_at42qt1050.h>
830
#include <ut_alld_PCAL6524_v1.h>
831
#include <ut_alld_AT42QT1050_v1.h>
832 832

  
833 833
/**
834 834
 * @brief   PCAL6524 (GPIO extender) unit test object.
......
844 844

  
845 845
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
846 846

  
847
#include <ut_alld_pcal6524.h>
848
#include <ut_alld_at42qt1050.h>
847
#include <ut_alld_PCAL6524_v1.h>
848
#include <ut_alld_AT42QT1050_v1.h>
849 849

  
850 850
/**
851 851
 * @brief   PCAL6524 (GPIO extender) unit test object.
periphery-lld/AMiRo-LLD
1
Subproject commit a627f4ddb13ff202f542b88cbce359299e8f6783
1
Subproject commit c3c5444e8fe1240ac6f4d7e4922d2525f4dabc39
unittests/lld/inc/ut_lld_adc.h
19 19
#ifndef AMIROOS_UT_LLD_ADC_H
20 20
#define AMIROOS_UT_LLD_ADC_H
21 21

  
22
#include <amiroos.h>
23

  
22 24
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && (HAL_USE_ADC == TRUE))|| defined(__DOXYGEN__)
23 25

  
24 26
/******************************************************************************/
unittests/lld/src/ut_lld_adc.c
17 17
*/
18 18

  
19 19
#include <amiroos.h>
20
#include <ut_lld_adc.h>
21 20

  
22 21
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && (HAL_USE_ADC == TRUE))|| defined(__DOXYGEN__)
23 22

  
23
#include <ut_lld_adc.h>
24

  
24 25
/******************************************************************************/
25 26
/* LOCAL DEFINITIONS                                                          */
26 27
/******************************************************************************/
unittests/periphery-lld/inc/ut_alld_A3906_v1.h
1
/*
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
#ifndef AMIROOS_UT_ALLD_A3906_V1_H
20
#define AMIROOS_UT_ALLD_A3906_V1_H
21

  
22
#include <amiroos.h>
23

  
24
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_A3906) && (AMIROLLD_CFG_A3906 == 1)) || defined(__DOXYGEN__)
25

  
26
#include <alld_A3906.h>
27

  
28
/******************************************************************************/
29
/* CONSTANTS                                                                  */
30
/******************************************************************************/
31

  
32
/******************************************************************************/
33
/* SETTINGS                                                                   */
34
/******************************************************************************/
35

  
36
/******************************************************************************/
37
/* CHECKS                                                                     */
38
/******************************************************************************/
39

  
40
/******************************************************************************/
41
/* DATA STRUCTURES AND TYPES                                                  */
42
/******************************************************************************/
43

  
44
/**
45
 * @brief   Custom data structure for the unit test.
46
 */
47
typedef struct {
48
  /**
49
   * @brief   Pointer to the driver to use.
50
   */
51
  A3906Driver* driver;
52

  
53
  /**
54
   * @brief   PWM driver information.
55
   */
56
  struct {
57
    /**
58
     * @brief   The PWM driver to use.
59
     */
60
    apalPWMDriver_t* driver;
61

  
62
    /**
63
     * @brief   PWM channel information.
64
     */
65
    struct {
66
      /**
67
     * @brief   PWM channel for the left wheel forward direction.
68
     */
69
      apalPWMchannel_t left_forward;
70

  
71
      /**
72
     * @brief   PWM channel for the left wheel backward direction.
73
     */
74
      apalPWMchannel_t left_backward;
75

  
76
      /**
77
     * @brief   PWM channel for the right wheel forward direction.
78
     */
79
      apalPWMchannel_t right_forward;
80

  
81
      /**
82
     * @brief   PWM channel for the right wheel backward direction.
83
     */
84
      apalPWMchannel_t right_backward;
85
    } channel;
86
  } pwm;
87

  
88
  /**
89
   * @brief   QEI driver information
90
   */
91
  struct {
92
    /**
93
     * @brief   QEI driver for the left wheel.
94
     */
95
    apalQEIDriver_t* left;
96

  
97
    /**
98
     * @brief   QEI driver for the right wheel.
99
     */
100
    apalQEIDriver_t* right;
101

  
102
    /**
103
     * @brief   QEI increments per wheel revolution.
104
     */
105
    apalQEICount_t increments_per_revolution;
106
  } qei;
107

  
108
  /**
109
   * @brief   Wheel diameter information.
110
   */
111
  struct {
112
    /**
113
     * @brief   Left wheel diameter in m.
114
     */
115
    float left;
116

  
117
    /**
118
     * @brief   Right wheel diameter in m.
119
     */
120
    float right;
121
  } wheel_diameter;
122

  
123
  /**
124
   * @brief   Timeout value (in us).
125
   */
126
  apalTime_t timeout;
127
} ut_a3906data_t;
128

  
129
/******************************************************************************/
130
/* MACROS                                                                     */
131
/******************************************************************************/
132

  
133
/******************************************************************************/
134
/* EXTERN DECLARATIONS                                                        */
135
/******************************************************************************/
136

  
137
#ifdef __cplusplus
138
extern "C" {
139
#endif
140
  aos_utresult_t utAlldA3906Func(BaseSequentialStream* stream, aos_unittest_t* ut);
141
#ifdef __cplusplus
142
}
143
#endif
144

  
145
/******************************************************************************/
146
/* INLINE FUNCTIONS                                                           */
147
/******************************************************************************/
148

  
149
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_A3906) && (AMIROLLD_CFG_A3906 == 1) */
150

  
151
#endif /* AMIROOS_UT_ALLD_A3906_V1_H */
unittests/periphery-lld/inc/ut_alld_AT24C01B_v1.h
1
/*
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
#ifndef AMIROOS_UT_ALLD_AT24C01B_V1_H
20
#define AMIROOS_UT_ALLD_AT24C01B_V1_H
21

  
22
#include <amiroos.h>
23

  
24
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_AT24C01B) && (AMIROLLD_CFG_AT24C01B == 1)) || defined(__DOXYGEN__)
25

  
26
#include <alld_AT24C01B.h>
27

  
28
/******************************************************************************/
29
/* CONSTANTS                                                                  */
30
/******************************************************************************/
31

  
32
/******************************************************************************/
33
/* SETTINGS                                                                   */
34
/******************************************************************************/
35

  
36
/******************************************************************************/
37
/* CHECKS                                                                     */
38
/******************************************************************************/
39

  
40
/******************************************************************************/
41
/* DATA STRUCTURES AND TYPES                                                  */
42
/******************************************************************************/
43

  
44
/**
45
 * @brief   Custom data structure for the unit test.
46
 */
47
typedef struct {
48
  /**
49
   * @brief   Pointer to the driver to use.
50
   */
51
  AT24C01BDriver* driver;
52

  
53
  /**
54
   * @brief   Timeout value (in us).
55
   */
56
  apalTime_t timeout;
57
} ut_at24c01bdata_t;
58

  
59
/******************************************************************************/
60
/* MACROS                                                                     */
61
/******************************************************************************/
62

  
63
/******************************************************************************/
64
/* EXTERN DECLARATIONS                                                        */
65
/******************************************************************************/
66

  
67
/******************************************************************************/
68
/* INLINE FUNCTIONS                                                           */
69
/******************************************************************************/
70

  
71
#ifdef __cplusplus
72
extern "C" {
73
#endif
74
  aos_utresult_t utAlldAt24c01bFunc(BaseSequentialStream* stream, aos_unittest_t* ut);
75
#ifdef __cplusplus
76
}
77
#endif
78

  
79
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_AT24C01B) && (AMIROLLD_CFG_AT24C01B == 1) */
80

  
81
#endif /* AMIROOS_UT_ALLD_AT24C01B_V1_H */
unittests/periphery-lld/inc/ut_alld_AT42QT1050_v1.h
1
/*
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
#ifndef AMIROOS_UT_ALLD_AT42QT1050_V1_H
20
#define AMIROOS_UT_ALLD_AT42QT1050_V1_H
21

  
22
#include <amiroos.h>
23

  
24
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_AT42QT1050) && (AMIROLLD_CFG_AT42QT1050 == 1)) || defined(__DOXYGEN__)
25

  
26
#include <alld_AT42QT1050.h>
27

  
28
/******************************************************************************/
29
/* CONSTANTS                                                                  */
30
/******************************************************************************/
31

  
32
/******************************************************************************/
33
/* SETTINGS                                                                   */
34
/******************************************************************************/
35

  
36
/******************************************************************************/
37
/* CHECKS                                                                     */
38
/******************************************************************************/
39

  
40
/******************************************************************************/
41
/* DATA STRUCTURES AND TYPES                                                  */
42
/******************************************************************************/
43

  
44
/**
45
 * @brief   Custom data structure for the unit test.
46
 */
47
typedef struct {
48
  /**
49
   * @brief   Pointer to the AT42QT1050 driver to use.
50
   */
51
  AT42QT1050Driver* at42qt1050d;
52

  
53
  /**
54
   * @brief   Timeout value (in µs).
55
   */
56
  apalTime_t timeout;
57

  
58
  /**
59
   * @brief   Event source to listen to.
60
   */
61
  event_source_t* evtsource;
62

  
63
  /**
64
   * @brief   Event flags to watch.
65
   */
66
  eventflags_t evtflags;
67
} ut_at42qt1050data_t;
68

  
69
/******************************************************************************/
70
/* MACROS                                                                     */
71
/******************************************************************************/
72

  
73
/******************************************************************************/
74
/* EXTERN DECLARATIONS                                                        */
75
/******************************************************************************/
76

  
77
#ifdef __cplusplus
78
extern "C" {
79
#endif
80
  aos_utresult_t utAlldAt42qt1050Func(BaseSequentialStream* stream, aos_unittest_t* ut);
81
#ifdef __cplusplus
82
}
83
#endif
84

  
85
/******************************************************************************/
86
/* INLINE FUNCTIONS                                                           */
87
/******************************************************************************/
88

  
89
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_AT42QT1050) && (AMIROLLD_CFG_AT42QT1050 == 1) */
90

  
91
#endif /* AMIROOS_UT_ALLD_AT42QT1050_V1_H */
unittests/periphery-lld/inc/ut_alld_DW1000_v0.h
1
/*
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
#ifndef AMIROOS_UT_ALLD_DW1000_V0_H
20
#define AMIROOS_UT_ALLD_DW1000_V0_H
21

  
22
#include <amiroos.h>
23

  
24
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_DW1000) && (AMIROLLD_CFG_DW1000 == 0)) || defined(__DOXYGEN__)
25

  
26
#include <alld_DW1000.h>
27

  
28
/******************************************************************************/
29
/* CONSTANTS                                                                  */
30
/******************************************************************************/
31

  
32
/******************************************************************************/
33
/* SETTINGS                                                                   */
34
/******************************************************************************/
35

  
36
/******************************************************************************/
37
/* CHECKS                                                                     */
38
/******************************************************************************/
39

  
40
/******************************************************************************/
41
/* DATA STRUCTURES AND TYPES                                                  */
42
/******************************************************************************/
43

  
44
/******************************************************************************/
45
/* MACROS                                                                     */
46
/******************************************************************************/
47

  
48
/******************************************************************************/
49
/* EXTERN DECLARATIONS                                                        */
50
/******************************************************************************/
51

  
52
#ifdef __cplusplus
53
extern "C" {
54
#endif
55
  aos_utresult_t utAlldDw1000Func(BaseSequentialStream* stream, aos_unittest_t* ut);
56
#ifdef __cplusplus
57
}
58
#endif
59

  
60
/******************************************************************************/
61
/* INLINE FUNCTIONS                                                           */
62
/******************************************************************************/
63

  
64
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_DW1000) && (AMIROLLD_CFG_DW1000 == 0) */
65

  
66
#endif /* AMIROOS_UT_ALLD_DW1000_V0_H */
unittests/periphery-lld/inc/ut_alld_HMC5883L_v1.h
1
/*
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
#ifndef AMIROOS_UT_ALLD_HMC5883L_V1_H
20
#define AMIROOS_UT_ALLD_HMC5883L_V1_H
21

  
22
#include <amiroos.h>
23

  
24
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_HMC5883L) && (AMIROLLD_CFG_HMC5883L == 1)) || defined(__DOXYGEN__)
25

  
26
#include <alld_HMC5883L.h>
27

  
28
/******************************************************************************/
29
/* CONSTANTS                                                                  */
30
/******************************************************************************/
31

  
32
/******************************************************************************/
33
/* SETTINGS                                                                   */
34
/******************************************************************************/
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff