commit bffb3465f93e69701c9b64dfa833cf7b0a55e690
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Mon Jan 14 11:15:20 2019 +0100

    Added new periphery hardware (PCAL6524 GPIO extender and AT42QT1050 touch sensor) to the PowerManagement, including unit tests.

diff --git a/modules/PowerManagement_1-1/module.h b/modules/PowerManagement_1-1/module.h
index 4e858e1..209474f 100644
--- a/modules/PowerManagement_1-1/module.h
+++ b/modules/PowerManagement_1-1/module.h
@@ -453,11 +453,13 @@ extern ROMCONST char* moduleShellPrompt;
   }
 #elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
   #define MODULE_INIT_TEST_SENSORRING() {                                     \
-    /* TODO */                                                                \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldPcal6524.shellcmd);           \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldAt42qt1050.shellcmd);         \
   }
 #elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
   #define MODULE_INIT_TEST_SENSORRING() {                                     \
-    /* TODO */                                                                \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldPcal6524.shellcmd);           \
+    aosShellAddCommand(&aos.shell, &moduleUtAlldAt42qt1050.shellcmd);         \
   }
 #else
   #define MODULE_INIT_TEST_SENSORRING()         {}
@@ -499,11 +501,15 @@ extern ROMCONST char* moduleShellPrompt;
   }
 #elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
   #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {                           \
-    /* TODO */                                                                \
+    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT42QT1050_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT42QT1050_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
   }
 #elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
   #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {                           \
-    /* TODO */                                                                \
+    moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm18Pm33GaugeRearConfig.clock_speed;  \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (PCAL6524_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? PCAL6524_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
+    moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed = (AT42QT1050_LLD_I2C_MAXFREQUENCY < moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed) ? AT42QT1050_LLD_I2C_MAXFREQUENCY : moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig.clock_speed;  \
   }
 #else
   #define MODULE_INIT_PERIPHERY_COMM_SENSORRING() {}
@@ -683,11 +689,47 @@ extern VCNL4020Driver moduleLldProximity2;
 #endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
 
 #if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
-// TODO
+
+#include <alld_pcal6524.h>
+#include <alld_at42qt1050.h>
+
+/**
+ * @brief   GPIO extender (I2C #1) driver.
+ */
+extern PCAL6524Driver moduleLldGpioExtender1;
+
+/**
+ * @brief   GPIO extender (I2C #2) driver.
+ */
+extern PCAL6524Driver moduleLldGpioExtender2;
+
+/**
+ * @brief   Touch sensor driver.
+ */
+extern AT42QT1050Driver moduleLldTouch;
+
 #endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
 
 #if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
-// TODO
+
+#include <alld_pcal6524.h>
+#include <alld_at42qt1050.h>
+
+/**
+ * @brief   GPIO extender (I2C #1) driver.
+ */
+extern PCAL6524Driver moduleLldGpioExtender1;
+
+/**
+ * @brief   GPIO extender (I2C #2) driver.
+ */
+extern PCAL6524Driver moduleLldGpioExtender2;
+
+/**
+ * @brief   Touch sensor driver.
+ */
+extern AT42QT1050Driver moduleLldTouch;
+
 #endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
 
 /** @} */
@@ -784,11 +826,37 @@ extern aos_unittest_t moduleUtAlldVcnl4020;
 #endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */
 
 #if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__)
-// TODO
+
+#include <ut_alld_pcal6524.h>
+#include <ut_alld_at42qt1050.h>
+
+/**
+ * @brief   PCAL6524 (GPIO extender) unit test object.
+ */
+extern aos_unittest_t moduleUtAlldPcal6524;
+
+/**
+ * @brief   AT42QT1050 (touch sensor) unit test object.
+ */
+extern aos_unittest_t moduleUtAlldAt42qt1050;
+
 #endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X */
 
 #if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
-// TODO
+
+#include <ut_alld_pcal6524.h>
+#include <ut_alld_at42qt1050.h>
+
+/**
+ * @brief   PCAL6524 (GPIO extender) unit test object.
+ */
+extern aos_unittest_t moduleUtAlldPcal6524;
+
+/**
+ * @brief   AT42QT1050 (touch sensor) unit test object.
+ */
+extern aos_unittest_t moduleUtAlldAt42qt1050;
+
 #endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */
 
 #endif /* AMIROOS_CFG_TESTS_ENABLE == true */
