commit 8be006e00c9590e69535cfc101159a1ab942db18
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Tue Jan 8 15:24:11 2019 +0100

    PowerManagement: Introduced a configuration (board.h) to select the attached sensor ring module.

diff --git a/modules/DiWheelDrive_1-1/module.c b/modules/DiWheelDrive_1-1/module.c
index 0481a7c..94edb1b 100644
--- a/modules/DiWheelDrive_1-1/module.c
+++ b/modules/DiWheelDrive_1-1/module.c
@@ -438,7 +438,9 @@ VCNL4020Driver moduleLldProximity = {
 #include <string.h>
 #include <chprintf.h>
 
-/* A3906 (motor driver) */
+/*
+ * A3906 (motor driver)
+ */
 static int _utShellCmdCb_AlldA3906(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -480,7 +482,9 @@ aos_unittest_t moduleUtAlldA3906  = {
   /* data           */ &_utA3906Data,
 };
 
-/* AT24C01BN (EEPROM) */
+/*
+ * AT24C01BN (EEPROM)
+ */
 static int _utShellCmdCb_AlldAt24c01bn(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -504,7 +508,9 @@ aos_unittest_t moduleUtAlldAt24c01bn = {
   /* data           */ &_utAt24c01bnData,
 };
 
-/* HMC5883L (compass) */
+/*
+ * HMC5883L (compass)
+ */
 static int _utShellCmdCb_AlldHmc5883l(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -530,7 +536,9 @@ aos_unittest_t moduleUtAlldHmc5883l = {
   /* data           */ &_utHmc5883lData,
 };
 
-/* INA219 (power monitor) */
+/*
+ * INA219 (power monitor)
+ */
 static int _utShellCmdCb_AlldIna219(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -556,7 +564,9 @@ aos_unittest_t moduleUtAlldIna219 = {
   /* data           */ &_utIna219Data,
 };
 
-/* L3G4200D (gyroscope) */
+/*
+ * L3G4200D (gyroscope)
+ */
 static int _utShellCmdCb_AlldL3g4200d(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -584,7 +594,9 @@ aos_unittest_t moduleUtAlldL3g4200d = {
   /* data           */ &_utL3g4200dData,
 };
 
-/* Status LED */
+/*
+ * Status LED
+ */
 static int _utShellCmdCb_AlldLed(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -604,7 +616,9 @@ aos_unittest_t moduleUtAlldLed = {
   /* data           */ &moduleLldStatusLed,
 };
 
-/* LIS331DLH (accelerometer) */
+/*
+ * LIS331DLH (accelerometer)
+ */
 static int _utShellCmdCb_AlldLis331dlh(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -632,7 +646,9 @@ aos_unittest_t moduleUtAlldLis331dlh = {
   /* data           */ &_utLis331dlhData,
 };
 
-/* LTC4412 (power path controller) */
+/*
+ * LTC4412 (power path controller)
+ */
 static int _utShellCmdCb_AlldLtc4412(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -652,7 +668,9 @@ aos_unittest_t moduleUtAlldLtc4412 = {
   /* data           */ &moduleLldPowerPathController,
 };
 
-/* PCA9544A (I2C multiplexer) */
+/*
+ * PCA9544A (I2C multiplexer)
+ */
 static int _utShellCmdCb_AlldPca9544a(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -676,7 +694,9 @@ aos_unittest_t moduleUtAlldPca9544a = {
   /* data           */ &_utPca9544aData,
 };
 
-/* TPS62113 (step-down converter) */
+/*
+ * TPS62113 (step-down converter)
+ */
 static int _utShellCmdCb_AlldTps62113(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -696,7 +716,9 @@ aos_unittest_t moduleUtAlldTps62113 = {
   /* data           */ &moduleLldStepDownConverterVdrive,
 };
 
-/* VCNL4020 (proximity sensor) */
+/*
+ * VCNL4020 (proximity sensor)
+ */
 static void _utAlldVcnl4020_disableInterrupt(VCNL4020Driver* vcnl)
 {
   uint8_t intstatus;
diff --git a/modules/LightRing_1-0/module.c b/modules/LightRing_1-0/module.c
index 6804462..a928c98 100644
--- a/modules/LightRing_1-0/module.c
+++ b/modules/LightRing_1-0/module.c
@@ -280,7 +280,9 @@ TPS2051BDriver moduleLldPowerSwitchLaser = {
 /*===========================================================================*/
 #if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 
-/* EEPROM (AT24C01BN) */
+/*
+ * EEPROM (AT24C01BN)
+ */
 static int _utShellCmdCb_AlldAt24c01bn(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -304,7 +306,9 @@ aos_unittest_t moduleUtAlldAt24c01bn = {
   /* data           */ &_utAt24c01bnData,
 };
 
-/* LED PWM driver (TLD5947) */
+/*
+ * LED PWM driver (TLD5947)
+ */
 static int _utShellCmdCb_Tlc5947(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -324,7 +328,9 @@ aos_unittest_t moduleUtAlldTlc5947 = {
   /* data           */ &moduleLldLedPwm,
 };
 
-/* power switch (Laser) */
+/*
+ * power switch (Laser)
+ */
 static int _utShellCmdCb_Tps2051bdbv(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
diff --git a/modules/PowerManagement_1-1/alldconf.h b/modules/PowerManagement_1-1/alldconf.h
index 3b10eb1..e233dff 100644
--- a/modules/PowerManagement_1-1/alldconf.h
+++ b/modules/PowerManagement_1-1/alldconf.h
@@ -43,6 +43,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define AMIROLLD_CFG_TIME_SIZE          32
 
+// required to differentiate between various sensor rings
+#include <board.h>
+
 /**
  * @brief   Enable flag for the AT24C01BN-SH-B EEPROM.
  */
@@ -69,16 +72,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define AMIROLLD_CFG_USE_LED
 
 /**
- * @brief   Enable flag for the MPR121 touch sensor.
- */
-#define AMIROLLD_CFG_USE_MPR121
-
-/**
- * @brief   Enable flag for the PCA9544A I2C multiplexer.
- */
-#define AMIROLLD_CFG_USE_PCA9544A
-
-/**
  * @brief   Enable flag for the PKLCS1212E4001 buzzer.
  */
 #define AMIROLLD_CFG_USE_PKLCS1212E4001
@@ -93,11 +86,33 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define AMIROLLD_CFG_USE_TPS62113
 
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+
+/**
+ * @brief   Enable flag for the MPR121 touch sensor.
+ */
+#define AMIROLLD_CFG_USE_MPR121
+
+/**
+ * @brief   Enable flag for the PCA9544A I2C multiplexer.
+ */
+#define AMIROLLD_CFG_USE_PCA9544A
+
 /**
  * @brief   Enable flag for the VCNL4020 proximity sensor.
  */
 #define AMIROLLD_CFG_USE_VCNL4020
 
+#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 #endif /* _ALLDCONF_H_ */
 
 /** @} */
diff --git a/modules/PowerManagement_1-1/board.h b/modules/PowerManagement_1-1/board.h
index eb9089d..6161e19 100644
--- a/modules/PowerManagement_1-1/board.h
+++ b/modules/PowerManagement_1-1/board.h
@@ -81,6 +81,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define STM32F4xx_AF_EVENTOUT           15U
 
 /*
+ * Identifiers for the several sensor rings, which can be attached to the PowerManagement v1.1 module.
+ */
+#define BOARD_NOSENSORRING              0
+#define BOARD_PROXIMITYSENSOR           1
+#define BOARD_DISTANCESENSOR_VL53L0X    2
+#define BOARD_DISTANCESENSOR_VL53L1X    3
+
+/*
+ * Configuration macro to define which type of sensor ring is attached.
+ */
+#define BOARD_SENSORRING                  BOARD_PROXIMITYSENSOR
+
+/*
  * IO pins assignments.
  */
 #define GPIOA_WKUP                      0U
diff --git a/modules/PowerManagement_1-1/module.c b/modules/PowerManagement_1-1/module.c
index 730b0ce..1cb6894 100644
--- a/modules/PowerManagement_1-1/module.c
+++ b/modules/PowerManagement_1-1/module.c
@@ -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   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#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   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#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   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#else
+    /* active state   */ APAL_GPIO_ACTIVE_LOW,
+    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
+#endif
   },
 };
 
@@ -538,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,
 };
 
@@ -553,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,
@@ -603,32 +636,44 @@ 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__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 /** @} */
 
 /*===========================================================================*/
@@ -640,7 +685,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;
@@ -664,7 +711,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;
@@ -688,7 +737,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
@@ -738,7 +789,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
@@ -781,7 +834,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
@@ -829,7 +884,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
@@ -908,7 +965,9 @@ aos_unittest_t moduleUtAlldIna219 = {
   /* data           */ &_utAlldIna219Data,
 };
 
-/* Status LED */
+/*
+ * Status LED
+ */
 static int _utShellCmdCb_AlldLed(BaseSequentialStream* stream, int argc, char* argv[])
 {
   (void)argc;
@@ -928,76 +987,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;
@@ -1021,7 +1013,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.
@@ -1043,7 +1037,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;
@@ -1068,7 +1064,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;
@@ -1214,6 +1287,16 @@ aos_unittest_t moduleUtAlldVcnl4020 = {
   /* data           */ &_utAlldVcnl4020Data,
 };
 
+#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 #endif /* AMIROOS_CFG_TESTS_ENABLE == true */
 
 /** @} */
diff --git a/modules/PowerManagement_1-1/module.h b/modules/PowerManagement_1-1/module.h
index 3863dc3..4e858e1 100644
--- a/modules/PowerManagement_1-1/module.h
+++ b/modules/PowerManagement_1-1/module.h
@@ -92,24 +92,58 @@ extern ADCConversionGroup moduleHalAdcVsysConversionGroup;
 extern CANConfig moduleHalCanConfig;
 
 /**
- * @brief   I2C driver to access multiplexer, proximity sensors 1 to 4, power monitors for VIO1.8 and VIO 3.3, and fuel gauge (rear battery).
- */
-#define MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR I2CD1
-
-/**
- * @brief   Configuration for the multiplexer, proximity sensors 1 to 4, power monitors for VIO1.8 and VIO 3.3, and fuel gauge (rear battery) I2C driver.
- */
-extern I2CConfig moduleHalI2cProxPm18Pm33GaugeRearConfig;
-
-/**
- * @brief   I2C driver to access multiplexer, proximity sensors 5 to 8, power monitors for VSYS4.2, VIO 5.0 and VDD, EEPROM, touch sensor, and fuel gauge (front battery).
- */
-#define MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT I2CD2
-
-/**
- * @brief   Configuration for the multiplexer, proximity sensors 1 to 4, power monitors for VIO1.8 and VIO 3.3, and fuel gauge (rear battery) I2C driver.
- */
-extern I2CConfig moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig;
+ * @brief   I2C driver to access the sensor ring, power monitors for VIO1.8 and VIO3.3, and fuel gauge (rear battery).
+ * @details Depending on the attached sensor ring, the devices connected to this bus vary:
+ *          ProximitySensor:
+ *            - I2C multiplexer (PCA9544A)
+ *            - proximity sensors (VCNL4020) #1 - #4
+ *          DistanceSensor (VL53L0X):
+ *            TODO
+ *          DistanceSensor (VL53L1X):
+ *            TODO
+ */
+#define MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR   I2CD1
+
+/**
+ * @brief   Configuration for the sensor ring, power monitors for VIO1.8 and VIO3.3, and fuel gauge (rear battery) I2C driver.
+ * @details Depending on the attached sensor ring, the devices connected to this bus vary:
+ *          ProximitySensor:
+ *            - I2C multiplexer (PCA9544A)
+ *            - proximity sensors (VCNL4020) #1 - #4
+ *          DistanceSensor (VL53L0X):
+ *            TODO
+ *          DistanceSensor (VL53L1X):
+ *            TODO
+ */
+extern I2CConfig moduleHalI2cSrPm18Pm33GaugeRearConfig;
+
+/**
+ * @brief   I2C driver to access the sensor ring, power monitors for VSYS4.2, VIO5.0 and VDD, EEPROM, and fuel gauge (front battery).
+ * @details Depending on the attached sensor ring, the devices connected to this bus vary:
+ *          ProximitySensor:
+ *            - I2C multiplexer (PCA9544A)
+ *            - proximity sensors (VCNL4020) #1 - #4
+ *            - touch sensor (MPR121)
+ *          DistanceSensor (VL53L0X):
+ *            TODO
+ *          DistanceSensor (VL53L1X):
+ *            TODO
+ */
+#define MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT I2CD2
+
+/**
+ * @brief   Configuration for the sensor ring, power monitors for VSYS4.2, VIO5.0 and VDD, EEPROM, and fuel gauge (front battery) I2C driver.
+ * @details Depending on the attached sensor ring, the devices connected to this bus vary:
+ *          ProximitySensor:
+ *            - I2C multiplexer (PCA9544A)
+ *            - proximity sensors (VCNL4020) #1 - #4
+ *            - touch sensor (MPR121)
+ *          DistanceSensor (VL53L0X):
+ *            TODO
+ *          DistanceSensor (VL53L1X):
+ *            TODO
+ */
+extern I2CConfig moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig;
 
 /**
  * @brief   PWM driver for the buzzer.
@@ -149,7 +183,7 @@ extern SerialConfig moduleHalProgIfConfig;
  * @{
  */
 /*===========================================================================*/
-#include <amiro-lld.h>
+#include <periphALtypes.h>
 
 /**
  * @brief   SYS_REG_EN output signal GPIO.
@@ -405,36 +439,47 @@ extern ROMCONST char* moduleShellPrompt;
   aosShellAddCommand(&aos.shell, &moduleUtAlldBq27500.shellcmd);              \
   aosShellAddCommand(&aos.shell, &moduleUtAlldBq27500Bq24103a.shellcmd);      \
   aosShellAddCommand(&aos.shell, &moduleUtAlldIna219.shellcmd);               \
-  aosShellAddCommand(&aos.shell, &moduleUtAlldMpr121.shellcmd);               \
-  aosShellAddCommand(&aos.shell, &moduleUtAlldPca9544a.shellcmd);             \
   aosShellAddCommand(&aos.shell, &moduleUtAlldPklcs1212e4001.shellcmd);       \
   aosShellAddCommand(&aos.shell, &moduleUtAlldLed.shellcmd);                  \
   aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113.shellcmd);             \
   aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113Ina219.shellcmd);       \
-  aosShellAddCommand(&aos.shell, &moduleUtAlldVcnl4020.shellcmd);             \
+  MODULE_INIT_TEST_SENSORRING();                                              \
 }
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+  #define MODULE_INIT_TEST_SENSORRING() {                                     \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldPca9544a.shellcmd);           \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldMpr121.shellcmd);             \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldVcnl4020.shellcmd);           \
+  }
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+  #define MODULE_INIT_TEST_SENSORRING() {                                     \
+    /* TODO */                                                                \
+  }
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+  #define MODULE_INIT_TEST_SENSORRING() {                                     \
+    /* TODO */                                                                \
+  }
+#else
+  #define MODULE_INIT_TEST_SENSORRING()         {}
+#endif
 
 /**
  * @brief   Periphery communication interfaces initialization hook.
  */
 #define MODULE_INIT_PERIPHERY_COMM() {                                        \
+  MODULE_INIT_PERIPHERY_COMM_SENSORRING();                                    \
   /* serial driver */                                                         \
   sdStart(&MODULE_HAL_PROGIF, &moduleHalProgIfConfig);                        \
   /* I2C */                                                                   \
-  moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed;  \
-  moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed;  \
-  moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed;  \
-  moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed;  \
-  moduleHalI2cProxPm18Pm33GaugeRearConfig.duty_cycle = (moduleHalI2cProxPm18Pm33GaugeRearConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
-  i2cStart(&MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR, &moduleHalI2cProxPm18Pm33GaugeRearConfig); \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed; \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed; \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed; \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed = (AT24C01BN_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed) ? AT24C01BN_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed; \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed = (MPR121_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed) ? MPR121_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed; \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed; \
-  moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.duty_cycle = (moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
-  i2cStart(&MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT, &moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig);  \
+  moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
+  moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
+  moduleHalI2cSrPm18Pm33GaugeRearConfig.duty_cycle = (moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
+  i2cStart(&MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR, &moduleHalI2cSrPm18Pm33GaugeRearConfig); \
+  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (INA219_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? INA219_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
+  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT24C01BN_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT24C01BN_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
+  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (BQ27500_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? BQ27500_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
+  moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.duty_cycle = (moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed <= 100000) ? STD_DUTY_CYCLE : FAST_DUTY_CYCLE_2;  \
+  i2cStart(&MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT, &moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig);  \
   /* ADC */                                                                   \
   adcStart(&MODULE_HAL_ADC_VSYS, NULL);                                       \
   /* PWM */                                                                   \
@@ -444,6 +489,25 @@ extern ROMCONST char* moduleShellPrompt;
   moduleHalPwmBuzzerConfig.period = moduleHalPwmBuzzerConfig.frequency / PKLCS1212E4001_LLD_FREQUENCY_SPEC; \
   pwmStart(&MODULE_HAL_PWM_BUZZER, &moduleHalPwmBuzzerConfig);                \
 }
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+  #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {                           \
+    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
+    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (PCA9544A_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? PCA9544A_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (VCNL4020_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? VCNL4020_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (MPR121_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? MPR121_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed; \
+  }
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+  #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {                           \
+    /* TODO */                                                                \
+  }
+#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+  #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {                           \
+    /* TODO */                                                                \
+  }
+#else
+  #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {}
+#endif
 
 /**
  * @brief   Periphery communication interface deinitialization hook.
@@ -454,8 +518,8 @@ extern ROMCONST char* moduleShellPrompt;
   /* ADC */                                                                   \
   adcStop(&MODULE_HAL_ADC_VSYS);                                              \
   /* I2C */                                                                   \
-  i2cStop(&MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR);                          \
-  i2cStop(&MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT);      \
+  i2cStop(&MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR);                            \
+  i2cStop(&MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT);              \
   /* don't stop the serial driver so messages can still be printed */         \
 }
 
@@ -521,11 +585,8 @@ extern ROMCONST char* moduleShellPrompt;
 #include <alld_bq27500.h>
 #include <alld_ina219.h>
 #include <alld_led.h>
-#include <alld_mpr121.h>
-#include <alld_pca9544a.h>
 #include <alld_pklcs1212e4001.h>
 #include <alld_tps62113.h>
-#include <alld_vcnl4020.h>
 
 /**
  * @brief   EEPROM driver.
@@ -583,36 +644,52 @@ extern INA219Driver moduleLldPowerMonitorVio50;
 extern LEDDriver moduleLldStatusLed;
 
 /**
+ * @brief   Step down converter driver.
+ * @note    Although there multiple TPS62113, those are completely identical from driver few (share the same signals).
+ */
+extern TPS62113Driver moduleLldStepDownConverter;
+
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+
+#include <alld_mpr121.h>
+#include <alld_pca9544a.h>
+#include <alld_vcnl4020.h>
+
+/**
  * @brief   Touch sensor driver.
  */
 extern MPR121Driver moduleLldTouch;
 
 /**
- * @brief   I2C multiplexer (I2C 1) driver.
+ * @brief   I2C multiplexer (I2C #1) driver.
  */
 extern PCA9544ADriver moduleLldI2cMultiplexer1;
 
 /**
- * @brief   I2C multiplexer (I2C 2) driver.
+ * @brief   I2C multiplexer (I2C #2) driver.
  */
 extern PCA9544ADriver moduleLldI2cMultiplexer2;
 
 /**
- * @brief   Step down converter driver.
- * @note    Although there multiple TPS62113, those are completely identical from driver few (share the same signals).
- */
-extern TPS62113Driver moduleLldStepDownConverter;
-
-/**
- * @brief   Proximity sensor (I2C 1) driver.
+ * @brief   Proximity sensor (I2C #1) driver.
  */
 extern VCNL4020Driver moduleLldProximity1;
 
 /**
- * @brief   Proximity sensor (I2C 2) driver.
+ * @brief   Proximity sensor (I2C #2) driver.
  */
 extern VCNL4020Driver moduleLldProximity2;
 
+#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 /** @} */
 
 /*===========================================================================*/
@@ -629,12 +706,9 @@ extern VCNL4020Driver moduleLldProximity2;
 #include <ut_alld_bq27500_bq24103a.h>
 #include <ut_alld_ina219.h>
 #include <ut_alld_led.h>
-#include <ut_alld_mpr121.h>
-#include <ut_alld_pca9544a.h>
 #include <ut_alld_pklcs1212e4001.h>
 #include <ut_alld_tps62113.h>
 #include <ut_alld_tps62113_ina219.h>
-#include <ut_alld_vcnl4020.h>
 
 /**
  * @brief   ADC unit test object.
@@ -672,16 +746,6 @@ extern aos_unittest_t moduleUtAlldIna219;
 extern aos_unittest_t moduleUtAlldLed;
 
 /**
- * @brief   MPR121 (touch sensor) unit test object.
- */
-extern aos_unittest_t moduleUtAlldMpr121;
-
-/**
- * @brief   PCA9544A (I2C multiplexer) unit test object.
- */
-extern aos_unittest_t moduleUtAlldPca9544a;
-
-/**
  * @brief   PKLCS1212E4001 (buzzer) unit test object.
  */
 extern aos_unittest_t moduleUtAlldPklcs1212e4001;
@@ -696,11 +760,37 @@ extern aos_unittest_t moduleUtAlldTps62113;
  */
 extern aos_unittest_t moduleUtAlldTps62113Ina219;
 
+#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__)
+
+#include <ut_alld_mpr121.h>
+#include <ut_alld_pca9544a.h>
+#include <ut_alld_vcnl4020.h>
+
+/**
+ * @brief   MPR121 (touch sensor) unit test object.
+ */
+extern aos_unittest_t moduleUtAlldMpr121;
+
+/**
+ * @brief   PCA9544A (I2C multiplexer) unit test object.
+ */
+extern aos_unittest_t moduleUtAlldPca9544a;
+
 /**
  * @brief   VCNL4020 (proximity sensor) unit test object.
  */
 extern aos_unittest_t moduleUtAlldVcnl4020;
 
+#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
+
+#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
+// TODO
+#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
+
 #endif /* AMIROOS_CFG_TESTS_ENABLE == true */
 
 /** @} */
