commit 1678f27084400f39b41adccc3089d38a26b1597f
Author: Simon Welzel <simonwelzel@live.de>
Date:   Thu Jan 24 17:22:04 2019 +0100

    Re-Added files to a newer version of AMiRo-OS

diff --git a/modules/PowerManagement_1-1/module.c b/modules/PowerManagement_1-1/module.c
index 6fdd530..11fa65f 100644
--- a/modules/PowerManagement_1-1/module.c
+++ b/modules/PowerManagement_1-1/module.c
@@ -1,6 +1,6 @@
 /*
 AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
-Copyright (C) 2016..2018  Thomas Schöpping et al.
+Copyright (C) 2016..2019  Thomas Schöpping et al.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -65,13 +65,13 @@ CANConfig moduleHalCanConfig = {
   /* btr  */ CAN_BTR_SJW(1) | CAN_BTR_TS2(3) | CAN_BTR_TS1(15) | CAN_BTR_BRP(1),
 };
 
-I2CConfig moduleHalI2cProxPm18Pm33GaugeRearConfig = {
+I2CConfig moduleHalI2cSrPm18Pm33GaugeRearConfig = {
   /* I²C mode   */ OPMODE_I2C,
   /* frequency  */ 400000, // TODO: replace with some macro (-> ChibiOS/HAL)
   /* duty cycle */ FAST_DUTY_CYCLE_2,
 };
 
-I2CConfig moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig = {
+I2CConfig moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig = {
   /* I²C mode   */ OPMODE_I2C,
   /* frequency  */ 400000, // TODO: replace with some macro (-> ChibiOS/HAL)
   /* duty cycle */ FAST_DUTY_CYCLE_2,
@@ -149,8 +149,19 @@ ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
   /* GPIO */ &_gpioIrInt1,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)
     /* active state   */ (VCNL4020_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
     /* interrupt edge */ VCNL4020_LLD_INT_EDGE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X)
+    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
+    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
+#else
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#endif
   },
 };
 
@@ -341,8 +352,19 @@ ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
   /* GPIO */ &_gpioIrInt2,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)
     /* active state   */ (VCNL4020_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
     /* interrupt edge */ VCNL4020_LLD_INT_EDGE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X)
+    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
+    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
+#else
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#endif
   },
 };
 
@@ -357,8 +379,19 @@ ROMCONST apalControlGpio_t moduleGpioTouchInt = {
   /* GPIO */ &_gpioTouchInt,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)
     /* active state   */ (MPR121_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
     /* interrupt edge */ MPR121_LLD_INT_EDGE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X)
+    /* active state   */ (AT42QT1050_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ AT42QT1050_LLD_INT_EDGE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
+    /* active state   */ (AT42QT1050_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ AT42QT1050_LLD_INT_EDGE,
+#else
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#endif
   },
 };
 
@@ -520,7 +553,7 @@ ROMCONST char* moduleShellPrompt = "PowerManagement";
 #endif
 
 /** @} */
-#if (AMIROOS_CFG_SSSP_ENABLE == true)
+
 /*===========================================================================*/
 /**
  * @name Startup Shutdown Synchronization Protocol (SSSP)
@@ -529,7 +562,6 @@ ROMCONST char* moduleShellPrompt = "PowerManagement";
 /*===========================================================================*/
 
 /** @} */
-#endif
 
 /*===========================================================================*/
 /**
@@ -539,7 +571,7 @@ ROMCONST char* moduleShellPrompt = "PowerManagement";
 /*===========================================================================*/
 
 AT24C01BNDriver moduleLldEeprom = {
-  /* I2C driver   */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I2C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
   /* I2C address  */ AT24C01BN_LLD_I2C_ADDR_FIXED,
 };
 
@@ -554,47 +586,47 @@ BQ24103ADriver moduleLldBatteryChargerRear = {
 };
 
 BQ27500Driver moduleLldFuelGaugeFront = {
-  /* I2C driver         */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I2C driver         */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
   /* battery low GPIO   */ &moduleGpioGaugeBatLow1,
   /* battery good GPIO  */ &moduleGpioGaugeBatGd1,
 };
 
 BQ27500Driver moduleLldFuelGaugeRear = {
-  /* I2C driver         */ &MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR,
+  /* I2C driver         */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
   /* battery low GPIO   */ &moduleGpioGaugeBatLow2,
   /* battery good GPIO  */ &moduleGpioGaugeBatGd2,
 };
 
 INA219Driver moduleLldPowerMonitorVdd = {
-  /* I2C Driver       */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I2C Driver       */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
   /* I²C address      */ INA219_LLD_I2C_ADDR_A0 | INA219_LLD_I2C_ADDR_A1,
   /* current LSB (uA) */ 0x00u,
   /* configuration    */ NULL,
 };
 
 INA219Driver moduleLldPowerMonitorVio18 = {
-  /* I2C Driver       */ &MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR,
+  /* I2C Driver       */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
   /* I²C address      */ INA219_LLD_I2C_ADDR_A1,
   /* current LSB (uA) */ 0x00u,
   /* configuration    */ NULL,
 };
 
 INA219Driver moduleLldPowerMonitorVio33 = {
-  /* I2C Driver       */ &MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR,
+  /* I2C Driver       */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
   /* I²C address      */ INA219_LLD_I2C_ADDR_FIXED,
   /* current LSB (uA) */ 0x00u,
   /* configuration    */ NULL,
 };
 
 INA219Driver moduleLldPowerMonitorVsys42 = {
-  /* I2C Driver       */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I2C Driver       */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
   /* I²C address      */ INA219_LLD_I2C_ADDR_FIXED,
   /* current LSB (uA) */ 0x00u,
   /* configuration    */ NULL,
 };
 
 INA219Driver moduleLldPowerMonitorVio50 = {
-  /* I2C Driver       */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I2C Driver       */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
   /* I²C address      */ INA219_LLD_I2C_ADDR_A1,
   /* current LSB (uA) */ 0x00u,
   /* configuration    */ NULL,
@@ -604,32 +636,74 @@ LEDDriver moduleLldStatusLed = {
   /* LED GPIO */ &moduleGpioLed,
 };
 
+TPS62113Driver moduleLldStepDownConverter = {
+  /* Power enable GPIO */ &moduleGpioPowerEn,
+};
+
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+
 MPR121Driver moduleLldTouch = {
-  /* I²C Driver */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I²C Driver */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
 };
 
 PCA9544ADriver moduleLldI2cMultiplexer1 = {
-  /* I²C driver   */ &MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR,
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
   /* I²C address  */ PCA9544A_LLD_I2C_ADDR_A0 | PCA9544A_LLD_I2C_ADDR_A1 | PCA9544A_LLD_I2C_ADDR_A2,
 };
 
 PCA9544ADriver moduleLldI2cMultiplexer2 = {
-  /* I²C driver   */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
   /* I²C address  */ PCA9544A_LLD_I2C_ADDR_A0 | PCA9544A_LLD_I2C_ADDR_A1 | PCA9544A_LLD_I2C_ADDR_A2,
 };
 
-TPS62113Driver moduleLldStepDownConverter = {
-  /* Power enable GPIO */ &moduleGpioPowerEn,
-};
-
 VCNL4020Driver moduleLldProximity1 = {
-  /* I²C Driver */ &MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR,
+  /* I²C Driver */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
 };
 
 VCNL4020Driver moduleLldProximity2 = {
-  /* I²C Driver */ &MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT,
+  /* I²C Driver */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
+};
+
+#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+
+PCAL6524Driver moduleLldGpioExtender1 = {
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
+  /* I²C address  */ PCAL6524_LLD_I2C_ADDR_VDD,
+};
+
+PCAL6524Driver moduleLldGpioExtender2 = {
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
+  /* I²C address  */ PCAL6524_LLD_I2C_ADDR_VDD,
+};
+
+AT42QT1050Driver moduleLldTouch = {
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
+  /* I²C address  */ AT42QT1050_LLD_I2C_ADDRSEL_LOW,
+};
+
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+
+PCAL6524Driver moduleLldGpioExtender1 = {
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
+  /* I²C address  */ PCAL6524_LLD_I2C_ADDR_VDD,
+};
+
+PCAL6524Driver moduleLldGpioExtender2 = {
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
+  /* I²C address  */ PCAL6524_LLD_I2C_ADDR_VDD,
+};
+
+AT42QT1050Driver moduleLldTouch = {
+  /* I²C driver   */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
+  /* I²C address  */ AT42QT1050_LLD_I2C_ADDRSEL_LOW,
 };
 
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 /** @} */
 
 /*===========================================================================*/
@@ -641,7 +715,9 @@ VCNL4020Driver moduleLldProximity2 = {
 #if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 #include <string.h>
 
-/* ADC  */
+/*
+ * ADC
+ */
 static int _utShellCmdCb_Adc(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -665,7 +741,9 @@ aos_unittest_t moduleUtAdcVsys = {
   /* data           */ &_utAdcVsysData,
 };
 
-/* AT24C01BN-SH-B (EEPROM) */
+/*
+ * AT24C01BN-SH-B (EEPROM)
+ */
 static int _utShellCmdCb_AlldAt24c01bn(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -689,7 +767,9 @@ aos_unittest_t moduleUtAlldAt24c01bn = {
   /* data           */ &_utAlldAt24c01bnData,
 };
 
-/* BQ24103A (battery charger) */
+/*
+ * BQ24103A (battery charger)
+ */
 static int _utShellCmdCb_AlldBq24103a(BaseSequentialStream* stream, int argc, char* argv[])
 {
   // local variables
@@ -739,7 +819,9 @@ aos_unittest_t moduleUtAlldBq24103a = {
   /* data           */ NULL,
 };
 
-/* BQ27500 (fuel gauge) */
+/*
+ * BQ27500 (fuel gauge)
+ */
 static int _utShellCmdCb_AlldBq27500(BaseSequentialStream* stream, int argc, char* argv[])
 {
   // evaluate arguments
@@ -782,7 +864,9 @@ aos_unittest_t moduleUtAlldBq27500 = {
   /* data           */ &_utAlldBq27500Data,
 };
 
-/* BQ27500 (fuel gauge) in combination with BQ24103A (battery charger) */
+/*
+ * BQ27500 (fuel gauge) in combination with BQ24103A (battery charger)
+ */
 static int _utShellCmdCb_AlldBq27500Bq24103a(BaseSequentialStream* stream, int argc, char* argv[])
 {
   // evaluate arguments
@@ -830,7 +914,9 @@ aos_unittest_t moduleUtAlldBq27500Bq24103a = {
   /* data           */ &_utAlldBq27500Bq24103aData,
 };
 
-/* INA219 (power monitor) */
+/*
+ * INA219 (power monitor)
+ */
 static int _utShellCmdCb_AlldIna219(BaseSequentialStream* stream, int argc, char* argv[])
 {
   // evaluate arguments
@@ -909,7 +995,9 @@ aos_unittest_t moduleUtAlldIna219 = {
   /* data           */ &_utAlldIna219Data,
 };
 
-/* Status LED */
+/*
+ * Status LED
+ */
 static int _utShellCmdCb_AlldLed(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -929,76 +1017,9 @@ aos_unittest_t moduleUtAlldLed = {
   /* data           */ &moduleLldStatusLed,
 };
 
-/* MPR121 (touch sensor) */
-static int _utShellCmdCb_AlldMpr121(BaseSequentialStream* stream, int argc, char* argv[])
-{
-  (void)argc;
-  (void)argv;
-  aosUtRun(stream, &moduleUtAlldMpr121, NULL);
-  return AOS_OK;
-}
-static ut_mpr121data_t _utAlldMpr121Data= {
-  /* MPR121 driver  */ &moduleLldTouch,
-  /* timeout        */ MICROSECONDS_PER_SECOND,
-  /* event source   */ &aos.events.io,
-  /* event flags    */ MODULE_OS_IOEVENTFLAGS_TOUCHINT,
-};
-aos_unittest_t moduleUtAlldMpr121 = {
-  /* name           */ "MPR121",
-  /* info           */ "touch sensor",
-  /* test function  */ utAlldMpr121Func,
-  /* shell command  */ {
-    /* name     */ "unittest:Touch",
-    /* callback */ _utShellCmdCb_AlldMpr121,
-    /* next     */ NULL,
-  },
-  /* data           */ &_utAlldMpr121Data,
-};
-
-/* PCA9544A (I2C multiplexer) */
-static int _utShellCmdCb_AlldPca5944a(BaseSequentialStream* stream, int argc, char* argv[])
-{
-  // evaluate arguments
-  if (argc == 2) {
-    if (strcmp(argv[1], "#1") == 0) {
-      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = &moduleLldI2cMultiplexer1;
-      aosUtRun(stream, &moduleUtAlldPca9544a, "I2C bus #1");
-      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = NULL;
-      return AOS_OK;
-    }
-    else if (strcmp(argv[1], "#2") == 0) {
-      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = &moduleLldI2cMultiplexer2;
-      aosUtRun(stream, &moduleUtAlldPca9544a, "I2C bus #2");
-      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = NULL;
-      return AOS_OK;
-    }
-  }
-  // print help
-  chprintf(stream, "Usage: %s OPTION\n", argv[0]);
-  chprintf(stream, "Options:\n");
-  chprintf(stream, "  #1\n");
-  chprintf(stream, "    Test the multiplexer on the I2C bus #1.\n");
-  chprintf(stream, "  #2\n");
-  chprintf(stream, "    Test the multiplexer on the I2C bus #2.\n");
-  return AOS_INVALID_ARGUMENTS;
-}
-static ut_pca9544adata_t _utAlldPca9544aData = {
-  /* driver   */ NULL,
-  /* timeout  */ MICROSECONDS_PER_SECOND,
-};
-aos_unittest_t moduleUtAlldPca9544a = {
-  /* name           */ "PCA9544A",
-  /* info           */ "I2C multiplexer",
-  /* test function  */ utAlldPca9544aFunc,
-  /* shell command  */ {
-    /* name     */ "unittest:I2CMultiplexer",
-    /* callback */ _utShellCmdCb_AlldPca5944a,
-    /* next     */ NULL,
-  },
-  /* data           */ &_utAlldPca9544aData,
-};
-
-/* PKLCS1212E4001 (buzzer) */
+/*
+ * PKLCS1212E4001 (buzzer)
+ */
 static int _utShellCmdCb_AlldPklcs1212e4001(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -1022,7 +1043,9 @@ aos_unittest_t moduleUtAlldPklcs1212e4001 = {
   /* data           */ &_utAlldPklcs1212e4001Data,
 };
 
-/* TPS62113 (stop-down converter) */
+/*
+ * TPS62113 (stop-down converter)
+ */
 static int _utShellCmdCb_AlldTps62113(BaseSequentialStream* stream, int argc, char* argv[])
 {
   // Although there are four TPS62113 on the PCB, they all share the same input signal.
@@ -1044,7 +1067,9 @@ aos_unittest_t moduleUtAlldTps62113 = {
   /* data           */ &moduleLldStepDownConverter,
 };
 
-/* TPS62113 (step-donw converter) in combination with INA219 (power monitor) */
+/*
+ * TPS62113 (step-donw converter) in combination with INA219 (power monitor)
+ */
 static int _utShellCmdCb_AlldTps62113Ina219(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -1069,7 +1094,84 @@ aos_unittest_t moduleUtAlldTps62113Ina219 = {
   /* data           */ &_utAlldTps62113Ina219Data,
 };
 
-/* VCNL4020 (proximity sensor) */
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+
+/*
+ * MPR121 (touch sensor)
+ */
+static int _utShellCmdCb_AlldMpr121(BaseSequentialStream* stream, int argc, char* argv[])
+{
+  (void)argc;
+  (void)argv;
+  aosUtRun(stream, &moduleUtAlldMpr121, NULL);
+  return AOS_OK;
+}
+static ut_mpr121data_t _utAlldMpr121Data= {
+  /* MPR121 driver  */ &moduleLldTouch,
+  /* timeout        */ MICROSECONDS_PER_SECOND,
+  /* event source   */ &aos.events.io,
+  /* event flags    */ MODULE_OS_IOEVENTFLAGS_TOUCHINT,
+};
+aos_unittest_t moduleUtAlldMpr121 = {
+  /* name           */ "MPR121",
+  /* info           */ "touch sensor",
+  /* test function  */ utAlldMpr121Func,
+  /* shell command  */ {
+    /* name     */ "unittest:Touch",
+    /* callback */ _utShellCmdCb_AlldMpr121,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldMpr121Data,
+};
+
+/*
+ * PCA9544A (I2C multiplexer)
+ */
+static int _utShellCmdCb_AlldPca5944a(BaseSequentialStream* stream, int argc, char* argv[])
+{
+  // evaluate arguments
+  if (argc == 2) {
+    if (strcmp(argv[1], "#1") == 0) {
+      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = &moduleLldI2cMultiplexer1;
+      aosUtRun(stream, &moduleUtAlldPca9544a, "I2C bus #1");
+      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = NULL;
+      return AOS_OK;
+    }
+    else if (strcmp(argv[1], "#2") == 0) {
+      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = &moduleLldI2cMultiplexer2;
+      aosUtRun(stream, &moduleUtAlldPca9544a, "I2C bus #2");
+      ((ut_pca9544adata_t*)moduleUtAlldPca9544a.data)->driver = NULL;
+      return AOS_OK;
+    }
+  }
+  // print help
+  chprintf(stream, "Usage: %s OPTION\n", argv[0]);
+  chprintf(stream, "Options:\n");
+  chprintf(stream, "  #1\n");
+  chprintf(stream, "    Test the multiplexer on the I2C bus #1.\n");
+  chprintf(stream, "  #2\n");
+  chprintf(stream, "    Test the multiplexer on the I2C bus #2.\n");
+  return AOS_INVALID_ARGUMENTS;
+}
+static ut_pca9544adata_t _utAlldPca9544aData = {
+  /* driver   */ NULL,
+  /* timeout  */ MICROSECONDS_PER_SECOND,
+};
+aos_unittest_t moduleUtAlldPca9544a = {
+  /* name           */ "PCA9544A",
+  /* info           */ "I2C multiplexer",
+  /* test function  */ utAlldPca9544aFunc,
+  /* shell command  */ {
+    /* name     */ "unittest:I2CMultiplexer",
+    /* callback */ _utShellCmdCb_AlldPca5944a,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldPca9544aData,
+};
+
+/*
+ * VCNL4020 (proximity sensor)
+ */
 static void _utAlldVcnl4020_disableInterrupt(VCNL4020Driver* vcnl)
 {
   uint8_t intstatus;
@@ -1215,6 +1317,162 @@ aos_unittest_t moduleUtAlldVcnl4020 = {
   /* data           */ &_utAlldVcnl4020Data,
 };
 
+#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+
+/*
+ * PCAL6524 (GPIO extender)
+ */
+static int _utShellCmdCb_AlldPcal6524(BaseSequentialStream* stream, int argc, char* argv[])
+{
+  // evaluate arguments
+  if (argc == 2) {
+    if (strcmp(argv[1], "#1") == 0) {
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = &moduleLldGpioExtender1;
+      aosUtRun(stream, &moduleUtAlldPcal6524, "I2C bus #1");
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = NULL;
+      return AOS_OK;
+    }
+    else if (strcmp(argv[1], "#2") == 0) {
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = &moduleLldGpioExtender2;
+      aosUtRun(stream, &moduleUtAlldPcal6524, "I2C bus #2");
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = NULL;
+      return AOS_OK;
+    }
+  }
+  // print help
+  chprintf(stream, "Usage: %s OPTION\n", argv[0]);
+  chprintf(stream, "Options:\n");
+  chprintf(stream, "  #1\n");
+  chprintf(stream, "    Test the GPIO extender on the I2C bus #1.\n");
+  chprintf(stream, "  #2\n");
+  chprintf(stream, "    Test the GPIO extender on the I2C bus #2.\n");
+  return AOS_INVALID_ARGUMENTS;
+}
+static ut_pcal6524data_t _utAlldPcal6524Data = {
+  /* driver   */ NULL,
+  /* timeout  */ MICROSECONDS_PER_SECOND,
+};
+aos_unittest_t moduleUtAlldPcal6524 = {
+  /* name           */ "PCAL6524",
+  /* info           */ "GPIO extender",
+  /* test function  */ utAlldPcal6524Func,
+  /* shell command  */ {
+    /* name     */ "unittest:GPIOExtender",
+    /* callback */ _utShellCmdCb_AlldPcal6524,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldPcal6524Data,
+};
+
+/*
+ * AT42QT1050 (touch sensor)
+ */
+static int _utShellCmdCb_AlldAt42qt1050(BaseSequentialStream* stream, int argc, char* argv[])
+{
+  (void)argc;
+  (void)argv;
+  aosUtRun(stream, &moduleUtAlldAt42qt1050, NULL);
+  return AOS_OK;
+}
+static ut_at42qt1050data_t _utAlldMpr121Data= {
+  /* AT42QT1050 driver  */ &moduleLldTouch,
+  /* timeout            */ MICROSECONDS_PER_SECOND,
+  /* event source       */ &aos.events.io,
+  /* event flags        */ MODULE_OS_IOEVENTFLAGS_TOUCHINT,
+};
+aos_unittest_t moduleUtAlldAt42qt1050 = {
+  /* name           */ "AT42QT1050",
+  /* info           */ "touch sensor",
+  /* test function  */ utAlldAt42qt1050Func,
+  /* shell command  */ {
+    /* name     */ "unittest:Touch",
+    /* callback */ _utShellCmdCb_AlldAt42qt1050,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldMpr121Data,
+};
+
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+
+/*
+ * PCAL6524 (GPIO extender)
+ */
+static int _utShellCmdCb_AlldPcal6524(BaseSequentialStream* stream, int argc, char* argv[])
+{
+  // evaluate arguments
+  if (argc == 2) {
+    if (strcmp(argv[1], "#1") == 0) {
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = &moduleLldGpioExtender1;
+      aosUtRun(stream, &moduleUtAlldPcal6524, "I2C bus #1");
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = NULL;
+      return AOS_OK;
+    }
+    else if (strcmp(argv[1], "#2") == 0) {
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = &moduleLldGpioExtender2;
+      aosUtRun(stream, &moduleUtAlldPcal6524, "I2C bus #2");
+      ((ut_pcal6524data_t*)moduleUtAlldPcal6524.data)->pcal6524d = NULL;
+      return AOS_OK;
+    }
+  }
+  // print help
+  chprintf(stream, "Usage: %s OPTION\n", argv[0]);
+  chprintf(stream, "Options:\n");
+  chprintf(stream, "  #1\n");
+  chprintf(stream, "    Test the GPIO extender on the I2C bus #1.\n");
+  chprintf(stream, "  #2\n");
+  chprintf(stream, "    Test the GPIO extender on the I2C bus #2.\n");
+  return AOS_INVALID_ARGUMENTS;
+}
+static ut_pcal6524data_t _utAlldPcal6524Data = {
+  /* driver   */ NULL,
+  /* timeout  */ MICROSECONDS_PER_SECOND,
+};
+aos_unittest_t moduleUtAlldPcal6524 = {
+  /* name           */ "PCAL6524",
+  /* info           */ "GPIO extender",
+  /* test function  */ utAlldPcal6524Func,
+  /* shell command  */ {
+    /* name     */ "unittest:GPIOExtender",
+    /* callback */ _utShellCmdCb_AlldPcal6524,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldPcal6524Data,
+};
+
+/*
+ * AT42QT1050 (touch sensor)
+ */
+static int _utShellCmdCb_AlldAt42qt1050(BaseSequentialStream* stream, int argc, char* argv[])
+{
+  (void)argc;
+  (void)argv;
+  aosUtRun(stream, &moduleUtAlldAt42qt1050, NULL);
+  return AOS_OK;
+}
+static ut_at42qt1050data_t _utAlldMpr121Data= {
+  /* AT42QT1050 driver  */ &moduleLldTouch,
+  /* timeout            */ MICROSECONDS_PER_SECOND,
+  /* event source       */ &aos.events.io,
+  /* event flags        */ MODULE_OS_IOEVENTFLAGS_TOUCHINT,
+};
+aos_unittest_t moduleUtAlldAt42qt1050 = {
+  /* name           */ "AT42QT1050",
+  /* info           */ "touch sensor",
+  /* test function  */ utAlldAt42qt1050Func,
+  /* shell command  */ {
+    /* name     */ "unittest:Touch",
+    /* callback */ _utShellCmdCb_AlldAt42qt1050,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldMpr121Data,
+};
+
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 #endif /* AMIROOS_CFG_TESTS_ENABLE == true */
 
 /** @} */
