Revision c4989d30 modules/LightRing_1-2/module.c

View differences:

modules/LightRing_1-2/module.c
436 436
  /* configuration    */ NULL,
437 437
};
438 438

  
439
P9221RDriver moduleQiCharger = {
440
  /* I2C Driver       */ &MODULE_HAL_I2C_EEPROM_PWRMTR_BREAKOUT,
441
  /* I²C address      */ P9221R_LLD_I2C_ADDR_FIXED,
442
  /* current LSB (uA) */ 0x00u,
443
  /* configuration    */ NULL,
444
};
445

  
439 446
LEDDriver moduleLldStatusLed = {
440 447
  /* LED enable Gpio */ &moduleGpioLed,
441 448
};
......
533 540
};
534 541

  
535 542
/*
543
 * P9221R (qi charger)
544
 */
545
static int _utShellCmdCb_AlldP9221r(BaseSequentialStream* stream, int argc, char* argv[])
546
{
547
  (void)argc;
548
  (void)argv;
549
  aosUtRun(stream, &moduleUtAlldP9221r, NULL);
550
  return AOS_OK;
551
}
552
static ut_p9221rdata_t _utP9221rData = {
553
  /* driver           */ &moduleLldPowerMonitorVled,
554
  /* expected voltage */ 4.2f,
555
  /* tolerance        */ 0.2f,
556
  /* timeout */ MICROSECONDS_PER_SECOND,
557
};
558
aos_unittest_t moduleUtAlldP9221r = {
559
  /* name           */ "P9221R",
560
  /* info           */ "qi charger",
561
  /* test function  */ utAlldP9221rFunc,
562
  /* shell command  */ {
563
    /* name     */ "unittest:QiCharger",
564
    /* callback */ _utShellCmdCb_AlldP9221r,
565
    /* next     */ NULL,
566
  },
567
  /* data           */ &_utP9221rData,
568
};
569

  
570
/*
536 571
 * Status LED
537 572
 */
538 573
static int _utShellCmdCb_AlldLed(BaseSequentialStream* stream, int argc, char* argv[])

Also available in: Unified diff