commit a845d9eb1a1c226a08921288ccaf64da277ba557
Author: Andre Raming <araming@techfak.uni-bielefeld.de>
Date:   Tue Apr 23 16:23:02 2019 +0200

    added vl53l0x + unittests

diff --git a/modules/PowerManagement_1-2/module.c b/modules/PowerManagement_1-2/module.c
index b7c3ec6..99c4581 100644
--- a/modules/PowerManagement_1-2/module.c
+++ b/modules/PowerManagement_1-2/module.c
@@ -672,6 +672,217 @@ AT42QT1050Driver moduleLldTouch = {
   /* I²C address  */ AT42QT1050_LLD_I2C_ADDRSEL_LOW,
 };
 
+VL53L0XDriver moduleLldProximity1 = {
+    {
+        /* I²C Driver */ &MODULE_HAL_I2C_SR_PM18_PM33_GAUGEREAR,
+        /* I²C timeout */ TIME_INFINITE,
+
+        /* VL53L0X_DevData_t */
+        {
+            /* VL53L0X_DMaxData_t */
+            {
+                /* AmbTuningWindowFactor_K */ 0,
+                /* RetSignalAt0mm */ 0,
+
+            },
+            /* Part2PartOffsetNVMMicroMeter */ 0,
+            /* Part2PartOffsetAdjustmentNVMMicroMeter */ 0,
+            /* VL53L0X_DeviceParameters_t */
+            {
+                /* VL53L0X_DeviceModes DeviceMode 0 == singleranging*/ 0,
+                /* VL53L0X_HistogramModes HistogramMode 0=disable */ 0,
+                /* MeasurementTimingBudgetMicroSeconds */ 0,
+                /* InterMeasurementPeriodMilliSeconds */ 0,
+                /* !! XTalkCompensationEnable */ 0,
+                /* XTalkCompensationRangeMilliMeter */ 0,
+                /* XTalkCompensationRateMegaCps */ 0,
+                /* RangeOffsetMicroMeters */ 0,
+                /* !! LimitChecksEnable */ 0,
+                /* LimitChecksStatus */ 0,
+                /* !! WrapAroundCheckEnable */ 0,
+
+            },
+            /* VL53L0X_RangingMeasurementData_t */
+            {
+                /* TimeStamp */ 0,
+                /* MeasurementTimeUsec */ 0,
+                /* RangeMilliMeter */ 0,
+                /* !! RangeDMaxMilliMeter */ 0,
+                /* SignalRateRtnMegaCps */ 0,
+                /* AmbientRateRtnMegaCps */ 0,
+                /* EffectiveSpadRtnCount */ 0,
+                /* ZoneId */ 0,
+                /* RangeFractionalPart */ 0,
+                /* RangeStatus */ 0,
+            },
+            /* VL53L0X_HistogramMeasurementData_t */
+            {
+                /* HistogramData */ 0,
+                /* HistogramType */ 0,
+                /* FirstBin */ 0,
+                /* BufferSize */ 0,
+                /* NumberOfBins */ 0,
+                /* VL53L0X_DeviceError ErrorStatus 0 == None_error */ 0,
+            },
+            /* VL53L0X_DeviceSpecificParameters_t */
+            {
+                /* OscFrequencyMHz */ 0,
+                /* LastEncodedTimeout */ 0,
+                /* !! VL53L0X_GpioFunctionality Pin0GpioFunctionality 0==no interrupt */ 0,
+                /* FinalRangeTimeoutMicroSecs */ 0,
+                /* FinalRangeVcselPulsePeriod */ 0,
+                /* PreRangeTimeoutMicroSecs */ 0,
+                /* PreRangeVcselPulsePeriod */ 0,
+                /* SigmaEstRefArray */ 0,
+                /* SigmaEstEffPulseWidth */ 0,
+                /* SigmaEstEffAmbWidth */ 0,
+                /* ReadDataFromDeviceDone 0 == read from device was not done */ 0,
+                /* ModuleId */ 0,
+                /* Revision */ 0,
+                /* ProductId */ "0",
+                /* !! ReferenceSpadCount */ 0,
+                /* !! ReferenceSpadType */ 0,
+                /* RefSpadsInitialised */ 0,
+                /* PartUIDUpper */ 0,
+                /* PartUIDLower */ 0,
+                /* SignalRateMeasFixed400mm */ 0,
+            },
+            /* VL53L0X_SpadData_t */
+            {
+                /* RefSpadEnables */ 0,
+                /* RefGoodSpadMap */ 0,
+
+            },
+            /* SequenceConfig */ 0,
+            /* !! RangeFractionalEnable */ 0,
+            /* VL53L0X_State PalState */ 0,
+            /* !! VL53L0X_PowerModes PowerMode 0==VL53L0X_POWERMODE_STANDBY_LEVEL1 */ 0,
+            /* SigmaEstRefArray */ 0,
+            /* SigmaEstEffPulseWidth */ 0,
+            /* SigmaEstEffAmbWidth */ 0,
+            /* StopVariable */ 0,
+            /* targetRefRate */ 0,
+            /* SigmaEstimate */ 0,
+            /* SignalEstimate */0 ,
+            /* LastSignalRefMcps */ 0,
+            /* *pTuningSettingsPointer */ 0,
+            /* UseInternalTuningSettings */ 0,
+            /* LinearityCorrectiveGain */ 0,
+            /* !! DmaxCalRangeMilliMeter */ 0,
+            /* DmaxCalSignalRateRtnMegaCps */ 0,
+        },
+        /* I²C address */ VL53L0X_LLD_I2C_ADDR,
+        /* COMM TYPE*/ 1,
+        /* COMM SPEED*/ 1,
+    },
+};
+
+VL53L0XDriver moduleLldProximity2 = {
+    {
+        /* I²C Driver */ &MODULE_HAL_I2C_SR_PM42_PM50_PMVDD_EEPROM_GAUGEFRONT,
+        /* I²C timeout */ TIME_INFINITE,
+
+        /* VL53L0X_DevData_t */
+        {
+            /* VL53L0X_DMaxData_t */
+            {
+                /* AmbTuningWindowFactor_K */ 0,
+                /* RetSignalAt0mm */ 0,
+
+            },
+            /* Part2PartOffsetNVMMicroMeter */ 0,
+            /* Part2PartOffsetAdjustmentNVMMicroMeter */ 0,
+            /* VL53L0X_DeviceParameters_t */
+            {
+                /* VL53L0X_DeviceModes DeviceMode 0 == singleranging*/ 0,
+                /* VL53L0X_HistogramModes HistogramMode 0=disable */ 0,
+                /* MeasurementTimingBudgetMicroSeconds */ 0,
+                /* InterMeasurementPeriodMilliSeconds */ 0,
+                /* !! XTalkCompensationEnable */ 0,
+                /* XTalkCompensationRangeMilliMeter */ 0,
+                /* XTalkCompensationRateMegaCps */ 0,
+                /* RangeOffsetMicroMeters */ 0,
+                /* !! LimitChecksEnable */ 0,
+                /* LimitChecksStatus */ 0,
+                /* !! WrapAroundCheckEnable */ 0,
+
+            },
+            /* VL53L0X_RangingMeasurementData_t */
+            {
+                /* TimeStamp */ 0,
+                /* MeasurementTimeUsec */ 0,
+                /* RangeMilliMeter */ 0,
+                /* !! RangeDMaxMilliMeter */ 0,
+                /* SignalRateRtnMegaCps */ 0,
+                /* AmbientRateRtnMegaCps */ 0,
+                /* EffectiveSpadRtnCount */ 0,
+                /* ZoneId */ 0,
+                /* RangeFractionalPart */ 0,
+                /* RangeStatus */ 0,
+            },
+            /* VL53L0X_HistogramMeasurementData_t */
+            {
+                /* HistogramData */ 0,
+                /* HistogramType */ 0,
+                /* FirstBin */ 0,
+                /* BufferSize */ 0,
+                /* NumberOfBins */ 0,
+                /* VL53L0X_DeviceError ErrorStatus 0 == None_error */ 0,
+            },
+            /* VL53L0X_DeviceSpecificParameters_t */
+            {
+                /* OscFrequencyMHz */ 0,
+                /* LastEncodedTimeout */ 0,
+                /* !! VL53L0X_GpioFunctionality Pin0GpioFunctionality 0==no interrupt */ 0,
+                /* FinalRangeTimeoutMicroSecs */ 0,
+                /* FinalRangeVcselPulsePeriod */ 0,
+                /* PreRangeTimeoutMicroSecs */ 0,
+                /* PreRangeVcselPulsePeriod */ 0,
+                /* SigmaEstRefArray */ 0,
+                /* SigmaEstEffPulseWidth */ 0,
+                /* SigmaEstEffAmbWidth */ 0,
+                /* ReadDataFromDeviceDone 0 == read from device was not done */ 0,
+                /* ModuleId */ 0,
+                /* Revision */ 0,
+                /* ProductId */ "0",
+                /* !! ReferenceSpadCount */ 0,
+                /* !! ReferenceSpadType */ 0,
+                /* RefSpadsInitialised */ 0,
+                /* PartUIDUpper */ 0,
+                /* PartUIDLower */ 0,
+                /* SignalRateMeasFixed400mm */ 0,
+            },
+            /* VL53L0X_SpadData_t */
+            {
+                /* RefSpadEnables */ 0,
+                /* RefGoodSpadMap */ 0,
+
+            },
+            /* SequenceConfig */ 0,
+            /* !! RangeFractionalEnable */ 0,
+            /* VL53L0X_State PalState */ 0,
+            /* !! VL53L0X_PowerModes PowerMode 0==VL53L0X_POWERMODE_STANDBY_LEVEL1 */ 0,
+            /* SigmaEstRefArray */ 0,
+            /* SigmaEstEffPulseWidth */ 0,
+            /* SigmaEstEffAmbWidth */ 0,
+            /* StopVariable */ 0,
+            /* targetRefRate */ 0,
+            /* SigmaEstimate */ 0,
+            /* SignalEstimate */0 ,
+            /* LastSignalRefMcps */ 0,
+            /* *pTuningSettingsPointer */ 0,
+            /* UseInternalTuningSettings */ 0,
+            /* LinearityCorrectiveGain */ 0,
+            /* !! DmaxCalRangeMilliMeter */ 0,
+            /* DmaxCalSignalRateRtnMegaCps */ 0,
+        },
+        /* I²C address */ VL53L0X_LLD_I2C_ADDR,
+        /* COMM TYPE*/ 1,
+        /* COMM SPEED*/ 1,
+    },
+};
+
+
 #endif /* (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) */
 
 #if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
@@ -1383,6 +1594,526 @@ aos_unittest_t moduleUtAlldAt42qt1050 = {
   /* data           */ &_utAlldAt42qt1050Data,
 };
 
+/* VL53L0X (proximity sensor) */
+static int _utShellCmdCb_AlldVL53L0X(BaseSequentialStream* stream, int argc, char* argv[])
+{
+
+
+    // first GPIO-Extender (the first 4 areas)
+    PCAL6524Driver* mux1 = NULL;
+    // second GPRO-Extender (the last 4 areas)
+    PCAL6524Driver* mux2 = NULL;
+    uint32_t status;
+    uint8_t buffer[2];
+    mux1 = &moduleLldGpioExtender1;
+    mux2 = &moduleLldGpioExtender2;
+
+    // set the XHUT Pins (P0_0 ... P0_7 P1_0 ... P1_3 ) from first GPIO-Extender to LOW (Pull-down)
+    // first set Pull-up/pull-down enable register port to 1
+    status = pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDENABLE_P0, 0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    // second set Pull-up/pull-down selection register for all XSHUT to pull-down (write a 0 in every bitmask)
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, 0x00, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+    // first 4 register are XSHUT, last 4 are Interrupt, all need pull-up/pull-down
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDENABLE_P1,0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    // XSHUT need pull-down and Interrupt need pull-up 11110000
+    // 0xF0
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x00, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    //set the interrupt register to input, write a 1 to configuration port registers (0Ch, 0Dh, 0Eh)
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INPUT_P1, 0xF0, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+    // all Interrupt register need pull-up/pull-down
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDENABLE_P2, 0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    // all interrupt register need Pull-up (set to 1)
+    //0xFF == 11111111, we set all interrupt register to 00000000 == pull-down and only the register we need is pulled up
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x00, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    //set the interrupt register to input, write a 1 to configuration port registers (0Ch, 0Dh, 0Eh)
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INPUT_P2, 0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+    // set the XHUT Pins (P0_0 ... P0_7 P1_0 ... P1_3 ) from second GPIO-Extender to LOW
+    // same as first GPIO-Extender
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDENABLE_P0, 0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, 0x00, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDENABLE_P1,0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x00, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INPUT_P1, 0xF0, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDENABLE_P2, 0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x00, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+    status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INPUT_P2, 0xFF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+    //set one sensor to active
+    /*only bus moduleLldGpioExtender1
+
+                A            GP
+            S1  S2  S3 | S4  S5  S6 | S7  S8  S9 | S10 S11 S12|
+    GPIO
+    XSHUT   1.3 1.2 1.1| 1.0 0.7 0.6| 0.5 0.4 0.3| 0.2 0.1 0.0|
+    INTER   2.7 2.6 2.5| 2.4 2.3 2.2| 2.1 2.0 1.7| 1.6 1.5 1.4|
+
+    OPTION
+    #       11  12  13 | 14  15  16 | 17  18  19 | 110 111 112|
+
+
+    A == Anschluss
+    GP == GPIO Extender
+      */
+  if (argc == 2) {
+      if (strcmp(argv[1], "#11") == 0) {
+          buffer[0] = 0x8; // == P1.3 => Interrupt 2.7
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.7 == 01111111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x7F, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.7 with falling edge (from HIGH to LOW) == 10 00 00 00on adress 64h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#12") == 0) {
+          buffer[0] = 0x4; // PUD1.2 with interrupt P2_6
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register  M2.6 == 0xBF == 10111111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xBF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.6 with falling edge (from HIGH to LOW) == 00100000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#13") == 0) {
+          buffer[0] = 0x2; // PUD1.1 with Interrupt P2_5
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x10, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register  M2.5 == 0xDF == 11011111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xBF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.5 with falling edge (from HIGH to LOW) == 0x8 == 00001000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#14") == 0) {
+          buffer[0] = 0x1; // PUD1.0 with Interrupt P2_4
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register  M2.4 == 0xEF == 11101111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xEF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.4 with falling edge (from HIGH to LOW) == 0x8 == 00000010
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#15") == 0) {
+          buffer[0] = 0x80; // PUD0.7 with interrupt P2.3
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00001000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.3 == 11110111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xF7, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.2 with falling edge (from HIGH to LOW) == 10000000 on adress 64h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#16") == 0) {
+          buffer[0] = 0x40; // PUD0.6 with interrupt P2.2
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00000100
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x4, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.2 == 11111011
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xFB, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.2 with falling edge (from HIGH to LOW) == 00100000 on adress 64h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#17") == 0) {
+          buffer[0] = 0x20; // PUD0.5 wirh interrupt P2.1
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00000010
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.1 == 11111101
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xFD, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.1 with falling edge (from HIGH to LOW) == 00001000 on adress 64h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#18") == 0) {
+          buffer[0] = 0x10; // PUD0.4 with interrupt P2.0
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00000001
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x1, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.0 == 11111110
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xFE, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 00000010 on adress 64h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#19") == 0) {
+
+          buffer[0] = 0x8; // PUD0.3 with interrupt P1_7
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 10000000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.7 == 01111111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0x7F, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 10000000 on adress 63h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#110") == 0) {
+
+          buffer[0] = 0x4; //PUD0.2 with interrupt P1_6
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 01000000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x40, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.6 == 10111111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0xBF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 00100000 on adress 63h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#111") == 0) {
+          buffer[0] = 0x2; // PUD0.1 with interrupt P1_5
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00100000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.5 == 11011111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0xDF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 00001000 on adress 63h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      } else if (strcmp(argv[1], "#112") == 0) {
+
+          buffer[0] = 0x1; // PUD0.0 with interrupt P1_4
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00010000
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x10, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.4 == 11101111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0xEF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.4 with falling edge (from HIGH to LOW) == 00 00 00 10 on adress 63h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+
+      } else if (strcmp(argv[1], "#21") == 0) {
+          buffer[0] = 0x8; // == P1.3 => Interrupt 2.7
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.7 == 01111111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x7F, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.7 with falling edge (from HIGH to LOW) == 10 00 00 00on adress 64h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#22") == 0) {
+          buffer[0] = 0x4; // PUD1.2 with interrupt P2_6
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register  M2.6 == 0xBF == 10111111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xBF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.6 with falling edge (from HIGH to LOW) == 00100000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+
+      } else if (strcmp(argv[1], "#23") == 0) {
+          buffer[0] = 0x2; // PUD1.1 with Interrupt P2_5
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x10, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register  M2.5 == 0xDF == 11011111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xBF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.5 with falling edge (from HIGH to LOW) == 0x8 == 00001000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#24") == 0) {
+          buffer[0] = 0x1; // PUD1.0 with Interrupt P2_4
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register  M2.4 == 0xEF == 11101111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xEF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.4 with falling edge (from HIGH to LOW) == 0x8 == 00000010
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#25") == 0) {
+          buffer[0] = 0x80; // PUD0.7 with interrupt P2.3
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00001000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.3 == 11110111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xF7, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.2 with falling edge (from HIGH to LOW) == 10000000 on adress 64h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#26") == 0) {
+          buffer[0] = 0x40; // PUD0.6 with interrupt P2.2
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00000100
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x4, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.2 == 11111011
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xFB, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.2 with falling edge (from HIGH to LOW) == 00100000 on adress 64h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#27") == 0) {
+          buffer[0] = 0x20; // PUD0.5 wirh interrupt P2.1
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00000010
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.1 == 11111101
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xFD, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.1 with falling edge (from HIGH to LOW) == 00001000 on adress 64h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#28") == 0) {
+          buffer[0] = 0x10; // PUD0.4 with interrupt P2.0
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00000001
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x1, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.0 == 11111110
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0xFE, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 00000010 on adress 64h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2A, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#29") == 0) {
+
+          buffer[0] = 0x8; // PUD0.3 with interrupt P1_7
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 10000000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.7 == 01111111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0x7F, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 10000000 on adress 63h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#210") == 0) {
+
+          buffer[0] = 0x4; //PUD0.2 with interrupt P1_6
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 01000000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x40, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.6 == 10111111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0xBF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 00100000 on adress 63h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#211") == 0) {
+          buffer[0] = 0x2; // PUD0.1 with interrupt P1_5
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00100000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x20, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.5 == 11011111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0xDF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.5 with falling edge (from HIGH to LOW) == 00001000 on adress 63h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x8, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else if (strcmp(argv[1], "#212") == 0) {
+
+          buffer[0] = 0x1; // PUD0.0 with interrupt P1_4
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P0, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register (set to 1) == 00010000
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_PUPDSELECTION_P1, 0x10, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M1.4 == 11101111
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTMASK_P1, 0xEF, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE1.4 with falling edge (from HIGH to LOW) == 00 00 00 10 on adress 63h
+          status |= pcal6524_lld_write_reg(mux2, PCAL6524_LLD_CMD_INTERRUPTEDGE_P1B, 0x2, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity2;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT2;
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender2;
+      } else{
+          //use first sensor
+          chprintf(stream, "unknown argument, use first sensor\n");
+          usleep(2000000);
+          buffer[0] = 0x8; // == P1.3 => Interrupt 2.7
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P1, buffer[0], ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // enable pull-up for the one used interrupt register
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_PUPDSELECTION_P2, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // only one pin is set to 0 as interrupt mask register => M2.7 == 01111111
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTMASK_P2, 0x7F, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+          // interrupt edge register IE2.7 with falling edge (from HIGH to LOW) == 10 00 00 00on adress 64h
+          status |= pcal6524_lld_write_reg(mux1, PCAL6524_LLD_CMD_INTERRUPTEDGE_P2B, 0x80, ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->timeout);
+
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = &moduleLldProximity1;
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->evtflags = MODULE_OS_IOEVENTFLAGS_IRINT1;
+
+          //set GPIO extender
+          ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = &moduleLldGpioExtender1;
+      }
+
+
+
+
+
+      (void)argc;
+      (void)argv;
+      //wait 60 ms for boottime from sensor
+      usleep(60000);
+      aosUtRun(stream, &moduleUtAlldVl53l0x, "VL53");
+
+      ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->vl53d = NULL;
+      ((ut_vl53l0xdata_t*)moduleUtAlldVl53l0x.data)->gpio = NULL;
+      return AOS_OK;
+  }else{
+
+  // print help
+  chprintf(stream, "Usage: %s OPTION\n", argv[0]);
+  chprintf(stream, "Options:\n");
+  chprintf(stream, "  #11\n");
+  chprintf(stream, "    Test the first VL53L0X sensor on the I2C bus #1.\n");
+  chprintf(stream, "  #12\n");
+  chprintf(stream, "    Test the second VL53L0X sensor on the I2C bus #1.\n");
+  chprintf(stream, "  ... #112\n");
+  chprintf(stream, "    Test the 12 VL53L0X sensor on the I2C bus #1.\n");
+  chprintf(stream, "  #21\n");
+  chprintf(stream, "    Test the first VL53L0X sensor on the I2C bus #2.\n");
+  chprintf(stream, "  ... #212\n");
+  chprintf(stream, "    Test the 12 VL53L0X sensor on the I2C bus #2.\n");
+  return AOS_INVALIDARGUMENTS;
+  }
+
+
+  // belegung der Hols beim Sensor:
+  //                    obster/rechter: interrupt, XSHUT, GND
+  //                    mittlerer:      GND, interrupt, XSHUT, GND
+  //                    Unterster/linker:GND, interrupt, XSHUT
+  // set the XHUT Pins (P0_0 ... P0_7 P1_0 ... P1_3 ) from first GPIO-Extender to LOW
+  //    -> first: Der pin, der auf XSHUT weißt ist ein Output !
+  //    -> second: setze alle Sensoren unter reset == Der Pin erhält eine Spannung unter 1 Volt
+  //    -> third: setze einen Pin auf High (Spannung groesser 2 Volt) und dann kann man die Adresse
+  //                ansprechen.
+
+
+
+}
+static ut_vl53l0xdata_t _utAlldVL53L0XData = {
+  /* driver       */ NULL,
+  /* timeout      */ MICROSECONDS_PER_SECOND,
+  /* event source */ &aos.events.io,
+  /* event flags  */ 0,
+  /* gpio */ NULL,
+};
+aos_unittest_t moduleUtAlldVl53l0x = {
+  /* name           */ "VL53L0X",
+  /* info           */ "proximity sensor",
+  /* test function  */ utAlldVL53L0XFunc,
+  /* shell command  */ {
+    /* name     */ "unittest:Proximity",
+    /* callback */ _utShellCmdCb_AlldVL53L0X,
+    /* next     */ NULL,
+  },
+  /* data           */ &_utAlldVL53L0XData,
+};
+
+
 #endif /* (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) */
 
 #if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) || defined(__DOXYGEN__)
