commit 3106e8ccdc0107c1fd3f92eaef77ea9bb856803b
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Thu Mar 21 17:48:56 2019 +0100

    Updated to AMiRo-LLD 1.1:
    - Implementation of periphAL has been modified accordingly.
    - GPIOs are not encoded as port/pad tuple, but as lines
    - Some unittests have been updated due to driver changes.

diff --git a/core/inc/aos_system.h b/core/inc/aos_system.h
index dab3c8e..c4dc1bb 100644
--- a/core/inc/aos_system.h
+++ b/core/inc/aos_system.h
@@ -235,6 +235,7 @@ extern "C" {
   void aosSysStop(void);
   void aosSysDeinit(void);
   void aosSysShutdownFinal(aos_shutdown_t shutdown);
+  palcallback_t aosSysGetStdIntCallback(void);
 #if defined(__cplusplus)
 }
 #endif /* defined(__cplusplus) */
diff --git a/core/src/aos_main.cpp b/core/src/aos_main.cpp
index 783e225..9aff409 100644
--- a/core/src/aos_main.cpp
+++ b/core/src/aos_main.cpp
@@ -952,12 +952,15 @@ int main(void)
 #endif /* defined(AMIROOS_CFG_MAIN_INIT_HOOK_2_ARGS) */
 #endif /* defined(AMIROOS_CFG_MAIN_INIT_HOOK_2) */
 
-  // AMiRo-OS and custom OS additions (if any)
+  // AMiRo-OS, additional interrupts and custom OS additions (if any)
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true)
   aosSysInit(moduleShellPrompt);
 #else /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
   aosSysInit();
 #endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
+#if defined(MODULE_INIT_INTERRUPTS)
+  MODULE_INIT_INTERRUPTS();
+#endif
 #if defined(MODULE_INIT_OS_EXTRA)
   MODULE_INIT_OS_EXTRA();
 #endif /* defined(MODULE_INIT_OS_EXTRA) */
@@ -998,12 +1001,12 @@ int main(void)
 #if defined(MODULE_INIT_PERIPHERY_COMM)
   MODULE_INIT_PERIPHERY_COMM();
 #endif /* defined(MODULE_INIT_PERIPHERY_COMM) */
-#if (SSSP_STAGE3_ENABLE == true )
+#if ((SSSP_STAGE3_ENABLE == true) && (HAL_USE_CAN == TRUE))
   // CAN
   if (MODULE_HAL_CAN.state == CAN_STOP) {
     canStart(&MODULE_HAL_CAN, &moduleHalCanConfig);
   }
-#endif /* (SSSP_STAGE3_ENABLE == true) */
+#endif /* (SSSP_STAGE3_ENABLE == true) && (HAL_USE_CAN == TRUE) */
   // user interface (if any)
 #if defined(MODULE_HAL_PROGIF)
   aosIOChannelInit(&_stdiochannel, (BaseAsynchronousChannel*)&MODULE_HAL_PROGIF);
diff --git a/core/src/aos_system.c b/core/src/aos_system.c
index c168be4..afa6fee 100644
--- a/core/src/aos_system.c
+++ b/core/src/aos_system.c
@@ -672,14 +672,14 @@ static int _shellcmd_kerneltestcb(BaseSequentialStream* stream, int argc, char*
 /**
  * @brief   Generic callback function for GPIO interrupts.
  *
- * @param[in] args   Pointer to the GPIO pad identifier.
+ * @param[in] args   Pointer to the GPIO line identifier.
  */
 static void _intCallback(void* args)
 {
-  aosDbgCheck((args != NULL) && (*((iopadid_t*)args) < sizeof(eventflags_t) * 8));
+  aosDbgCheck((args != NULL) && (*((ioline_t*)args) != PAL_NOLINE) && (PAL_PAD(*((ioline_t*)args)) < sizeof(eventflags_t) * 8));
 
   chSysLockFromISR();
-  chEvtBroadcastFlagsI(&aos.events.io, AOS_IOEVENT_FLAG(*((iopadid_t*)args)));
+  chEvtBroadcastFlagsI(&aos.events.io, AOS_IOEVENT_FLAG(PAL_PAD(*((ioline_t*)args))));
   chSysUnlockFromISR();
 
   return;
@@ -690,11 +690,11 @@ static void _intCallback(void* args)
 /**
  * @brief   Callback function for the Sync signal interrupt.
  *
- * @param[in] args   Pointer to the GPIO pad identifier.
+ * @param[in] args   Pointer to the GPIO line identifier.
  */
 static void _signalSyncCallback(void *args)
 {
-  aosDbgCheck((args != NULL) && (*((iopadid_t*)args) < sizeof(eventflags_t) * 8));
+  aosDbgCheck((args != NULL) && (*((ioline_t*)args) != PAL_NOLINE) && (PAL_PAD(*((ioline_t*)args)) < sizeof(eventflags_t) * 8));
 
   apalControlGpioState_t s_state;
   aos_timestamp_t uptime;
@@ -723,7 +723,7 @@ static void _signalSyncCallback(void *args)
     }
   }
   // broadcast event
-  chEvtBroadcastFlagsI(&aos.events.io, AOS_IOEVENT_FLAG(*((iopadid_t*)args)));
+  chEvtBroadcastFlagsI(&aos.events.io, AOS_IOEVENT_FLAG(PAL_PAD(*((ioline_t*)args))));
   chSysUnlockFromISR();
 
   return;
@@ -840,30 +840,26 @@ void aosSysInit(void)
   /* interrupt setup */
 #if (AMIROOS_CFG_SSSP_ENABLE == true)
   // PD signal
-  palSetPadCallback(moduleSsspGpioPd.gpio->port, moduleSsspGpioPd.gpio->pad, _intCallback, &moduleSsspGpioPd.gpio->pad);
-  palEnablePadEvent(moduleSsspGpioPd.gpio->port, moduleSsspGpioPd.gpio->pad, APAL2CH_EDGE(moduleSsspGpioPd.meta.edge));
+  palSetLineCallback(moduleSsspGpioPd.gpio->line, _intCallback, &moduleSsspGpioPd.gpio->line);
+  palEnableLineEvent(moduleSsspGpioPd.gpio->line, APAL2CH_EDGE(moduleSsspGpioPd.meta.edge));
   // SYNC signal
 #if (AMIROOS_CFG_SSSP_MASTER == true)
-  palSetPadCallback(moduleSsspGpioSync.gpio->port, moduleSsspGpioSync.gpio->pad, _intCallback, &moduleSsspGpioSync.gpio->pad);
+  palSetLineCallback(moduleSsspGpioSync.gpio->line, _intCallback, &moduleSsspGpioSync.gpio->line);
 #else /* (AMIROOS_CFG_SSSP_MASTER == true) */
-  palSetPadCallback(moduleSsspGpioSync.gpio->port, moduleSsspGpioSync.gpio->pad, _signalSyncCallback, &moduleSsspGpioSync.gpio->pad);
+  palSetLineCallback(moduleSsspGpioSync.gpio->line, _signalSyncCallback, &moduleSsspGpioSync.gpio->line);
 #endif /* (AMIROOS_CFG_SSSP_MASTER == true) */
-  palEnablePadEvent(moduleSsspGpioSync.gpio->port, moduleSsspGpioSync.gpio->pad, APAL2CH_EDGE(moduleSsspGpioSync.meta.edge));
+  palEnableLineEvent(moduleSsspGpioSync.gpio->line, APAL2CH_EDGE(moduleSsspGpioSync.meta.edge));
 #if (AMIROOS_CFG_SSSP_STACK_START != true)
   // DN signal
-  palSetPadCallback(moduleSsspGpioDn.gpio->port, moduleSsspGpioDn.gpio->pad, _intCallback, &moduleSsspGpioDn.gpio->pad);
-  palEnablePadEvent(moduleSsspGpioDn.gpio->port, moduleSsspGpioDn.gpio->pad, APAL2CH_EDGE(moduleSsspGpioDn.meta.edge));
+  palSetLineCallback(moduleSsspGpioDn.gpio->line, _intCallback, &moduleSsspGpioDn.gpio->line);
+  palEnableLineEvent(moduleSsspGpioDn.gpio->line, APAL2CH_EDGE(moduleSsspGpioDn.meta.edge));
 #endif /* (AMIROOS_CFG_SSSP_STACK_START != true) */
 #if (AMIROOS_CFG_SSSP_STACK_END != true)
   // UP signal
-  palSetPadCallback(moduleSsspGpioUp.gpio->port, moduleSsspGpioUp.gpio->pad, _intCallback, &moduleSsspGpioUp.gpio->pad);
-  palEnablePadEvent(moduleSsspGpioUp.gpio->port, moduleSsspGpioUp.gpio->pad, APAL2CH_EDGE(moduleSsspGpioUp.meta.edge));
+  palSetLineCallback(moduleSsspGpioUp.gpio->line, _intCallback, &moduleSsspGpioUp.gpio->line);
+  palEnableLineEvent(moduleSsspGpioUp.gpio->line, APAL2CH_EDGE(moduleSsspGpioUp.meta.edge));
 #endif /* (AMIROOS_CFG_SSSP_STACK_END != true) */
 #endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */
-#if defined(MODULE_INIT_INTERRUPTS)
-  // further interrupt signals
-  MODULE_INIT_INTERRUPTS();
-#endif /* defined(MODULE_INIT_INTERRUPTS) */
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true)
   /* init shell */
@@ -1168,4 +1164,14 @@ void aosSysShutdownFinal(aos_shutdown_t shutdown)
   return;
 }
 
+/**
+ * @brief   Generic callback function for GPIO interrupts.
+ *
+ * @param[in] args   Pointer to the GPIO pad identifier.
+ */
+palcallback_t aosSysGetStdIntCallback(void)
+{
+  return _intCallback;
+}
+
 /** @} */
diff --git a/modules/DiWheelDrive_1-1/alldconf.h b/modules/DiWheelDrive_1-1/alldconf.h
index bc3cf36..9a2c97b 100644
--- a/modules/DiWheelDrive_1-1/alldconf.h
+++ b/modules/DiWheelDrive_1-1/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/DiWheelDrive_1-1/module.c b/modules/DiWheelDrive_1-1/module.c
index 7601015..77f7e43 100644
--- a/modules/DiWheelDrive_1-1/module.c
+++ b/modules/DiWheelDrive_1-1/module.c
@@ -111,8 +111,8 @@ SerialConfig moduleHalProgIfConfig = {
 SPIConfig moduleHalSpiAccelerometerConfig = {
   /* circular buffer mode         */ false,
   /* callback function pointer    */ NULL,
-  /* chip select line port        */ GPIOC,
-  /* chip select line pad number  */ GPIOC_ACCEL_SS_N,
+  /* chip select line port        */ PAL_PORT(LINE_ACCEL_SS_N),
+  /* chip select line pad number  */ PAL_PAD(LINE_ACCEL_SS_N),
   /* CR1                          */ SPI_CR1_BR_0,
   /* CR2                          */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
@@ -120,8 +120,8 @@ SPIConfig moduleHalSpiAccelerometerConfig = {
 SPIConfig moduleHalSpiGyroscopeConfig = {
   /* circular buffer mode         */ false,
   /* callback function pointer    */ NULL,
-  /* chip select line port        */ GPIOC,
-  /* chip select line pad number  */ GPIOC_GYRO_SS_N,
+  /* chip select line port        */ PAL_PORT(LINE_GYRO_SS_N),
+  /* chip select line pad number  */ PAL_PAD(LINE_GYRO_SS_N),
   /* CR1                          */ SPI_CR1_BR_0,
   /* CR2                          */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
@@ -139,8 +139,7 @@ SPIConfig moduleHalSpiGyroscopeConfig = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LED,
+  /* line */ LINE_LED,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -155,8 +154,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   POWER_EN output signal GPIO.
  */
 static apalGpio_t _gpioPowerEn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_POWER_EN,
+  /* line */ LINE_POWER_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioPowerEn = {
   /* GPIO */ &_gpioPowerEn,
@@ -171,8 +169,7 @@ ROMCONST apalControlGpio_t moduleGpioPowerEn = {
  * @brief   COMPASS_DRDY output signal GPIO.
  */
 static apalGpio_t _gpioCompassDrdy = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_COMPASS_DRDY,
+  /* line */ LINE_COMPASS_DRDY,
 };
 ROMCONST apalControlGpio_t moduleGpioCompassDrdy = {
   /* GPIO */ &_gpioCompassDrdy,
@@ -187,8 +184,7 @@ ROMCONST apalControlGpio_t moduleGpioCompassDrdy = {
  * @brief   IR_INT input signal GPIO.
  */
 static apalGpio_t _gpioIrInt = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IR_INT,
+  /* line */ LINE_IR_INT,
 };
 ROMCONST apalControlGpio_t moduleGpioIrInt = {
   /* GPIO */ &_gpioIrInt,
@@ -203,8 +199,7 @@ ROMCONST apalControlGpio_t moduleGpioIrInt = {
  * @brief   GYRO_DRDY input signal GPIO.
  */
 static apalGpio_t _gpioGyroDrdy = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_GYRO_DRDY,
+  /* line */ LINE_GYRO_DRDY,
 };
 ROMCONST apalControlGpio_t moduleGpioGyroDrdy = {
   /* GPIO */ &_gpioGyroDrdy,
@@ -219,8 +214,7 @@ ROMCONST apalControlGpio_t moduleGpioGyroDrdy = {
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartUp = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_UP,
+  /* line */ LINE_SYS_UART_UP,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
@@ -235,8 +229,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
  * @brief   ACCEL_INT input signal GPIO.
  */
 static apalGpio_t _gpioAccelInt = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_ACCEL_INT_N,
+  /* line */ LINE_ACCEL_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioAccelInt = {
   /* GPIO */ &_gpioAccelInt,
@@ -251,8 +244,7 @@ ROMCONST apalControlGpio_t moduleGpioAccelInt = {
  * @brief   SYS_SNYC bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSync = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_INT_N,
+  /* line */ LINE_SYS_INT_N,
 };
 ROMCONST apalControlGpio_t  moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
@@ -267,8 +259,7 @@ ROMCONST apalControlGpio_t  moduleGpioSysSync = {
  * @brief   PATH_DCSTAT input signal GPIO.
  */
 static apalGpio_t _gpioPathDcStat = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_PATH_DCSTAT,
+  /* line */ LINE_PATH_DCSTAT,
 };
 ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
   /* GPIO */ &_gpioPathDcStat,
@@ -283,8 +274,7 @@ ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
  * @brief   PATH_DCEN output signal GPIO.
  */
 static apalGpio_t _gpioPathDcEn = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_PATH_DCEN,
+  /* line */ LINE_PATH_DCEN,
 };
 ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
   /* GPIO */ &_gpioPathDcEn,
@@ -299,8 +289,7 @@ ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysPd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PD_N,
+  /* line */ LINE_SYS_PD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
@@ -315,8 +304,7 @@ ROMCONST apalControlGpio_t moduleGpioSysPd = {
  * @brief   SYS_REG_EN input signal GPIO.
  */
 static apalGpio_t _gpioSysRegEn = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_REG_EN,
+  /* line */ LINE_SYS_REG_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
   /* GPIO */ &_gpioSysRegEn,
@@ -331,8 +319,7 @@ ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
  * @brief   SYS_WARMRST bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysWarmrst = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_SYS_WARMRST_N,
+  /* line */ LINE_SYS_WARMRST_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
   /* GPIO */ &_gpioSysWarmrst,
diff --git a/modules/DiWheelDrive_1-1/module.h b/modules/DiWheelDrive_1-1/module.h
index c05399a..e47d147 100644
--- a/modules/DiWheelDrive_1-1/module.h
+++ b/modules/DiWheelDrive_1-1/module.h
@@ -242,52 +242,52 @@ extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
 /**
  * @brief   Event flag to be set on a SYS_SYNC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(GPIOC_SYS_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
 /**
  * @brief   Event flag to be set on a SYS_WARMRST interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(GPIOD_SYS_WARMRST_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_WARMRST_N))
 
 /**
  * @brief   Event flag to be set on a PATH_DCSTAT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT       AOS_IOEVENT_FLAG(GPIOC_PATH_DCEN)
+#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT       AOS_IOEVENT_FLAG(PAL_PAD(LINE_PATH_DCEN))
 
 /**
  * @brief   Event flag to be set on a COMPASS_DRDY interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_COMPASSDRDY      AOS_IOEVENT_FLAG(GPIOB_COMPASS_DRDY)
+#define MODULE_OS_IOEVENTFLAGS_COMPASSDRDY      AOS_IOEVENT_FLAG(PAL_PAD(LINE_COMPASS_DRDY))
 
 /**
  * @brief   Event flag to be set on a SYS_PD interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
 
 /**
  * @brief   Event flag to be set on a SYS_REG_EN interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSREGEN         AOS_IOEVENT_FLAG(GPIOC_SYS_REG_EN)
+#define MODULE_OS_IOEVENTFLAGS_SYSREGEN         AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_REG_EN))
 
 /**
  * @brief   Event flag to be set on a IR_INT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IRINT            AOS_IOEVENT_FLAG(GPIOB_IR_INT)
+#define MODULE_OS_IOEVENTFLAGS_IRINT            AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT))
 
 /**
  * @brief   Event flag to be set on a GYRO_DRDY interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GYRODRDY         AOS_IOEVENT_FLAG(GPIOB_GYRO_DRDY)
+#define MODULE_OS_IOEVENTFLAGS_GYRODRDY         AOS_IOEVENT_FLAG(PAL_PAD(LINE_GYRO_DRDY))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_UP interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_UP)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
 
 /**
  * @brief   Event flag to be set on a ACCEL_INT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_ACCELINT         AOS_IOEVENT_FLAG(GPIOB_ACCEL_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_ACCELINT         AOS_IOEVENT_FLAG(PAL_PAD(LINE_ACCEL_INT_N))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -309,26 +309,26 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* COMPASS_DRDY */                                                          \
-  palSetPadCallback(moduleGpioCompassDrdy.gpio->port, moduleGpioCompassDrdy.gpio->pad, _intCallback, &moduleGpioCompassDrdy.gpio->pad); \
-  palEnablePadEvent(moduleGpioCompassDrdy.gpio->port, moduleGpioCompassDrdy.gpio->pad, APAL2CH_EDGE(moduleGpioCompassDrdy.meta.edge));  \
+  palSetLineCallback(moduleGpioCompassDrdy.gpio->line, aosSysGetStdIntCallback(), &moduleGpioCompassDrdy.gpio->line); \
+  palEnableLineEvent(moduleGpioCompassDrdy.gpio->line, APAL2CH_EDGE(moduleGpioCompassDrdy.meta.edge));                \
   /* IR_INT */                                                                \
-  palSetPadCallback(moduleGpioIrInt.gpio->port, moduleGpioIrInt.gpio->pad, _intCallback, &moduleGpioIrInt.gpio->pad); \
-  palEnablePadEvent(moduleGpioIrInt.gpio->port, moduleGpioIrInt.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));  \
+  palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt.gpio->line); \
+  palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));                \
   /* GYRO_DRDY */                                                             \
-  palSetPadCallback(moduleGpioGyroDrdy.gpio->port, moduleGpioGyroDrdy.gpio->pad, _intCallback, &moduleGpioGyroDrdy.gpio->pad);  \
-  palEnablePadEvent(moduleGpioGyroDrdy.gpio->port, moduleGpioGyroDrdy.gpio->pad, APAL2CH_EDGE(moduleGpioGyroDrdy.meta.edge));   \
+  palSetLineCallback(moduleGpioGyroDrdy.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGyroDrdy.gpio->line); \
+  palEnableLineEvent(moduleGpioGyroDrdy.gpio->line, APAL2CH_EDGE(moduleGpioGyroDrdy.meta.edge));                \
   /* ACCEL_INT */                                                             \
-  palSetPadCallback(moduleGpioAccelInt.gpio->port, moduleGpioAccelInt.gpio->pad, _intCallback, &moduleGpioAccelInt.gpio->pad);  \
-  palEnablePadEvent(moduleGpioAccelInt.gpio->port, moduleGpioAccelInt.gpio->pad, APAL2CH_EDGE(moduleGpioAccelInt.meta.edge));   \
+  palSetLineCallback(moduleGpioAccelInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioAccelInt.gpio->line); \
+  palEnableLineEvent(moduleGpioAccelInt.gpio->line, APAL2CH_EDGE(moduleGpioAccelInt.meta.edge));                \
   /* PATH_DCSTAT */                                                           \
-  palSetPadCallback(moduleGpioPathDcStat.gpio->port, moduleGpioPathDcStat.gpio->pad, _intCallback, &moduleGpioPathDcStat.gpio->pad);  \
-  palEnablePadEvent(moduleGpioPathDcStat.gpio->port, moduleGpioPathDcStat.gpio->pad, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));   \
+  palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDcStat.gpio->line); \
+  palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));                \
   /* SYS_REG_EN */                                                            \
-  palSetPadCallback(moduleGpioSysRegEn.gpio->port, moduleGpioSysRegEn.gpio->pad, _intCallback, &moduleGpioSysRegEn.gpio->pad);  \
-  palEnablePadEvent(moduleGpioSysRegEn.gpio->port, moduleGpioSysRegEn.gpio->pad, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));   \
+  palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysRegEn.gpio->line); \
+  palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));                \
   /* SYS_WARMRST */                                                           \
-  palSetPadCallback(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, _intCallback, &moduleGpioSysWarmrst.gpio->pad);  \
-  palEnablePadEvent(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));   \
+  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
+  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
 }
 
 /**
diff --git a/modules/DiWheelDrive_1-2/alldconf.h b/modules/DiWheelDrive_1-2/alldconf.h
index de0d826..c26ee9a 100644
--- a/modules/DiWheelDrive_1-2/alldconf.h
+++ b/modules/DiWheelDrive_1-2/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/DiWheelDrive_1-2/module.c b/modules/DiWheelDrive_1-2/module.c
index ab17198..96041bb 100644
--- a/modules/DiWheelDrive_1-2/module.c
+++ b/modules/DiWheelDrive_1-2/module.c
@@ -121,8 +121,7 @@ SerialConfig moduleHalProgIfConfig = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LED,
+  /* line */ LINE_LED,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -137,8 +136,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   POWER_EN output signal GPIO.
  */
 static apalGpio_t _gpioPowerEn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_POWER_EN,
+  /* line */ LINE_POWER_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioPowerEn = {
   /* GPIO */ &_gpioPowerEn,
@@ -153,8 +151,7 @@ ROMCONST apalControlGpio_t moduleGpioPowerEn = {
  * @brief   IR_INT input signal GPIO.
  */
 static apalGpio_t _gpioIrInt = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IR_INT,
+  /* line */ LINE_IR_INT,
 };
 ROMCONST apalControlGpio_t moduleGpioIrInt = {
   /* GPIO */ &_gpioIrInt,
@@ -169,8 +166,7 @@ ROMCONST apalControlGpio_t moduleGpioIrInt = {
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartUp = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_UP,
+  /* line */ LINE_SYS_UART_UP,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
@@ -185,8 +181,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
  * @brief   IMU_INT input signal GPIO.
  */
 static apalGpio_t _gpioImuInt = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IMU_INT,
+  /* line */ LINE_IMU_INT,
 };
 ROMCONST apalControlGpio_t moduleGpioImuInt = {
   /* GPIO */ &_gpioImuInt,
@@ -201,8 +196,7 @@ ROMCONST apalControlGpio_t moduleGpioImuInt = {
  * @brief   SYS_SNYC bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSync = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_INT_N,
+  /* line */ LINE_SYS_INT_N,
 };
 ROMCONST apalControlGpio_t  moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
@@ -217,8 +211,7 @@ ROMCONST apalControlGpio_t  moduleGpioSysSync = {
  * @brief   IMU_RESET output signal GPIO.
  */
 static apalGpio_t _gpioImuReset = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IMU_RESET_N,
+  /* line */ LINE_IMU_RESET_N,
 };
 ROMCONST apalControlGpio_t  moduleGpioImuReset = {
   /* GPIO */ &_gpioImuReset,
@@ -233,8 +226,7 @@ ROMCONST apalControlGpio_t  moduleGpioImuReset = {
  * @brief   PATH_DCSTAT input signal GPIO.
  */
 static apalGpio_t _gpioPathDcStat = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_PATH_DCSTAT,
+  /* line */ LINE_PATH_DCSTAT,
 };
 ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
   /* GPIO */ &_gpioPathDcStat,
@@ -249,8 +241,7 @@ ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
  * @brief   PATH_DCEN output signal GPIO.
  */
 static apalGpio_t _gpioPathDcEn = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_PATH_DCEN,
+  /* line */ LINE_PATH_DCEN,
 };
 ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
   /* GPIO */ &_gpioPathDcEn,
@@ -265,8 +256,7 @@ ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysPd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PD_N,
+  /* line */ LINE_SYS_PD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
@@ -281,8 +271,7 @@ ROMCONST apalControlGpio_t moduleGpioSysPd = {
  * @brief   SYS_REG_EN input signal GPIO.
  */
 static apalGpio_t _gpioSysRegEn = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_REG_EN,
+  /* line */ LINE_SYS_REG_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
   /* GPIO */ &_gpioSysRegEn,
@@ -297,8 +286,7 @@ ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
  * @brief   IMU_BOOT_LOAD output signal GPIO.
  */
 static apalGpio_t _gpioImuBootLoad = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IMU_BOOT_LOAD_N,
+  /* line */ LINE_IMU_BOOT_LOAD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioImuBootLoad = {
   /* GPIO */ &_gpioImuBootLoad,
@@ -313,8 +301,7 @@ ROMCONST apalControlGpio_t moduleGpioImuBootLoad = {
  * @brief   IMU_BL_IND input signal GPIO.
  */
 static apalGpio_t _gpioImuBlInd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IMU_BL_IND,
+  /* line */ LINE_IMU_BL_IND,
 };
 ROMCONST apalControlGpio_t moduleGpioImuBlInd = {
   /* GPIO */ &_gpioImuBlInd,
@@ -329,8 +316,7 @@ ROMCONST apalControlGpio_t moduleGpioImuBlInd = {
  * @brief   SYS_WARMRST bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysWarmrst = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_SYS_WARMRST_N,
+  /* line */ LINE_SYS_WARMRST_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
   /* GPIO */ &_gpioSysWarmrst,
diff --git a/modules/DiWheelDrive_1-2/module.h b/modules/DiWheelDrive_1-2/module.h
index 497616c..d5e3bbe 100644
--- a/modules/DiWheelDrive_1-2/module.h
+++ b/modules/DiWheelDrive_1-2/module.h
@@ -232,42 +232,42 @@ extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
 /**
  * @brief   Event flag to be set on a SYS_SYNC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(GPIOC_SYS_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
 /**
  * @brief   Event flag to be set on a SYS_WARMRST interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(GPIOD_SYS_WARMRST_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_WARMRST_N))
 
 /**
  * @brief   Event flag to be set on a PATH_DCSTAT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT       AOS_IOEVENT_FLAG(GPIOC_PATH_DCEN)
+#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT       AOS_IOEVENT_FLAG(PAL_PAD(LINE_PATH_DCEN))
 
 /**
  * @brief   Event flag to be set on a SYS_PD interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
 
 /**
  * @brief   Event flag to be set on a SYS_REG_EN interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSREGEN         AOS_IOEVENT_FLAG(GPIOC_SYS_REG_EN)
+#define MODULE_OS_IOEVENTFLAGS_SYSREGEN         AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_REG_EN))
 
 /**
  * @brief   Event flag to be set on a IR_INT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IRINT            AOS_IOEVENT_FLAG(GPIOB_IR_INT)
+#define MODULE_OS_IOEVENTFLAGS_IRINT            AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_UP interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_UP)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
 
 /**
  * @brief   Event flag to be set on a IMU_INT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IMUINT         AOS_IOEVENT_FLAG(GPIOB_IMU_INT)
+#define MODULE_OS_IOEVENTFLAGS_IMUINT         AOS_IOEVENT_FLAG(PAL_PAD(LINE_IMU_INT))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -289,20 +289,20 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* IR_INT */                                                                \
-  palSetPadCallback(moduleGpioIrInt.gpio->port, moduleGpioIrInt.gpio->pad, _intCallback, &moduleGpioIrInt.gpio->pad); \
-  palEnablePadEvent(moduleGpioIrInt.gpio->port, moduleGpioIrInt.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));  \
+  palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt.gpio->line); \
+  palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));                \
   /* IMU_INT */                                                               \
-  palSetPadCallback(moduleGpioImuInt.gpio->port, moduleGpioImuInt.gpio->pad, _intCallback, &moduleGpioImuInt.gpio->pad);  \
-  palEnablePadEvent(moduleGpioImuInt.gpio->port, moduleGpioImuInt.gpio->pad, APAL2CH_EDGE(moduleGpioImuInt.meta.edge));   \
+  palSetLineCallback(moduleGpioImuInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioImuInt.gpio->line); \
+  palEnableLineEvent(moduleGpioImuInt.gpio->line, APAL2CH_EDGE(moduleGpioImuInt.meta.edge));                \
   /* PATH_DCSTAT */                                                           \
-  palSetPadCallback(moduleGpioPathDcStat.gpio->port, moduleGpioPathDcStat.gpio->pad, _intCallback, &moduleGpioPathDcStat.gpio->pad);  \
-  palEnablePadEvent(moduleGpioPathDcStat.gpio->port, moduleGpioPathDcStat.gpio->pad, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));   \
+  palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDcStat.gpio->line); \
+  palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));                \
   /* SYS_REG_EN */                                                            \
-  palSetPadCallback(moduleGpioSysRegEn.gpio->port, moduleGpioSysRegEn.gpio->pad, _intCallback, &moduleGpioSysRegEn.gpio->pad);  \
-  palEnablePadEvent(moduleGpioSysRegEn.gpio->port, moduleGpioSysRegEn.gpio->pad, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));   \
+  palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysRegEn.gpio->line); \
+  palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));                \
   /* SYS_WARMRST */                                                           \
-  palSetPadCallback(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, _intCallback, &moduleGpioSysWarmrst.gpio->pad);  \
-  palEnablePadEvent(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));   \
+  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
+  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
 }
 
 /**
diff --git a/modules/LightRing_1-0/alldconf.h b/modules/LightRing_1-0/alldconf.h
index 29aaa5c..8790738 100644
--- a/modules/LightRing_1-0/alldconf.h
+++ b/modules/LightRing_1-0/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/LightRing_1-0/module.c b/modules/LightRing_1-0/module.c
index 94615e9..f67548a 100644
--- a/modules/LightRing_1-0/module.c
+++ b/modules/LightRing_1-0/module.c
@@ -63,8 +63,8 @@ SerialConfig moduleHalProgIfConfig = {
 SPIConfig moduleHalSpiLightConfig = {
   /* circular buffer mode        */ false,
   /* callback function pointer   */ NULL,
-  /* chip select line port       */ GPIOC,
-  /* chip select line pad number */ GPIOC_LIGHT_XLAT,
+  /* chip select line port       */ PAL_PORT(LINE_LIGHT_XLAT),
+  /* chip select line pad number */ PAL_PAD(LINE_LIGHT_XLAT),
   /* CR1                         */ SPI_CR1_BR_0 | SPI_CR1_BR_1,
   /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
@@ -72,8 +72,8 @@ SPIConfig moduleHalSpiLightConfig = {
 SPIConfig moduleHalSpiWlConfig = {
   /* circular buffer mode        */ false,
   /* callback function pointer   */ NULL,
-  /* chip select line port       */ GPIOB,
-  /* chip select line pad number */ GPIOB_WL_SS_N,
+  /* chip select line port       */ PAL_PORT(LINE_WL_SS_N),
+  /* chip select line pad number */ PAL_PAD(LINE_WL_SS_N),
   /* CR1                         */ SPI_CR1_BR_0,
   /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
@@ -89,8 +89,7 @@ SPIConfig moduleHalSpiWlConfig = {
  * @brief   LIGHT_BANK output signal GPIO.
  */
 static apalGpio_t _gpioLightBlank = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LIGHT_BLANK,
+  /* line */ LINE_LIGHT_BLANK,
 };
 ROMCONST apalControlGpio_t moduleGpioLightBlank = {
   /* GPIO */ &_gpioLightBlank,
@@ -105,8 +104,7 @@ ROMCONST apalControlGpio_t moduleGpioLightBlank = {
  * @brief   LASER_EN output signal GPIO.
  */
 static apalGpio_t _gpioLaserEn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_LASER_EN,
+  /* line */ LINE_LASER_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioLaserEn = {
   /* GPIO */ &_gpioLaserEn,
@@ -121,8 +119,7 @@ ROMCONST apalControlGpio_t moduleGpioLaserEn = {
  * @brief   LASER_OC input signal GPIO.
  */
 static apalGpio_t _gpioLaserOc = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_LASER_OC_N,
+  /* line */ LINE_LASER_OC_N,
 };
 ROMCONST apalControlGpio_t moduleGpioLaserOc = {
   /* GPIO */ &_gpioLaserOc,
@@ -137,8 +134,7 @@ ROMCONST apalControlGpio_t moduleGpioLaserOc = {
  * @brief   SYS_UART_DN bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartDn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_DN,
+  /* line */ LINE_SYS_UART_DN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
   /* GPIO */ &_gpioSysUartDn,
@@ -153,8 +149,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
  * @brief   WL_GDO2 input signal GPIO.
  */
 static apalGpio_t _gpioWlGdo2 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_WL_GDO2,
+  /* line */ LINE_WL_GDO2,
 };
 ROMCONST apalControlGpio_t moduleGpioWlGdo2 = {
   /* GPIO */ &_gpioWlGdo2,
@@ -169,8 +164,7 @@ ROMCONST apalControlGpio_t moduleGpioWlGdo2 = {
  * @brief   WL_GDO0 input signal GPIO.
  */
 static apalGpio_t _gpioWlGdo0= {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_WL_GDO0,
+  /* line */ LINE_WL_GDO0,
 };
 ROMCONST apalControlGpio_t moduleGpioWlGdo0 = {
   /* GPIO */ &_gpioWlGdo0,
@@ -182,27 +176,10 @@ ROMCONST apalControlGpio_t moduleGpioWlGdo0 = {
 };
 
 /**
- * @brief   LIGHT_XLAT output signal GPIO.
- */
-static apalGpio_t _gpioLightXlat = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_LIGHT_XLAT,
-};
-ROMCONST apalControlGpio_t moduleGpioLightXlat = {
-  /* GPIO */ &_gpioLightXlat,
-  /* meta */ {
-    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
-    /* active state   */ TLC5947_LLD_XLAT_ACTIVE_STATE,
-    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
-  },
-};
-
-/**
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysPd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PD_N,
+  /* line */ LINE_SYS_PD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
@@ -217,8 +194,7 @@ ROMCONST apalControlGpio_t moduleGpioSysPd = {
  * @brief   SYS_SYNC bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSync = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_SYS_INT_N,
+  /* line */ LINE_SYS_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
@@ -268,7 +244,7 @@ AT24C01BDriver moduleLldEeprom = {
 TLC5947Driver moduleLldLedPwm = {
   /* SPI driver         */ &MODULE_HAL_SPI_LIGHT,
   /* BLANK signal GPIO  */ &moduleGpioLightBlank,
-  /* XLAT signal GPIO   */ &moduleGpioLightXlat,
+  /* XLAT signal GPIO   */ NULL,
 };
 
 TPS20xxBDriver moduleLldPowerSwitchLaser = {
diff --git a/modules/LightRing_1-0/module.h b/modules/LightRing_1-0/module.h
index a07a0d1..fbcbb64 100644
--- a/modules/LightRing_1-0/module.h
+++ b/modules/LightRing_1-0/module.h
@@ -140,11 +140,6 @@ extern ROMCONST apalControlGpio_t moduleGpioWlGdo2;
 extern ROMCONST apalControlGpio_t moduleGpioWlGdo0;
 
 /**
- * @brief   LIGHT_XLAT output signal GPIO.
- */
-extern ROMCONST apalControlGpio_t moduleGpioLightXlat;
-
-/**
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 extern ROMCONST apalControlGpio_t moduleGpioSysPd;
@@ -166,32 +161,32 @@ extern ROMCONST apalControlGpio_t moduleGpioSysSync;
 /**
  * @brief   Event flag to be set on a LASER_OC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_LASEROC          AOS_IOEVENT_FLAG(GPIOB_LASER_OC_N)
+#define MODULE_OS_IOEVENTFLAGS_LASEROC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_LASER_OC_N))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_DN interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_DN)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_DN))
 
 /**
  * @brief   Event flag to be set on a WL_GDO2 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_WLGDO2           AOS_IOEVENT_FLAG(GPIOB_WL_GDO2)
+#define MODULE_OS_IOEVENTFLAGS_WLGDO2           AOS_IOEVENT_FLAG(PAL_PAD(LINE_WL_GDO2))
 
 /**
  * @brief   Event flag to be set on a WL_GDO0 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_WLGDO0           AOS_IOEVENT_FLAG(GPIOB_WL_GDO0)
+#define MODULE_OS_IOEVENTFLAGS_WLGDO0           AOS_IOEVENT_FLAG(PAL_PAD(LINE_WL_GDO0))
 
 /**
  * @brief   Event flag to be set on a SYS_PD interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
 
 /**
  * @brief   Event flag to be set on a SYS_SYNC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(GPIOD_SYS_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -206,14 +201,14 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* LASER_OC */                                                              \
-  palSetPadCallback(moduleGpioLaserOc.gpio->port, moduleGpioLaserOc.gpio->pad, _intCallback, &moduleGpioLaserOc.gpio->pad); \
-  palEnablePadEvent(moduleGpioLaserOc.gpio->port, moduleGpioLaserOc.gpio->pad, APAL2CH_EDGE(moduleGpioLaserOc.meta.edge));  \
+  palSetLineCallback(moduleGpioLaserOc.gpio->line, aosSysGetStdIntCallback(), &moduleGpioLaserOc.gpio->line); \
+  palEnableLineEvent(moduleGpioLaserOc.gpio->line, APAL2CH_EDGE(moduleGpioLaserOc.meta.edge));                \
   /* WL_GDO2 */                                                               \
-  palSetPadCallback(moduleGpioWlGdo2.gpio->port, moduleGpioWlGdo2.gpio->pad, _intCallback, &moduleGpioWlGdo2.gpio->pad);  \
-  palEnablePadEvent(moduleGpioWlGdo2.gpio->port, moduleGpioWlGdo2.gpio->pad, APAL2CH_EDGE(moduleGpioWlGdo2.meta.edge));   \
+  palSetLineCallback(moduleGpioWlGdo2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioWlGdo2.gpio->line); \
+  palEnableLineEvent(moduleGpioWlGdo2.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo2.meta.edge));                \
   /* WL_GDO0 */                                                               \
-  palSetPadCallback(moduleGpioWlGdo0.gpio->port, moduleGpioWlGdo0.gpio->pad, _intCallback, &moduleGpioWlGdo0.gpio->pad);  \
-  /*palEnablePadEvent(moduleGpioWlGdo0.gpio->port, moduleGpioWlGdo0.gpio->pad, APAL2CH_EDGE(moduleGpioWlGdo0.meta.edge)); // this is broken for some reason*/   \
+  palSetLineCallback(moduleGpioWlGdo0.gpio->line, aosSysGetStdIntCallback(), &moduleGpioWlGdo0.gpio->line); \
+  palEnableLineEvent(moduleGpioWlGdo0.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo0.meta.edge));                \
 }
 
 /**
diff --git a/modules/LightRing_1-2/alldconf.h b/modules/LightRing_1-2/alldconf.h
index e48b914..136aaa7 100644
--- a/modules/LightRing_1-2/alldconf.h
+++ b/modules/LightRing_1-2/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/LightRing_1-2/module.c b/modules/LightRing_1-2/module.c
index 3e61956..f0f3dbc 100644
--- a/modules/LightRing_1-2/module.c
+++ b/modules/LightRing_1-2/module.c
@@ -63,8 +63,8 @@ SerialConfig moduleHalProgIfConfig = {
 SPIConfig moduleHalSpiLightConfig = {
   /* circular buffer mode        */ false,
   /* callback function pointer   */ NULL,
-  /* chip select line port       */ GPIOC,
-  /* chip select line pad number */ GPIOC_LIGHT_XLAT,
+  /* chip select line port       */ PAL_PORT(LINE_LIGHT_XLAT),
+  /* chip select line pad number */ PAL_PAD(LINE_LIGHT_XLAT),
   /* CR1                         */ SPI_CR1_BR_0 | SPI_CR1_BR_1,
   /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
 };
@@ -81,8 +81,7 @@ SPIConfig moduleHalSpiLightConfig = {
  * @brief   LIGHT_BANK output signal GPIO.
  */
 static apalGpio_t _gpioLightBlank = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LIGHT_BLANK,
+  /* line */ LINE_LIGHT_BLANK,
 };
 ROMCONST apalControlGpio_t moduleGpioLightBlank = {
   /* GPIO */ &_gpioLightBlank,
@@ -97,8 +96,7 @@ ROMCONST apalControlGpio_t moduleGpioLightBlank = {
  * @brief   RS232_R_EN_N output signal GPIO.
  */
 static apalGpio_t _gpioRs232En = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_RS232_R_EN_N,
+  /* line */ LINE_RS232_R_EN_N,
 };
 ROMCONST apalControlGpio_t moduleGpioRs232En = {
   /* GPIO */ &_gpioRs232En,
@@ -113,8 +111,7 @@ ROMCONST apalControlGpio_t moduleGpioRs232En = {
  * @brief   SW_V33_EN output signal GPIO.
  */
 static apalGpio_t _gpioSwV33En = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SW_V33_EN,
+  /* line */ LINE_SW_V33_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSwV33En = {
   /* GPIO */ &_gpioSwV33En,
@@ -129,8 +126,7 @@ ROMCONST apalControlGpio_t moduleGpioSwV33En = {
  * @brief   SW_V42_EN output signal GPIO.
  */
 static apalGpio_t _gpioSwV42En = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SW_V42_EN,
+  /* line */ LINE_SW_V42_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSwV42En = {
   /* GPIO */ &_gpioSwV42En,
@@ -145,8 +141,7 @@ ROMCONST apalControlGpio_t moduleGpioSwV42En = {
  * @brief   SW_V50_EN output signal GPIO.
  */
 static apalGpio_t _gpioSwV50En = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SW_V50_EN,
+  /* line */ LINE_SW_V50_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSwV50En = {
   /* GPIO */ &_gpioSwV50En,
@@ -161,8 +156,7 @@ ROMCONST apalControlGpio_t moduleGpioSwV50En = {
  * @brief   IO_3 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo3 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IO_3,
+  /* line */ LINE_IO_3,
 };
 apalControlGpio_t moduleGpioBreakoutIo3 = {
   /* GPIO */ &_gpioBreakoutIo3,
@@ -177,8 +171,7 @@ apalControlGpio_t moduleGpioBreakoutIo3 = {
  * @brief   IO_5 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo5 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IO_5,
+  /* line */ LINE_IO_5,
 };
 apalControlGpio_t moduleGpioBreakoutIo5 = {
   /* GPIO */ &_gpioBreakoutIo5,
@@ -193,8 +186,7 @@ apalControlGpio_t moduleGpioBreakoutIo5 = {
  * @brief   IO_6 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo6 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IO_6,
+  /* line */ LINE_IO_6,
 };
 apalControlGpio_t moduleGpioBreakoutIo6 = {
   /* GPIO */ &_gpioBreakoutIo6,
@@ -209,8 +201,7 @@ apalControlGpio_t moduleGpioBreakoutIo6 = {
  * @brief   SYS_UART_DN bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartDn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_DN,
+  /* line */ LINE_SYS_UART_DN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
   /* GPIO */ &_gpioSysUartDn,
@@ -225,8 +216,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
  * @brief   IO_7 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo7 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IO_7,
+  /* line */ LINE_IO_7,
 };
 apalControlGpio_t moduleGpioBreakoutIo7 = {
   /* GPIO */ &_gpioBreakoutIo7,
@@ -241,8 +231,7 @@ apalControlGpio_t moduleGpioBreakoutIo7 = {
  * @brief   IO_8 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo8 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IO_8,
+  /* line */ LINE_IO_8,
 };
 apalControlGpio_t moduleGpioBreakoutIo8 = {
   /* GPIO */ &_gpioBreakoutIo8,
@@ -257,8 +246,7 @@ apalControlGpio_t moduleGpioBreakoutIo8 = {
  * @brief   IO_4 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo4 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IO_4,
+  /* line */ LINE_IO_4,
 };
 apalControlGpio_t moduleGpioBreakoutIo4 = {
   /* GPIO */ &_gpioBreakoutIo4,
@@ -273,8 +261,7 @@ apalControlGpio_t moduleGpioBreakoutIo4 = {
  * @brief   IO_1 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IO_1,
+  /* line */ LINE_IO_1,
 };
 apalControlGpio_t moduleGpioBreakoutIo1 = {
   /* GPIO */ &_gpioBreakoutIo1,
@@ -289,8 +276,7 @@ apalControlGpio_t moduleGpioBreakoutIo1 = {
  * @brief   IO_2 breakout signal GPIO.
  */
 static apalGpio_t _gpioBreakoutIo2 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IO_2,
+  /* line */ LINE_IO_2,
 };
 apalControlGpio_t moduleGpioBreakoutIo2 = {
   /* GPIO */ &_gpioBreakoutIo2,
@@ -305,8 +291,7 @@ apalControlGpio_t moduleGpioBreakoutIo2 = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_LED,
+  /* line */ LINE_LED,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -318,27 +303,10 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
 };
 
 /**
- * @brief   LIGHT_XLAT output signal GPIO.
- */
-static apalGpio_t _gpioLightXlat = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_LIGHT_XLAT,
-};
-ROMCONST apalControlGpio_t moduleGpioLightXlat = {
-  /* GPIO */ &_gpioLightXlat,
-  /* meta */ {
-    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
-    /* active state   */ TLC5947_LLD_XLAT_ACTIVE_STATE,
-    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
-  },
-};
-
-/**
  * @brief   SW_V18_EN output signal GPIO.
  */
 static apalGpio_t _gpioSwV18En = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SW_V18_EN,
+  /* line */ LINE_SW_V18_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSwV18En = {
   /* GPIO */ &_gpioSwV18En,
@@ -353,8 +321,7 @@ ROMCONST apalControlGpio_t moduleGpioSwV18En = {
  * @brief   SW_VSYS_EN output signal GPIO.
  */
 static apalGpio_t _gpioSwVsysEn = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SW_VSYS_EN,
+  /* line */ LINE_SW_VSYS_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSwVsysEn = {
   /* GPIO */ &_gpioSwVsysEn,
@@ -369,8 +336,7 @@ ROMCONST apalControlGpio_t moduleGpioSwVsysEn = {
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartUp = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_UART_UP,
+  /* line */ LINE_SYS_UART_UP,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
@@ -385,8 +351,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysPd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PD_N,
+  /* line */ LINE_SYS_PD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
@@ -401,8 +366,7 @@ ROMCONST apalControlGpio_t moduleGpioSysPd = {
  * @brief   SYS_SYNC bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSync = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_SYS_INT_N,
+  /* line */ LINE_SYS_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
@@ -483,7 +447,7 @@ MIC9404xDriver moduleLldPowerSwitchVsys = {
 TLC5947Driver moduleLldLedPwm = {
   /* SPI driver         */ &MODULE_HAL_SPI_LIGHT,
   /* BLANK signal GPIO  */ &moduleGpioLightBlank,
-  /* XLAT signal GPIO   */ &moduleGpioLightXlat,
+  /* XLAT signal GPIO   */ NULL,
 };
 
 /** @} */
diff --git a/modules/LightRing_1-2/module.h b/modules/LightRing_1-2/module.h
index 9e481a9..f239269 100644
--- a/modules/LightRing_1-2/module.h
+++ b/modules/LightRing_1-2/module.h
@@ -185,11 +185,6 @@ extern apalControlGpio_t moduleGpioBreakoutIo2;
 extern ROMCONST apalControlGpio_t moduleGpioLed;
 
 /**
- * @brief   LIGHT_XLAT output signal GPIO.
- */
-extern ROMCONST apalControlGpio_t moduleGpioLightXlat;
-
-/**
  * @brief   SW_V18_EN output signal GPIO.
  */
 extern ROMCONST apalControlGpio_t moduleGpioSwV18En;
@@ -226,57 +221,57 @@ extern ROMCONST apalControlGpio_t moduleGpioSysSync;
 /**
  * @brief   Event flag to be set on a IO_4 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO4      AOS_IOEVENT_FLAG(GPIOC_IO_4)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO4      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_4))
 
 /**
  * @brief   Event flag to be set on a IO_1 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO1      AOS_IOEVENT_FLAG(GPIOC_IO_1)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO1      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_1))
 
 /**
  * @brief   Event flag to be set on a SYS_SYNC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(GPIOD_SYS_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
 /**
  * @brief   Event flag to be set on a IO_3 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO3      AOS_IOEVENT_FLAG(GPIOB_IO_3)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO3      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_3))
 
 /**
  * @brief   Event flag to be set on a IO_5 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO5      AOS_IOEVENT_FLAG(GPIOB_IO_5)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO5      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_5))
 
 /**
  * @brief   Event flag to be set on a IO_6 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO6      AOS_IOEVENT_FLAG(GPIOB_IO_6)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO6      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_6))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_DN interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_DN)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_DN))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_UP interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(GPIOC_SYS_UART_UP)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
 
 /**
  * @brief   Event flag to be set on a IO_7 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO7      AOS_IOEVENT_FLAG(GPIOB_IO_7)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO7      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_7))
 
 /**
  * @brief   Event flag to be set on a IO_8 (breakout) interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO8      AOS_IOEVENT_FLAG(GPIOB_IO_8)
+#define MODULE_OS_IOEVENTFLAGS_BREAKOUTIO8      AOS_IOEVENT_FLAG(PAL_PAD(LINE_IO_8))
 
 /**
  * @brief   Event flag to be set on a SYS_PD interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
diff --git a/modules/NUCLEO-F103RB/alldconf.h b/modules/NUCLEO-F103RB/alldconf.h
index 20b7bba..606722c 100644
--- a/modules/NUCLEO-F103RB/alldconf.h
+++ b/modules/NUCLEO-F103RB/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
@@ -43,7 +43,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define AMIROLLD_CFG_TIME_SIZE                  32
 
-#define AMIROLLD_CFG_DW1000                     1
+/**
+ * @brief   Enable flag for the DW1000 UWB transmitter.
+ * @note    Uncomment this if the device is attached.
+ */
+//#define AMIROLLD_CFG_DW1000                     1
 
 #endif /* ALLDCONF_H */
 
diff --git a/modules/NUCLEO-F103RB/board.h b/modules/NUCLEO-F103RB/board.h
index b5ed689..9b4c995 100644
--- a/modules/NUCLEO-F103RB/board.h
+++ b/modules/NUCLEO-F103RB/board.h
@@ -63,8 +63,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOA_USART2_RX             3U
 #define GPIOA_ARD_A2                4U
 #define GPIOA_ADC1_IN4              4U
-#define GPIOA_LED_GREEN             5U
 #define GPIOA_ARD_D13               5U
+#define GPIOA_LED_GREEN             5U
 #define GPIOA_ARD_D12               6U
 #define GPIOA_ARD_D11               7U
 #define GPIOA_ARD_D7                8U
@@ -80,8 +80,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOB_ADC1_IN8              0U
 #define GPIOB_PIN1                  1U
 #define GPIOB_PIN2                  2U
-#define GPIOB_SWO                   3U
 #define GPIOB_ARD_D3                3U
+#define GPIOB_SWO                   3U
 #define GPIOB_ARD_D5                4U
 #define GPIOB_ARD_D4                5U
 #define GPIOB_ARD_D10               6U
@@ -166,6 +166,52 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOF_PIN13                 13U
 #define GPIOF_PIN14                 14U
 #define GPIOF_PIN15                 15U
+
+/*
+ * IO lines assignments.
+ */
+#define LINE_ARD_A0                 PAL_LINE(GPIOA, GPIOA_ARD_A0)
+#define LINE_ADC1_IN0               PAL_LINE(GPIOA, GPIOA_ADC1_IN0)
+#define LINE_ARD_A1                 PAL_LINE(GPIOA, GPIOA_ARD_A1)
+#define LINE_ADC1_IN1               PAL_LINE(GPIOA, GPIOA_ADC1_IN1)
+#define LINE_ARD_D1                 PAL_LINE(GPIOA, GPIOA_ARD_D1)
+#define LINE_USART2_TX              PAL_LINE(GPIOA, GPIOA_USART2_TX)
+#define LINE_ARD_D0                 PAL_LINE(GPIOA, GPIOA_ARD_D0)
+#define LINE_USART2_RX              PAL_LINE(GPIOA, GPIOA_USART2_RX)
+#define LINE_ARD_A2                 PAL_LINE(GPIOA, GPIOA_ARD_A2)
+#define LINE_ADC1_IN4               PAL_LINE(GPIOA, GPIOA_ADC1_IN4)
+#define LINE_ARD_D13                PAL_LINE(GPIOA, GPIOA_ARD_D13)
+#define LINE_LED_GREEN              PAL_LINE(GPIOA, GPIOA_LED_GREEN)
+#define LINE_ARD_D12                PAL_LINE(GPIOA, GPIOA_ARD_D12)
+#define LINE_ARD_D11                PAL_LINE(GPIOA, GPIOA_ARD_D11)
+#define LINE_ARD_D7                 PAL_LINE(GPIOA, GPIOA_ARD_D7)
+#define LINE_ARD_D8                 PAL_LINE(GPIOA, GPIOA_ARD_D8)
+#define LINE_ARD_D2                 PAL_LINE(GPIOA, GPIOA_ARD_D2)
+#define LINE_SWDIO                  PAL_LINE(GPIOA, GPIOA_SWDIO)
+#define LINE_SWCLK                  PAL_LINE(GPIOA, GPIOA_SWCLK)
+
+#define LINE_ARD_A3                 PAL_LINE(GPIOB, GPIOB_ARD_A3)
+#define LINE_ADC1_IN8               PAL_LINE(GPIOB, GPIOB_ADC1_IN8)
+#define LINE_ARD_D3                 PAL_LINE(GPIOB, GPIOB_ARD_D3)
+#define LINE_SWO                    PAL_LINE(GPIOB, GPIOB_SWO)
+#define LINE_ARD_D5                 PAL_LINE(GPIOB, GPIOB_ARD_D5)
+#define LINE_ARD_D4                 PAL_LINE(GPIOB, GPIOB_ARD_D4)
+#define LINE_ARD_D10                PAL_LINE(GPIOB, GPIOB_ARD_D10)
+#define LINE_ARD_D15                PAL_LINE(GPIOB, GPIOB_ARD_D15)
+#define LINE_ARD_D14                PAL_LINE(GPIOB, GPIOB_ARD_D14)
+#define LINE_ARD_D6                 PAL_LINE(GPIOB, GPIOB_ARD_D6)
+
+#define LINE_ARD_A5                 PAL_LINE(GPIOC, GPIOC_ARD_A5)
+#define LINE_ADC1_IN11              PAL_LINE(GPIOC, GPIOC_ADC1_IN11)
+#define LINE_ARD_A4                 PAL_LINE(GPIOC, GPIOC_ARD_A4)
+#define LINE_ADC1_IN10              PAL_LINE(GPIOC, GPIOC_ADC1_IN10)
+#define LINE_ARD_D9                 PAL_LINE(GPIOC, GPIOC_ARD_D9)
+#define LINE_BUTTON                 PAL_LINE(GPIOC, GPIOC_BUTTON)
+
+#define LINE_OSC_IN                 PAL_LINE(GPIOD, GPIOH_OSC_IN)
+#define LINE_OSC_OUT                PAL_LINE(GPIOD, GPIOH_OSC_OUT)
+
+
 /*
  * I/O ports initial setup, this configuration is established soon after reset
  * in the initialization code.
diff --git a/modules/NUCLEO-F103RB/module.c b/modules/NUCLEO-F103RB/module.c
index 54c4129..11fcafd 100644
--- a/modules/NUCLEO-F103RB/module.c
+++ b/modules/NUCLEO-F103RB/module.c
@@ -85,8 +85,7 @@ SPIConfig moduleHalSpiUwbLsConfig = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LED_GREEN,
+  /* line */ PAL_LINE(GPIOA, GPIOA_LED_GREEN),
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -103,8 +102,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   DW1000 reset output signal GPIO.
  */
 static apalGpio_t _gpioDw1000Reset = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_ARD_A0,   // PIN0
+  /* line */ PAL_LINE(GPIOA, GPIOA_ARD_A0),
 };
 ROMCONST apalControlGpio_t moduleGpioDw1000Reset = {
   /* GPIO */ &_gpioDw1000Reset,
@@ -120,8 +118,7 @@ ROMCONST apalControlGpio_t moduleGpioDw1000Reset = {
  * @brief   DW1000 interrrupt input signal GPIO.
  */
 static apalGpio_t _gpioDw1000Irqn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_ARD_D6,  // GPIOB_PIN10
+  /* line */ PAL_LINE(GPIOB, GPIOB_ARD_D6),
 };
 ROMCONST apalControlGpio_t moduleGpioDw1000Irqn = {
   /* GPIO */ &_gpioDw1000Irqn,
@@ -137,8 +134,7 @@ ROMCONST apalControlGpio_t moduleGpioDw1000Irqn = {
  * @brief   DW1000 SPI chip select output signal GPIO.
  */
 static apalGpio_t _gpioSpiChipSelect = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_PIN12,  // GPIOB_PIN10
+  /* line */ PAL_LINE(GPIOB, GPIOB_PIN12),
 };
 ROMCONST apalControlGpio_t moduleGpioSpiChipSelect = {
   /* GPIO */ &_gpioSpiChipSelect,
@@ -155,8 +151,7 @@ ROMCONST apalControlGpio_t moduleGpioSpiChipSelect = {
  * @brief   User button input signal GPIO.
  */
 static apalGpio_t _gpioUserButton = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_BUTTON,
+  /* line */ PAL_LINE(GPIOC, GPIOC_BUTTON),
 };
 ROMCONST apalControlGpio_t moduleGpioUserButton = {
   /* GPIO */ &_gpioUserButton,
@@ -204,7 +199,7 @@ void dw1000_spi_init(void){
   palSetPadMode(GPIOB, GPIOB_PIN13, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
   palSetPadMode(GPIOB, GPIOB_PIN14, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
   palSetPadMode(GPIOB, GPIOB_PIN15, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
-  palSetPadMode(moduleGpioSpiChipSelect.gpio->port, moduleGpioSpiChipSelect.gpio->pad, PAL_MODE_OUTPUT_PUSHPULL);
+  palSetLineMode(moduleGpioSpiChipSelect.gpio->line, PAL_MODE_OUTPUT_PUSHPULL);
   apalGpioWrite(moduleGpioSpiChipSelect.gpio, APAL_GPIO_LOW);
 }
 
diff --git a/modules/NUCLEO-F103RB/module.h b/modules/NUCLEO-F103RB/module.h
index 07f6431..344337c 100644
--- a/modules/NUCLEO-F103RB/module.h
+++ b/modules/NUCLEO-F103RB/module.h
@@ -149,12 +149,12 @@ extern ROMCONST apalControlGpio_t moduleGpioUserButton;
 /**
  * @brief   Event flag to be call dwt_isr() interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_DW1000_IRQn      AOS_IOEVENT_FLAG(GPIOB_ARD_D6)
+#define MODULE_OS_IOEVENTFLAGS_DW1000_IRQn      AOS_IOEVENT_FLAG(PAL_PAD(LINE_ARD_D6))
 
 /**
  * @brief   Event flag to be set on a USER_BUTTON interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(GPIOC_BUTTON)
+#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
 
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
@@ -164,21 +164,20 @@ extern ROMCONST apalControlGpio_t moduleGpioUserButton;
 extern ROMCONST char* moduleShellPrompt;
 #endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
 
-
 /**
  * @brief   Interrupt initialization macro.
  * @note    SSSP related interrupt signals are already initialized in 'aos_system.c'.
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* user button */                                                           \
-  palSetPadCallback(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, _intCallback, &moduleGpioUserButton.gpio->pad);  \
-  palEnablePadEvent(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));   \
+  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
+  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
   MODULE_INIT_INTERRUPTS_DW1000();                                            \
 }
 #if defined(AMIROLLD_CFG_DW1000)
   #define MODULE_INIT_INTERRUPTS_DW1000() {                                   \
-    palSetPadCallback(moduleGpioDw1000Irqn.gpio->port, moduleGpioDw1000Irqn.gpio->pad, _intCallback, &moduleGpioDw1000Irqn.gpio->pad);  \
-    palEnablePadEvent(moduleGpioDw1000Irqn.gpio->port, moduleGpioDw1000Irqn.gpio->pad, APAL2CH_EDGE(moduleGpioDw1000Irqn.meta.edge));   \
+    palSetLineCallback(moduleGpioDw1000Irqn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioDw1000Irqn.gpio->line); \
+    palEnableLineEvent(moduleGpioDw1000Irqn.gpio->line, APAL2CH_EDGE(moduleGpioDw1000Irqn.meta.edge));                \
   }
 #else /* defined(AMIROLLD_CFG_DW1000) */
   #define MODULE_INIT_INTERRUPTS_DW1000() {                                   \
diff --git a/modules/NUCLEO-F401RE/alldconf.h b/modules/NUCLEO-F401RE/alldconf.h
index ae3a27e..2ba9287 100644
--- a/modules/NUCLEO-F401RE/alldconf.h
+++ b/modules/NUCLEO-F401RE/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/NUCLEO-F401RE/board.h b/modules/NUCLEO-F401RE/board.h
index 353c10f..6210c80 100644
--- a/modules/NUCLEO-F401RE/board.h
+++ b/modules/NUCLEO-F401RE/board.h
@@ -71,8 +71,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOA_USART2_RX             3U
 #define GPIOA_ARD_A2                4U
 #define GPIOA_ADC1_IN4              4U
-#define GPIOA_LED_GREEN             5U
 #define GPIOA_ARD_D13               5U
+#define GPIOA_LED_GREEN             5U
 #define GPIOA_ARD_D12               6U
 #define GPIOA_ARD_D11               7U
 #define GPIOA_ARD_D7                8U
@@ -88,8 +88,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOB_ADC1_IN8              0U
 #define GPIOB_PIN1                  1U
 #define GPIOB_PIN2                  2U
-#define GPIOB_SWO                   3U
 #define GPIOB_ARD_D3                3U
+#define GPIOB_SWO                   3U
 #define GPIOB_ARD_D5                4U
 #define GPIOB_ARD_D4                5U
 #define GPIOB_ARD_D10               6U
@@ -227,47 +227,50 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * IO lines assignments.
  */
-#define LINE_ARD_A0                 PAL_LINE(GPIOA, 0U)
-#define LINE_ADC1_IN0               PAL_LINE(GPIOA, 0U)
-#define LINE_ARD_A1                 PAL_LINE(GPIOA, 1U)
-#define LINE_ADC1_IN1               PAL_LINE(GPIOA, 1U)
-#define LINE_ARD_D1                 PAL_LINE(GPIOA, 2U)
-#define LINE_USART2_TX              PAL_LINE(GPIOA, 2U)
-#define LINE_ARD_D0                 PAL_LINE(GPIOA, 3U)
-#define LINE_USART2_RX              PAL_LINE(GPIOA, 3U)
-#define LINE_ARD_A2                 PAL_LINE(GPIOA, 4U)
-#define LINE_ADC1_IN4               PAL_LINE(GPIOA, 4U)
-#define LINE_LED_GREEN              PAL_LINE(GPIOA, 5U)
-#define LINE_ARD_D13                PAL_LINE(GPIOA, 5U)
-#define LINE_ARD_D12                PAL_LINE(GPIOA, 6U)
-#define LINE_ARD_D11                PAL_LINE(GPIOA, 7U)
-#define LINE_ARD_D7                 PAL_LINE(GPIOA, 8U)
-#define LINE_ARD_D8                 PAL_LINE(GPIOA, 9U)
-#define LINE_ARD_D2                 PAL_LINE(GPIOA, 10U)
-#define LINE_OTG_FS_DM              PAL_LINE(GPIOA, 11U)
-#define LINE_OTG_FS_DP              PAL_LINE(GPIOA, 12U)
-#define LINE_SWDIO                  PAL_LINE(GPIOA, 13U)
-#define LINE_SWCLK                  PAL_LINE(GPIOA, 14U)
-#define LINE_ARD_A3                 PAL_LINE(GPIOB, 0U)
-#define LINE_ADC1_IN8               PAL_LINE(GPIOB, 0U)
-#define LINE_SWO                    PAL_LINE(GPIOB, 3U)
-#define LINE_ARD_D3                 PAL_LINE(GPIOB, 3U)
-#define LINE_ARD_D5                 PAL_LINE(GPIOB, 4U)
-#define LINE_ARD_D4                 PAL_LINE(GPIOB, 5U)
-#define LINE_ARD_D10                PAL_LINE(GPIOB, 6U)
-#define LINE_ARD_D15                PAL_LINE(GPIOB, 8U)
-#define LINE_ARD_D14                PAL_LINE(GPIOB, 9U)
-#define LINE_ARD_D6                 PAL_LINE(GPIOB, 10U)
-#define LINE_ARD_A5                 PAL_LINE(GPIOC, 0U)
-#define LINE_ADC1_IN10              PAL_LINE(GPIOC, 0U)
-#define LINE_ARD_A4                 PAL_LINE(GPIOC, 1U)
-#define LINE_ADC1_IN11              PAL_LINE(GPIOC, 1U)
-#define LINE_ARD_D9                 PAL_LINE(GPIOC, 7U)
-#define LINE_BUTTON                 PAL_LINE(GPIOC, 13U)
-#define LINE_OSC32_IN               PAL_LINE(GPIOC, 14U)
-#define LINE_OSC32_OUT              PAL_LINE(GPIOC, 15U)
-#define LINE_OSC_IN                 PAL_LINE(GPIOH, 0U)
-#define LINE_OSC_OUT                PAL_LINE(GPIOH, 1U)
+#define LINE_ARD_A0                 PAL_LINE(GPIOA, GPIOA_ARD_A0)
+#define LINE_ADC1_IN0               PAL_LINE(GPIOA, GPIOA_ADC1_IN0)
+#define LINE_ARD_A1                 PAL_LINE(GPIOA, GPIOA_ARD_A1)
+#define LINE_ADC1_IN1               PAL_LINE(GPIOA, GPIOA_ADC1_IN1)
+#define LINE_ARD_D1                 PAL_LINE(GPIOA, GPIOA_ARD_D1)
+#define LINE_USART2_TX              PAL_LINE(GPIOA, GPIOA_USART2_TX)
+#define LINE_ARD_D0                 PAL_LINE(GPIOA, GPIOA_ARD_D0)
+#define LINE_USART2_RX              PAL_LINE(GPIOA, GPIOA_USART2_RX)
+#define LINE_ARD_A2                 PAL_LINE(GPIOA, GPIOA_ARD_A2)
+#define LINE_ADC1_IN4               PAL_LINE(GPIOA, GPIOA_ADC1_IN4)
+#define LINE_ARD_D13                PAL_LINE(GPIOA, GPIOA_ARD_D13)
+#define LINE_LED_GREEN              PAL_LINE(GPIOA, GPIOA_LED_GREEN)
+#define LINE_ARD_D12                PAL_LINE(GPIOA, GPIOA_ARD_D12)
+#define LINE_ARD_D11                PAL_LINE(GPIOA, GPIOA_ARD_D11)
+#define LINE_ARD_D7                 PAL_LINE(GPIOA, GPIOA_ARD_D7)
+#define LINE_ARD_D8                 PAL_LINE(GPIOA, GPIOA_ARD_D8)
+#define LINE_ARD_D2                 PAL_LINE(GPIOA, GPIOA_ARD_D2)
+#define LINE_OTG_FS_DM              PAL_LINE(GPIOA, GPIOA_OTG_FS_DM)
+#define LINE_OTG_FS_DP              PAL_LINE(GPIOA, GPIOA_OTG_FS_DP)
+#define LINE_SWDIO                  PAL_LINE(GPIOA, GPIOA_SWDIO)
+#define LINE_SWCLK                  PAL_LINE(GPIOA, GPIOA_SWCLK)
+
+#define LINE_ARD_A3                 PAL_LINE(GPIOB, GPIOB_ARD_A3)
+#define LINE_ADC1_IN8               PAL_LINE(GPIOB, GPIOB_ADC1_IN8)
+#define LINE_ARD_D3                 PAL_LINE(GPIOB, GPIOB_ARD_D3)
+#define LINE_SWO                    PAL_LINE(GPIOB, GPIOB_SWO)
+#define LINE_ARD_D5                 PAL_LINE(GPIOB, GPIOB_ARD_D5)
+#define LINE_ARD_D4                 PAL_LINE(GPIOB, GPIOB_ARD_D4)
+#define LINE_ARD_D10                PAL_LINE(GPIOB, GPIOB_ARD_D10)
+#define LINE_ARD_D15                PAL_LINE(GPIOB, GPIOB_ARD_D15)
+#define LINE_ARD_D14                PAL_LINE(GPIOB, GPIOB_ARD_D14)
+#define LINE_ARD_D6                 PAL_LINE(GPIOB, GPIOB_ARD_D6)
+
+#define LINE_ARD_A5                 PAL_LINE(GPIOC, GPIOC_ARD_A5)
+#define LINE_ADC1_IN10              PAL_LINE(GPIOC, GPIOC_ADC1_IN10)
+#define LINE_ARD_A4                 PAL_LINE(GPIOC, GPIOC_ARD_A4)
+#define LINE_ADC1_IN11              PAL_LINE(GPIOC, GPIOC_ADC1_IN11)
+#define LINE_ARD_D9                 PAL_LINE(GPIOC, GPIOC_ARD_D9)
+#define LINE_BUTTON                 PAL_LINE(GPIOC, GPIOC_BUTTON)
+#define LINE_OSC32_IN               PAL_LINE(GPIOC, GPIOC_OSC32_IN)
+#define LINE_OSC32_OUT              PAL_LINE(GPIOC, GPIOC_OSC32_OUT)
+
+#define LINE_OSC_IN                 PAL_LINE(GPIOH, GPIOH_OSC_IN)
+#define LINE_OSC_OUT                PAL_LINE(GPIOH, GPIOH_OSC_OUT)
 
 /*===========================================================================*/
 /* Driver pre-compile time settings.                                         */
diff --git a/modules/NUCLEO-F401RE/module.c b/modules/NUCLEO-F401RE/module.c
index dd2f724..106240d 100644
--- a/modules/NUCLEO-F401RE/module.c
+++ b/modules/NUCLEO-F401RE/module.c
@@ -62,8 +62,7 @@ SerialConfig moduleHalProgIfConfig = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LED_GREEN,
+  /* line */ LINE_LED_GREEN,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -78,8 +77,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   User button input signal GPIO.
  */
 static apalGpio_t _gpioUserButton = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_BUTTON,
+  /* line */ LINE_BUTTON,
 };
 ROMCONST apalControlGpio_t moduleGpioUserButton = {
   /* GPIO */ &_gpioUserButton,
diff --git a/modules/NUCLEO-F401RE/module.h b/modules/NUCLEO-F401RE/module.h
index 23edbfc..e84cbac 100644
--- a/modules/NUCLEO-F401RE/module.h
+++ b/modules/NUCLEO-F401RE/module.h
@@ -91,7 +91,7 @@ extern ROMCONST apalControlGpio_t moduleGpioUserButton;
 /**
  * @brief   Event flag to be set on a USER_BUTTON interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(GPIOC_BUTTON)
+#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -106,8 +106,8 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* user button */                                                           \
-  palSetPadCallback(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, _intCallback, &moduleGpioUserButton.gpio->pad);  \
-  palEnablePadEvent(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));   \
+  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
+  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
 }
 
 /**
diff --git a/modules/NUCLEO-L476RG/alldconf.h b/modules/NUCLEO-L476RG/alldconf.h
index a644f5c..333b9d3 100644
--- a/modules/NUCLEO-L476RG/alldconf.h
+++ b/modules/NUCLEO-L476RG/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/NUCLEO-L476RG/board.h b/modules/NUCLEO-L476RG/board.h
index fab728d..5b08883 100644
--- a/modules/NUCLEO-L476RG/board.h
+++ b/modules/NUCLEO-L476RG/board.h
@@ -63,15 +63,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * IO pins assignments.
  */
 #define GPIOA_ARD_A0                0U
-#define GPIOA_ACD12_IN5             0U
+#define GPIOA_ADC12_IN5             0U
 #define GPIOA_ARD_A1                1U
-#define GPIOA_ACD12_IN6             1U
+#define GPIOA_ADC12_IN6             1U
 #define GPIOA_ARD_D1                2U
 #define GPIOA_USART2_TX             2U
 #define GPIOA_ARD_D0                3U
 #define GPIOA_USART2_RX             3U
 #define GPIOA_ARD_A2                4U
-#define GPIOA_ACD12_IN9             4U
+#define GPIOA_ADC12_IN9             4U
 #define GPIOA_ARD_D13               5U
 #define GPIOA_LED_GREEN             5U
 #define GPIOA_ARD_D12               6U
@@ -86,7 +86,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOA_PIN15                 15U
 
 #define GPIOB_ARD_A3                0U
-#define GPIOB_ACD12_IN15            0U
+#define GPIOB_ADC12_IN15            0U
 #define GPIOB_PIN1                  1U
 #define GPIOB_PIN2                  2U
 #define GPIOB_ARD_D3                3U
@@ -105,9 +105,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define GPIOB_PIN15                 15U
 
 #define GPIOC_ARD_A5                0U
-#define GPIOC_ACD123_IN1            0U
+#define GPIOC_ADC123_IN1            0U
 #define GPIOC_ARD_A4                1U
-#define GPIOC_ACD123_IN2            1U
+#define GPIOC_ADC123_IN2            1U
 #define GPIOC_PIN2                  2U
 #define GPIOC_PIN3                  3U
 #define GPIOC_PIN4                  4U
@@ -211,45 +211,47 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * IO lines assignments.
  */
-#define LINE_ARD_A0                 PAL_LINE(GPIOA, 0U)
-#define LINE_ACD12_IN5              PAL_LINE(GPIOA, 0U)
-#define LINE_ARD_A1                 PAL_LINE(GPIOA, 1U)
-#define LINE_ACD12_IN6              PAL_LINE(GPIOA, 1U)
-#define LINE_ARD_D1                 PAL_LINE(GPIOA, 2U)
-#define LINE_USART2_TX              PAL_LINE(GPIOA, 2U)
-#define LINE_ARD_D0                 PAL_LINE(GPIOA, 3U)
-#define LINE_USART2_RX              PAL_LINE(GPIOA, 3U)
-#define LINE_ARD_A2                 PAL_LINE(GPIOA, 4U)
-#define LINE_ACD12_IN9              PAL_LINE(GPIOA, 4U)
-#define LINE_ARD_D13                PAL_LINE(GPIOA, 5U)
-#define LINE_LED_GREEN              PAL_LINE(GPIOA, 5U)
-#define LINE_ARD_D12                PAL_LINE(GPIOA, 6U)
-#define LINE_ARD_D11                PAL_LINE(GPIOA, 7U)
-#define LINE_ARD_D7                 PAL_LINE(GPIOA, 8U)
-#define LINE_ARD_D8                 PAL_LINE(GPIOA, 9U)
-#define LINE_ARD_D2                 PAL_LINE(GPIOA, 10U)
-#define LINE_SWDIO                  PAL_LINE(GPIOA, 13U)
-#define LINE_SWCLK                  PAL_LINE(GPIOA, 14U)
-#define LINE_ARD_A3                 PAL_LINE(GPIOB, 0U)
-#define LINE_ACD12_IN15             PAL_LINE(GPIOB, 0U)
-#define LINE_ARD_D3                 PAL_LINE(GPIOB, 3U)
-#define LINE_SWO                    PAL_LINE(GPIOB, 3U)
-#define LINE_ARD_D5                 PAL_LINE(GPIOB, 4U)
-#define LINE_ARD_D4                 PAL_LINE(GPIOB, 5U)
-#define LINE_ARD_D10                PAL_LINE(GPIOB, 6U)
-#define LINE_ARD_D15                PAL_LINE(GPIOB, 8U)
-#define LINE_ARD_D14                PAL_LINE(GPIOB, 9U)
-#define LINE_ARD_D6                 PAL_LINE(GPIOB, 10U)
-#define LINE_ARD_A5                 PAL_LINE(GPIOC, 0U)
-#define LINE_ACD123_IN1             PAL_LINE(GPIOC, 0U)
-#define LINE_ARD_A4                 PAL_LINE(GPIOC, 1U)
-#define LINE_ACD123_IN2             PAL_LINE(GPIOC, 1U)
-#define LINE_ARD_D9                 PAL_LINE(GPIOC, 7U)
-#define LINE_BUTTON                 PAL_LINE(GPIOC, 13U)
-#define LINE_OSC32_IN               PAL_LINE(GPIOC, 14U)
-#define LINE_OSC32_OUT              PAL_LINE(GPIOC, 15U)
-#define LINE_OSC_IN                 PAL_LINE(GPIOH, 0U)
-#define LINE_OSC_OUT                PAL_LINE(GPIOH, 1U)
+#define LINE_ARD_A0                 PAL_LINE(GPIOA, GPIOA_ARD_A0)
+#define LINE_ADC12_IN5              PAL_LINE(GPIOA, GPIOA_ADC12_IN5)
+#define LINE_ARD_A1                 PAL_LINE(GPIOA, GPIOA_ARD_A1)
+#define LINE_ADC12_IN6              PAL_LINE(GPIOA, GPIOA_ADC12_IN6)
+#define LINE_ARD_D1                 PAL_LINE(GPIOA, GPIOA_ARD_D1)
+#define LINE_USART2_TX              PAL_LINE(GPIOA, GPIOA_USART2_TX)
+#define LINE_ARD_D0                 PAL_LINE(GPIOA, GPIOA_ARD_D0)
+#define LINE_USART2_RX              PAL_LINE(GPIOA, GPIOA_USART2_RX)
+#define LINE_ARD_A2                 PAL_LINE(GPIOA, GPIOA_ARD_A2)
+#define LINE_ADC12_IN9              PAL_LINE(GPIOA, GPIOA_ADC12_IN9)
+#define LINE_ARD_D13                PAL_LINE(GPIOA, GPIOA_ARD_D13)
+#define LINE_LED_GREEN              PAL_LINE(GPIOA, GPIOA_LED_GREEN)
+#define LINE_ARD_D12                PAL_LINE(GPIOA, GPIOA_ARD_D12)
+#define LINE_ARD_D11                PAL_LINE(GPIOA, GPIOA_ARD_D11)
+#define LINE_ARD_D7                 PAL_LINE(GPIOA, GPIOA_ARD_D7)
+#define LINE_ARD_D8                 PAL_LINE(GPIOA, GPIOA_ARD_D8)
+#define LINE_ARD_D2                 PAL_LINE(GPIOA, GPIOA_ARD_D2)
+#define LINE_SWDIO                  PAL_LINE(GPIOA, GPIOA_SWDIO)
+#define LINE_SWCLK                  PAL_LINE(GPIOA, GPIOA_SWCLK)
+
+#define LINE_ARD_A3                 PAL_LINE(GPIOB, GPIOB_ARD_A3)
+#define LINE_ADC12_IN15             PAL_LINE(GPIOB, GPIOB_ADC12_IN15)
+#define LINE_ARD_D3                 PAL_LINE(GPIOB, GPIOB_ARD_D3)
+#define LINE_SWO                    PAL_LINE(GPIOB, GPIOB_SWO)
+#define LINE_ARD_D5                 PAL_LINE(GPIOB, GPIOB_ARD_D5)
+#define LINE_ARD_D4                 PAL_LINE(GPIOB, GPIOB_ARD_D4)
+#define LINE_ARD_D10                PAL_LINE(GPIOB, GPIOB_ARD_D10)
+#define LINE_ARD_D15                PAL_LINE(GPIOB, GPIOB_ARD_D15)
+#define LINE_ARD_D14                PAL_LINE(GPIOB, GPIOB_ARD_D14)
+#define LINE_ARD_D6                 PAL_LINE(GPIOB, GPIOB_ARD_D6)
+
+#define LINE_ARD_A5                 PAL_LINE(GPIOC, GPIOC_ARD_A5)
+#define LINE_ADC123_IN1             PAL_LINE(GPIOC, GPIOC_ADC123_IN1)
+#define LINE_ARD_A4                 PAL_LINE(GPIOC, GPIOC_ARD_A4)
+#define LINE_ADC123_IN2             PAL_LINE(GPIOC, GPIOC_ADC123_IN2)
+#define LINE_ARD_D9                 PAL_LINE(GPIOC, GPIOC_ARD_D9)
+#define LINE_BUTTON                 PAL_LINE(GPIOC, GPIOC_BUTTON)
+#define LINE_OSC32_IN               PAL_LINE(GPIOC, GPIOC_OSC32_IN)
+#define LINE_OSC32_OUT              PAL_LINE(GPIOC, GPIOC_OSC32_OUT)
+#define LINE_OSC_IN                 PAL_LINE(GPIOH, GPIOH_OSC_IN)
+#define LINE_OSC_OUT                PAL_LINE(GPIOH, GPIOH_OSC_OUT)
 
 /*===========================================================================*/
 /* Driver pre-compile time settings.                                         */
diff --git a/modules/NUCLEO-L476RG/module.c b/modules/NUCLEO-L476RG/module.c
index 611a0e7..ab805f1 100644
--- a/modules/NUCLEO-L476RG/module.c
+++ b/modules/NUCLEO-L476RG/module.c
@@ -72,8 +72,7 @@ I2CConfig moduleHalI2c3Config = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_LED_GREEN,
+  /* line */ LINE_LED_GREEN,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -88,8 +87,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   User button input signal GPIO.
  */
 static apalGpio_t _gpioUserButton = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_BUTTON,
+  /* line */ LINE_BUTTON,
 };
 ROMCONST apalControlGpio_t moduleGpioUserButton = {
   /* GPIO */ &_gpioUserButton,
diff --git a/modules/NUCLEO-L476RG/module.h b/modules/NUCLEO-L476RG/module.h
index 3591958..c38d503 100644
--- a/modules/NUCLEO-L476RG/module.h
+++ b/modules/NUCLEO-L476RG/module.h
@@ -106,7 +106,7 @@ extern ROMCONST apalControlGpio_t moduleGpioUserButton;
 /**
  * @brief   Event flag to be set on a USER_BUTTON interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(GPIOC_BUTTON)
+#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -121,8 +121,8 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* user button */                                                           \
-  palSetPadCallback(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, _intCallback, &moduleGpioUserButton.gpio->pad);  \
-  palEnablePadEvent(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));   \
+  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
+  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
 }
 
 /**
@@ -170,8 +170,8 @@ extern ROMCONST char* moduleShellPrompt;
     moduleHalI2c3Config.timingr |= ((((moduleHalI2c3Config.timingr & I2C_TIMINGR_SDADEL_Msk) >> I2C_TIMINGR_SDADEL_Pos) * 2) + 1) << I2C_TIMINGR_SCLDEL_Pos;  \
     /* now we can start the I2C driver */                                     \
     chSysLock();                                                              \
-    palSetPadMode(GPIOC, GPIOC_ARD_A4, PAL_MODE_ALTERNATE(4));                \
-    palSetPadMode(GPIOC, GPIOC_ARD_A5, PAL_MODE_ALTERNATE(4));                \
+    palSetLineMode(LINE_ARD_A4, PAL_MODE_ALTERNATE(4));                \
+    palSetLineMode(LINE_ARD_A5, PAL_MODE_ALTERNATE(4));                \
     chSysUnlock();                                                            \
     i2cStart(&MODULE_HAL_I2C3, &moduleHalI2c3Config);                         \
   }
diff --git a/modules/PowerManagement_1-1/alldconf.h b/modules/PowerManagement_1-1/alldconf.h
index 9a45185..a40490a 100644
--- a/modules/PowerManagement_1-1/alldconf.h
+++ b/modules/PowerManagement_1-1/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/PowerManagement_1-1/module.c b/modules/PowerManagement_1-1/module.c
index df06e06..4b38320 100644
--- a/modules/PowerManagement_1-1/module.c
+++ b/modules/PowerManagement_1-1/module.c
@@ -124,8 +124,7 @@ SerialConfig moduleHalProgIfConfig = {
  * @brief   SYS_REG_EN output signal GPIO.
  */
 static apalGpio_t _gpioSysRegEn = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_SYS_REG_EN,
+  /* line */ LINE_SYS_REG_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
   /* GPIO */ &_gpioSysRegEn,
@@ -140,8 +139,7 @@ ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
  * @brief   IR_INT1 input signal GPIO.
  */
 static apalGpio_t _gpioIrInt1 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IR_INT1_N,
+  /* line */ LINE_IR_INT1_N,
 };
 ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
   /* GPIO */ &_gpioIrInt1,
@@ -167,8 +165,7 @@ ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
  * @brief   POWER_EN output signal GPIO.
  */
 static apalGpio_t _gpioPowerEn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_POWER_EN,
+  /* line */ LINE_POWER_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioPowerEn = {
   /* GPIO */ &_gpioPowerEn,
@@ -183,8 +180,7 @@ ROMCONST apalControlGpio_t moduleGpioPowerEn = {
  * @brief   SYS_UART_DN bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartDn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_DN,
+  /* line */ LINE_SYS_UART_DN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
   /* GPIO */ &_gpioSysUartDn,
@@ -199,8 +195,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
  * @brief   CHARGE_STAT2A input signal GPIO.
  */
 static apalGpio_t _gpioChargeStat2A = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_CHARGE_STAT2A,
+  /* line */ LINE_CHARGE_STAT2A,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
   /* GPIO */ &_gpioChargeStat2A,
@@ -215,8 +210,7 @@ ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
  * @brief   GAUGE_BATLOW2 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatLow2 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_GAUGE_BATLOW2,
+  /* line */ LINE_GAUGE_BATLOW2,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
   /* GPIO */ &_gpioGaugeBatLow2,
@@ -231,8 +225,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
  * @brief   GAUGE_BATGD2 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatGd2 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_GAUGE_BATGD2_N,
+  /* line */ LINE_GAUGE_BATGD2_N,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
   /* GPIO */ &_gpioGaugeBatGd2,
@@ -247,8 +240,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_LED,
+  /* line */ LINE_LED,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -263,8 +255,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartUp = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_UP,
+  /* line */ LINE_SYS_UART_UP,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
@@ -279,8 +270,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
  * @brief   CHARGE_STAT1A input signal GPIO.
  */
 static apalGpio_t _gpioChargeStat1A = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_CHARGE_STAT1A,
+  /* line */ LINE_CHARGE_STAT1A,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
   /* GPIO */ &_gpioChargeStat1A,
@@ -295,8 +285,7 @@ ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
  * @brief   GAUGE_BATLOW1 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatLow1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_GAUGE_BATLOW1,
+  /* line */ LINE_GAUGE_BATLOW1,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
   /* GPIO */ &_gpioGaugeBatLow1,
@@ -311,8 +300,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
  * @brief   GAUGE_BATGD1 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatGd1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_GAUGE_BATGD1_N,
+  /* line */ LINE_GAUGE_BATGD1_N,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
   /* GPIO */ &_gpioGaugeBatGd1,
@@ -327,8 +315,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
  * @brief   CHARG_EN1 output signal GPIO.
  */
 static apalGpio_t _gpioChargeEn1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_CHARGE_EN1_N,
+  /* line */ LINE_CHARGE_EN1_N,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
   /* GPIO */ &_gpioChargeEn1,
@@ -343,8 +330,7 @@ ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
  * @brief   IR_INT2 input signal GPIO.
  */
 static apalGpio_t _gpioIrInt2 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IR_INT2_N,
+  /* line */ LINE_IR_INT2_N,
 };
 ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
   /* GPIO */ &_gpioIrInt2,
@@ -370,8 +356,7 @@ ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
  * @brief   TOUCH_INT input signal GPIO.
  */
 static apalGpio_t _gpioTouchInt = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_TOUCH_INT_N,
+  /* line */ LINE_TOUCH_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioTouchInt = {
   /* GPIO */ &_gpioTouchInt,
@@ -397,8 +382,7 @@ ROMCONST apalControlGpio_t moduleGpioTouchInt = {
  * @brief   SYS_DONE input signal GPIO.
  */
 static apalGpio_t _gpioSysDone = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_DONE,
+  /* line */ LINE_SYS_DONE,
 };
 ROMCONST apalControlGpio_t moduleGpioSysDone = {
   /* GPIO */ &_gpioSysDone,
@@ -413,8 +397,7 @@ ROMCONST apalControlGpio_t moduleGpioSysDone = {
  * @brief   SYS_PROG output signal GPIO.
  */
 static apalGpio_t _gpioSysProg = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PROG_N,
+  /* line */ LINE_SYS_PROG_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysProg = {
   /* GPIO */ &_gpioSysProg,
@@ -429,8 +412,7 @@ ROMCONST apalControlGpio_t moduleGpioSysProg = {
  * @brief   PATH_DC input signal GPIO.
  */
 static apalGpio_t _gpioPathDc = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_PATH_DC,
+  /* line */ LINE_PATH_DC,
 };
 ROMCONST apalControlGpio_t moduleGpioPathDc = {
   /* GPIO */ &_gpioPathDc,
@@ -445,8 +427,7 @@ ROMCONST apalControlGpio_t moduleGpioPathDc = {
  * @brief   SYS_SPI_DIR bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSpiDir = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_SPI_DIR,
+  /* line */ LINE_SYS_SPI_DIR,
 };
 ROMCONST apalControlGpio_t moduleGpioSysSpiDir = {
   /* GPIO */ &_gpioSysSpiDir,
@@ -461,8 +442,7 @@ ROMCONST apalControlGpio_t moduleGpioSysSpiDir = {
  * @brief   SYS_SYNC bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSync = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_INT_N,
+  /* line */ LINE_SYS_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
@@ -477,8 +457,7 @@ ROMCONST apalControlGpio_t moduleGpioSysSync = {
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysPd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PD_N,
+  /* line */ LINE_SYS_PD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
@@ -493,8 +472,7 @@ ROMCONST apalControlGpio_t moduleGpioSysPd = {
  * @brief   SYS_WARMRST bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysWarmrst = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_WARMRST_N,
+  /* line */ LINE_SYS_WARMRST_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
   /* GPIO */ &_gpioSysWarmrst,
@@ -509,8 +487,7 @@ ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
  * @brief   BT_RST output signal GPIO.
  */
 static apalGpio_t _gpioBtRst = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_BT_RST,
+  /* line */ LINE_BT_RST,
 };
 ROMCONST apalControlGpio_t moduleGpioBtRst = {
   /* GPIO */ &_gpioBtRst,
@@ -525,8 +502,7 @@ ROMCONST apalControlGpio_t moduleGpioBtRst = {
  * @brief   CHARGE_EN2 output signal GPIO.
  */
 static apalGpio_t _gpioChargeEn2 = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_CHARGE_EN2_N,
+  /* line */ LINE_CHARGE_EN2_N,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeEn2 = {
   /* GPIO */ &_gpioChargeEn2,
diff --git a/modules/PowerManagement_1-1/module.h b/modules/PowerManagement_1-1/module.h
index 5474fdc..7bffc82 100644
--- a/modules/PowerManagement_1-1/module.h
+++ b/modules/PowerManagement_1-1/module.h
@@ -317,72 +317,72 @@ extern ROMCONST apalControlGpio_t moduleGpioChargeEn2;
 /**
  * @brief   Event flag to be set on a IR_INT1 / CHARGE_STAT1A interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IRINT1           AOS_IOEVENT_FLAG(GPIOB_IR_INT1_N)
+#define MODULE_OS_IOEVENTFLAGS_IRINT1           AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT1_N))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATLOW1 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW1     AOS_IOEVENT_FLAG(GPIOC_GAUGE_BATLOW1)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW1     AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATLOW1))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATGD1 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD1      AOS_IOEVENT_FLAG(GPIOC_GAUGE_BATGD1_N)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD1      AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATGD1_N))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_DN interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_DN)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_DN))
 
 /**
  * @brief   Event flag to be set on a IR_INT2 / CHARGE_STAT2A interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IRINT2           AOS_IOEVENT_FLAG(GPIOC_IR_INT2_N)
+#define MODULE_OS_IOEVENTFLAGS_IRINT2           AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT2_N))
 
 /**
  * @brief   Event flag to be set on a TOUCH_INT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_TOUCHINT         AOS_IOEVENT_FLAG(GPIOC_TOUCH_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_TOUCHINT         AOS_IOEVENT_FLAG(PAL_PAD(LINE_TOUCH_INT_N))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATLOW2 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW2     AOS_IOEVENT_FLAG(GPIOB_GAUGE_BATLOW2)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW2     AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATLOW2))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATGD2 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD2      AOS_IOEVENT_FLAG(GPIOB_GAUGE_BATGD2_N)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD2      AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATGD2_N))
 
 /**
  * @brief   Event flag to be set on a PATH_DC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_PATHDC           AOS_IOEVENT_FLAG(GPIOC_PATH_DC)
+#define MODULE_OS_IOEVENTFLAGS_PATHDC           AOS_IOEVENT_FLAG(PAL_PAD(LINE_PATH_DC))
 
 /**
  * @brief   Event flag to be set on a SYS_SPI_DIR interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSPIDIR        AOS_IOEVENT_FLAG(GPIOC_SYS_SPI_DIR)
+#define MODULE_OS_IOEVENTFLAGS_SYSSPIDIR        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_SPI_DIR))
 
 /**
  * @brief   Event flag to be set on a SYS_SYNC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(GPIOC_SYS_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
 /**
  * @brief   Event flag to be set on a SYS_PD interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
 
 /**
  * @brief   Event flag to be set on a SYS_WARMRST interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(GPIOC_SYS_WARMRST_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_WARMRST_N))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_UP interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_UP)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -397,35 +397,35 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* IR_INT1 */                                                               \
-  palSetPadCallback(moduleGpioIrInt1.gpio->port, moduleGpioIrInt1.gpio->pad, _intCallback, &moduleGpioIrInt1.gpio->pad); \
-  palEnablePadEvent(moduleGpioIrInt1.gpio->port, moduleGpioIrInt1.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));  \
+  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt1.gpio->line); \
+  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                \
   /* GAUGE_BATLOW2 */                                                         \
-  palSetPadCallback(moduleGpioGaugeBatLow2.gpio->port, moduleGpioGaugeBatLow2.gpio->pad, _intCallback, &moduleGpioGaugeBatLow2.gpio->pad);  \
-  palEnablePadEvent(moduleGpioGaugeBatLow2.gpio->port, moduleGpioGaugeBatLow2.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));   \
+  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow2.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                \
   /* GAUGE_BATGD2 */                                                          \
-  palSetPadCallback(moduleGpioGaugeBatGd2.gpio->port, moduleGpioGaugeBatGd2.gpio->pad, _intCallback, &moduleGpioGaugeBatGd2.gpio->pad); \
-  palEnablePadEvent(moduleGpioGaugeBatGd2.gpio->port, moduleGpioGaugeBatGd2.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));  \
+  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd2.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                \
   /* GAUGE_BATLOW1 */                                                         \
-  palSetPadCallback(moduleGpioGaugeBatLow1.gpio->port, moduleGpioGaugeBatLow1.gpio->pad, _intCallback, &moduleGpioGaugeBatLow1.gpio->pad);  \
-  palEnablePadEvent(moduleGpioGaugeBatLow1.gpio->port, moduleGpioGaugeBatLow1.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));   \
+  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow1.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                \
   /* GAUGE_BATGD1 */                                                          \
-  palSetPadCallback(moduleGpioGaugeBatGd1.gpio->port, moduleGpioGaugeBatGd1.gpio->pad, _intCallback, &moduleGpioGaugeBatGd1.gpio->pad); \
-  palEnablePadEvent(moduleGpioGaugeBatGd1.gpio->port, moduleGpioGaugeBatGd1.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));  \
+  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd1.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                \
   /* IR_INT2 */                                                               \
-  palSetPadCallback(moduleGpioIrInt2.gpio->port, moduleGpioIrInt2.gpio->pad, _intCallback, &moduleGpioIrInt2.gpio->pad); \
-  palEnablePadEvent(moduleGpioIrInt2.gpio->port, moduleGpioIrInt2.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));  \
+  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt2.gpio->line); \
+  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                \
   /* TOUCH_INT */                                                             \
-  palSetPadCallback(moduleGpioTouchInt.gpio->port, moduleGpioTouchInt.gpio->pad, _intCallback, &moduleGpioTouchInt.gpio->pad); \
-  palEnablePadEvent(moduleGpioTouchInt.gpio->port, moduleGpioTouchInt.gpio->pad, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));  \
+  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioTouchInt.gpio->line); \
+  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                \
   /* PATH_DC */                                                               \
-  palSetPadCallback(moduleGpioPathDc.gpio->port, moduleGpioPathDc.gpio->pad, _intCallback, &moduleGpioPathDc.gpio->pad);  \
-  palEnablePadEvent(moduleGpioPathDc.gpio->port, moduleGpioPathDc.gpio->pad, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));   \
+  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDc.gpio->line); \
+  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                \
   /* SYS_SPI_DIR */                                                           \
-  palSetPadCallback(moduleGpioSysSpiDir.gpio->port, moduleGpioSysSpiDir.gpio->pad, _intCallback, &moduleGpioSysSpiDir.gpio->pad); \
-  palEnablePadEvent(moduleGpioSysSpiDir.gpio->port, moduleGpioSysSpiDir.gpio->pad, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));  \
+  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysSpiDir.gpio->line); \
+  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                \
   /* SYS_WARMRST */                                                           \
-  palSetPadCallback(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, _intCallback, &moduleGpioSysWarmrst.gpio->pad);  \
-  palEnablePadEvent(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));   \
+  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
+  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
 }
 
 /**
diff --git a/modules/PowerManagement_1-2/alldconf.h b/modules/PowerManagement_1-2/alldconf.h
index c4fc2d4..7a8f4b1 100644
--- a/modules/PowerManagement_1-2/alldconf.h
+++ b/modules/PowerManagement_1-2/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/PowerManagement_1-2/module.c b/modules/PowerManagement_1-2/module.c
index ecb8758..b7c3ec6 100644
--- a/modules/PowerManagement_1-2/module.c
+++ b/modules/PowerManagement_1-2/module.c
@@ -124,8 +124,7 @@ SerialConfig moduleHalProgIfConfig = {
  * @brief   SWITCH_STATUS input signal GPIO.
  */
 static apalGpio_t _gpioSwitchStatus = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_SWITCH_STATUS_N,
+  /* line */ LINE_SWITCH_STATUS_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSwitchStatus = {
   /* GPIO */ &_gpioSwitchStatus,
@@ -140,8 +139,7 @@ ROMCONST apalControlGpio_t moduleGpioSwitchStatus = {
  * @brief   SYS_REG_EN output signal GPIO.
  */
 static apalGpio_t _gpioSysRegEn = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_SYS_REG_EN,
+  /* line */ LINE_SYS_REG_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
   /* GPIO */ &_gpioSysRegEn,
@@ -156,8 +154,7 @@ ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
  * @brief   IR_INT1 input signal GPIO.
  */
 static apalGpio_t _gpioIrInt1 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_IR_INT1_N,
+  /* line */ LINE_IR_INT1_N,
 };
 ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
   /* GPIO */ &_gpioIrInt1,
@@ -183,8 +180,7 @@ ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
  * @brief   POWER_EN output signal GPIO.
  */
 static apalGpio_t _gpioPowerEn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_POWER_EN,
+  /* line */ LINE_POWER_EN,
 };
 ROMCONST apalControlGpio_t moduleGpioPowerEn = {
   /* GPIO */ &_gpioPowerEn,
@@ -199,8 +195,7 @@ ROMCONST apalControlGpio_t moduleGpioPowerEn = {
  * @brief   SYS_UART_DN bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartDn = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_DN,
+  /* line */ LINE_SYS_UART_DN,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
   /* GPIO */ &_gpioSysUartDn,
@@ -215,8 +210,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
  * @brief   CHARGE_STAT2A input signal GPIO.
  */
 static apalGpio_t _gpioChargeStat2A = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_CHARGE_STAT2A,
+  /* line */ LINE_CHARGE_STAT2A,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
   /* GPIO */ &_gpioChargeStat2A,
@@ -231,8 +225,7 @@ ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
  * @brief   GAUGE_BATLOW2 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatLow2 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_GAUGE_BATLOW2,
+  /* line */ LINE_GAUGE_BATLOW2,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
   /* GPIO */ &_gpioGaugeBatLow2,
@@ -247,8 +240,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
  * @brief   GAUGE_BATGD2 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatGd2 = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_GAUGE_BATGD2_N,
+  /* line */ LINE_GAUGE_BATGD2_N,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
   /* GPIO */ &_gpioGaugeBatGd2,
@@ -263,8 +255,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
  * @brief   LED output signal GPIO.
  */
 static apalGpio_t _gpioLed = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_LED,
+  /* line */ LINE_LED,
 };
 ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
@@ -279,8 +270,7 @@ ROMCONST apalControlGpio_t moduleGpioLed = {
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysUartUp = {
-  /* port */ GPIOB,
-  /* pad  */ GPIOB_SYS_UART_UP,
+  /* line */ LINE_SYS_UART_UP,
 };
 ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
@@ -295,8 +285,7 @@ ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
  * @brief   CHARGE_STAT1A input signal GPIO.
  */
 static apalGpio_t _gpioChargeStat1A = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_CHARGE_STAT1A,
+  /* line */ LINE_CHARGE_STAT1A,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
   /* GPIO */ &_gpioChargeStat1A,
@@ -311,8 +300,7 @@ ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
  * @brief   GAUGE_BATLOW1 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatLow1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_GAUGE_BATLOW1,
+  /* line */ LINE_GAUGE_BATLOW1,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
   /* GPIO */ &_gpioGaugeBatLow1,
@@ -327,8 +315,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
  * @brief   GAUGE_BATGD1 input signal GPIO.
  */
 static apalGpio_t _gpioGaugeBatGd1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_GAUGE_BATGD1_N,
+  /* line */ LINE_GAUGE_BATGD1_N,
 };
 ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
   /* GPIO */ &_gpioGaugeBatGd1,
@@ -343,8 +330,7 @@ ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
  * @brief   CHARG_EN1 output signal GPIO.
  */
 static apalGpio_t _gpioChargeEn1 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_CHARGE_EN1_N,
+  /* line */ LINE_CHARGE_EN1_N,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
   /* GPIO */ &_gpioChargeEn1,
@@ -359,8 +345,7 @@ ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
  * @brief   IR_INT2 input signal GPIO.
  */
 static apalGpio_t _gpioIrInt2 = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_IR_INT2_N,
+  /* line */ LINE_IR_INT2_N,
 };
 ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
   /* GPIO */ &_gpioIrInt2,
@@ -386,8 +371,7 @@ ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
  * @brief   TOUCH_INT input signal GPIO.
  */
 static apalGpio_t _gpioTouchInt = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_TOUCH_INT_N,
+  /* line */ LINE_TOUCH_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioTouchInt = {
   /* GPIO */ &_gpioTouchInt,
@@ -413,8 +397,7 @@ ROMCONST apalControlGpio_t moduleGpioTouchInt = {
  * @brief   SYS_DONE input signal GPIO.
  */
 static apalGpio_t _gpioSysDone = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_DONE,
+  /* line */ LINE_SYS_DONE,
 };
 ROMCONST apalControlGpio_t moduleGpioSysDone = {
   /* GPIO */ &_gpioSysDone,
@@ -429,8 +412,7 @@ ROMCONST apalControlGpio_t moduleGpioSysDone = {
  * @brief   SYS_PROG output signal GPIO.
  */
 static apalGpio_t _gpioSysProg = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PROG_N,
+  /* line */ LINE_SYS_PROG_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysProg = {
   /* GPIO */ &_gpioSysProg,
@@ -445,8 +427,7 @@ ROMCONST apalControlGpio_t moduleGpioSysProg = {
  * @brief   PATH_DC input signal GPIO.
  */
 static apalGpio_t _gpioPathDc = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_PATH_DC,
+  /* line */ LINE_PATH_DC,
 };
 ROMCONST apalControlGpio_t moduleGpioPathDc = {
   /* GPIO */ &_gpioPathDc,
@@ -461,8 +442,7 @@ ROMCONST apalControlGpio_t moduleGpioPathDc = {
  * @brief   SYS_SPI_DIR bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSpiDir = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_SPI_DIR,
+  /* line */ LINE_SYS_SPI_DIR,
 };
 ROMCONST apalControlGpio_t moduleGpioSysSpiDir = {
   /* GPIO */ &_gpioSysSpiDir,
@@ -477,8 +457,7 @@ ROMCONST apalControlGpio_t moduleGpioSysSpiDir = {
  * @brief   SYS_SYNC bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysSync = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_INT_N,
+  /* line */ LINE_SYS_INT_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
@@ -493,8 +472,7 @@ ROMCONST apalControlGpio_t moduleGpioSysSync = {
  * @brief   SYS_PD bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysPd = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_PD_N,
+  /* line */ LINE_SYS_PD_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
@@ -509,8 +487,7 @@ ROMCONST apalControlGpio_t moduleGpioSysPd = {
  * @brief   SYS_WARMRST bidirectional signal GPIO.
  */
 static apalGpio_t _gpioSysWarmrst = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_SYS_WARMRST_N,
+  /* line */ LINE_SYS_WARMRST_N,
 };
 ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
   /* GPIO */ &_gpioSysWarmrst,
@@ -525,8 +502,7 @@ ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
  * @brief   BT_RST output signal GPIO.
  */
 static apalGpio_t _gpioBtRst = {
-  /* port */ GPIOC,
-  /* pad  */ GPIOC_BT_RST,
+  /* line */ LINE_BT_RST,
 };
 ROMCONST apalControlGpio_t moduleGpioBtRst = {
   /* GPIO */ &_gpioBtRst,
@@ -541,8 +517,7 @@ ROMCONST apalControlGpio_t moduleGpioBtRst = {
  * @brief   CHARGE_EN2 output signal GPIO.
  */
 static apalGpio_t _gpioChargeEn2 = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_CHARGE_EN2_N,
+  /* line */ LINE_CHARGE_EN2_N,
 };
 ROMCONST apalControlGpio_t moduleGpioChargeEn2 = {
   /* GPIO */ &_gpioChargeEn2,
diff --git a/modules/PowerManagement_1-2/module.h b/modules/PowerManagement_1-2/module.h
index c5589bd..468e72f 100644
--- a/modules/PowerManagement_1-2/module.h
+++ b/modules/PowerManagement_1-2/module.h
@@ -322,72 +322,72 @@ extern ROMCONST apalControlGpio_t moduleGpioChargeEn2;
 /**
  * @brief   Event flag to be set on a IR_INT1 / CHARGE_STAT1A interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IRINT1           AOS_IOEVENT_FLAG(GPIOB_IR_INT1_N)
+#define MODULE_OS_IOEVENTFLAGS_IRINT1           AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT1_N))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATLOW1 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW1     AOS_IOEVENT_FLAG(GPIOC_GAUGE_BATLOW1)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW1     AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATLOW1))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATGD1 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD1      AOS_IOEVENT_FLAG(GPIOC_GAUGE_BATGD1_N)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD1      AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATGD1_N))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_DN interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_DN)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_DN))
 
 /**
  * @brief   Event flag to be set on a IR_INT2 / CHARGE_STAT2A interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_IRINT2           AOS_IOEVENT_FLAG(GPIOC_IR_INT2_N)
+#define MODULE_OS_IOEVENTFLAGS_IRINT2           AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT2_N))
 
 /**
  * @brief   Event flag to be set on a TOUCH_INT interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_TOUCHINT         AOS_IOEVENT_FLAG(GPIOC_TOUCH_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_TOUCHINT         AOS_IOEVENT_FLAG(PAL_PAD(LINE_TOUCH_INT_N))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATLOW2 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW2     AOS_IOEVENT_FLAG(GPIOB_GAUGE_BATLOW2)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW2     AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATLOW2))
 
 /**
  * @brief   Event flag to be set on a GAUGE_BATGD2 interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD2      AOS_IOEVENT_FLAG(GPIOB_GAUGE_BATGD2_N)
+#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD2      AOS_IOEVENT_FLAG(PAL_PAD(LINE_GAUGE_BATGD2_N))
 
 /**
  * @brief   Event flag to be set on a PATH_DC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_PATHDC           AOS_IOEVENT_FLAG(GPIOC_PATH_DC)
+#define MODULE_OS_IOEVENTFLAGS_PATHDC           AOS_IOEVENT_FLAG(PAL_PAD(LINE_PATH_DC))
 
 /**
  * @brief   Event flag to be set on a SYS_SPI_DIR interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSPIDIR        AOS_IOEVENT_FLAG(GPIOC_SYS_SPI_DIR)
+#define MODULE_OS_IOEVENTFLAGS_SYSSPIDIR        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_SPI_DIR))
 
 /**
  * @brief   Event flag to be set on a SYS_SYNC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(GPIOC_SYS_INT_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSSYNC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
 /**
  * @brief   Event flag to be set on a SYS_PD interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSPD            AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
 
 /**
  * @brief   Event flag to be set on a SYS_WARMRST interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(GPIOC_SYS_WARMRST_N)
+#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST       AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_WARMRST_N))
 
 /**
  * @brief   Event flag to be set on a SYS_UART_UP interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(GPIOB_SYS_UART_UP)
+#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -402,35 +402,35 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* IR_INT1 */                                                               \
-  palSetPadCallback(moduleGpioIrInt1.gpio->port, moduleGpioIrInt1.gpio->pad, _intCallback, &moduleGpioIrInt1.gpio->pad); \
-  palEnablePadEvent(moduleGpioIrInt1.gpio->port, moduleGpioIrInt1.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));  \
+  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt1.gpio->line); \
+  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                \
   /* GAUGE_BATLOW2 */                                                         \
-  palSetPadCallback(moduleGpioGaugeBatLow2.gpio->port, moduleGpioGaugeBatLow2.gpio->pad, _intCallback, &moduleGpioGaugeBatLow2.gpio->pad);  \
-  palEnablePadEvent(moduleGpioGaugeBatLow2.gpio->port, moduleGpioGaugeBatLow2.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));   \
+  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow2.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                \
   /* GAUGE_BATGD2 */                                                          \
-  palSetPadCallback(moduleGpioGaugeBatGd2.gpio->port, moduleGpioGaugeBatGd2.gpio->pad, _intCallback, &moduleGpioGaugeBatGd2.gpio->pad); \
-  palEnablePadEvent(moduleGpioGaugeBatGd2.gpio->port, moduleGpioGaugeBatGd2.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));  \
+  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd2.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                \
   /* GAUGE_BATLOW1 */                                                         \
-  palSetPadCallback(moduleGpioGaugeBatLow1.gpio->port, moduleGpioGaugeBatLow1.gpio->pad, _intCallback, &moduleGpioGaugeBatLow1.gpio->pad);  \
-  palEnablePadEvent(moduleGpioGaugeBatLow1.gpio->port, moduleGpioGaugeBatLow1.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));   \
+  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow1.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                \
   /* GAUGE_BATGD1 */                                                          \
-  palSetPadCallback(moduleGpioGaugeBatGd1.gpio->port, moduleGpioGaugeBatGd1.gpio->pad, _intCallback, &moduleGpioGaugeBatGd1.gpio->pad); \
-  palEnablePadEvent(moduleGpioGaugeBatGd1.gpio->port, moduleGpioGaugeBatGd1.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));  \
+  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd1.gpio->line); \
+  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                \
   /* IR_INT2 */                                                               \
-  palSetPadCallback(moduleGpioIrInt2.gpio->port, moduleGpioIrInt2.gpio->pad, _intCallback, &moduleGpioIrInt2.gpio->pad); \
-  palEnablePadEvent(moduleGpioIrInt2.gpio->port, moduleGpioIrInt2.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));  \
+  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt2.gpio->line); \
+  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                \
   /* TOUCH_INT */                                                             \
-  palSetPadCallback(moduleGpioTouchInt.gpio->port, moduleGpioTouchInt.gpio->pad, _intCallback, &moduleGpioTouchInt.gpio->pad); \
-  palEnablePadEvent(moduleGpioTouchInt.gpio->port, moduleGpioTouchInt.gpio->pad, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));  \
+  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioTouchInt.gpio->line); \
+  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                \
   /* PATH_DC */                                                               \
-  palSetPadCallback(moduleGpioPathDc.gpio->port, moduleGpioPathDc.gpio->pad, _intCallback, &moduleGpioPathDc.gpio->pad);  \
-  palEnablePadEvent(moduleGpioPathDc.gpio->port, moduleGpioPathDc.gpio->pad, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));   \
+  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDc.gpio->line); \
+  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                \
   /* SYS_SPI_DIR */                                                           \
-  palSetPadCallback(moduleGpioSysSpiDir.gpio->port, moduleGpioSysSpiDir.gpio->pad, _intCallback, &moduleGpioSysSpiDir.gpio->pad); \
-  palEnablePadEvent(moduleGpioSysSpiDir.gpio->port, moduleGpioSysSpiDir.gpio->pad, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));  \
+  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysSpiDir.gpio->line); \
+  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                \
   /* SYS_WARMRST */                                                           \
-  palSetPadCallback(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, _intCallback, &moduleGpioSysWarmrst.gpio->pad);  \
-  palEnablePadEvent(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));   \
+  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
+  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
 }
 
 /**
diff --git a/modules/STM32F407G-DISC1/alldconf.h b/modules/STM32F407G-DISC1/alldconf.h
index 41643df..157777c 100644
--- a/modules/STM32F407G-DISC1/alldconf.h
+++ b/modules/STM32F407G-DISC1/alldconf.h
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #define _AMIRO_LLD_CFG_
 #define AMIRO_LLD_CFG_VERSION_MAJOR             1
-#define AMIRO_LLD_CFG_VERSION_MINOR             0
+#define AMIRO_LLD_CFG_VERSION_MINOR             1
 
 /**
  * @brief   Width of the apalTime_t data type.
diff --git a/modules/STM32F407G-DISC1/board.h b/modules/STM32F407G-DISC1/board.h
index 6caaecb..bf5d76e 100644
--- a/modules/STM32F407G-DISC1/board.h
+++ b/modules/STM32F407G-DISC1/board.h
@@ -215,37 +215,42 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * IO lines assignments.
  */
-#define LINE_BUTTON                 PAL_LINE(GPIOA, 0U)
-#define LINE_LRCK                   PAL_LINE(GPIOA, 4U)
-#define LINE_SPC                    PAL_LINE(GPIOA, 5U)
-#define LINE_SDO                    PAL_LINE(GPIOA, 6U)
-#define LINE_SDI                    PAL_LINE(GPIOA, 7U)
-#define LINE_VBUS_FS                PAL_LINE(GPIOA, 9U)
-#define LINE_OTG_FS_ID              PAL_LINE(GPIOA, 10U)
-#define LINE_OTG_FS_DM              PAL_LINE(GPIOA, 11U)
-#define LINE_OTG_FS_DP              PAL_LINE(GPIOA, 12U)
-#define LINE_SWDIO                  PAL_LINE(GPIOA, 13U)
-#define LINE_SWCLK                  PAL_LINE(GPIOA, 14U)
-#define LINE_SWO                    PAL_LINE(GPIOB, 3U)
-#define LINE_SCL                    PAL_LINE(GPIOB, 6U)
-#define LINE_SDA                    PAL_LINE(GPIOB, 9U)
-#define LINE_CLK_IN                 PAL_LINE(GPIOB, 10U)
-#define LINE_OTG_FS_POWER_ON        PAL_LINE(GPIOC, 0U)
-#define LINE_PDM_OUT                PAL_LINE(GPIOC, 3U)
-#define LINE_MCLK                   PAL_LINE(GPIOC, 7U)
-#define LINE_SCLK                   PAL_LINE(GPIOC, 10U)
-#define LINE_SDIN                   PAL_LINE(GPIOC, 12U)
-#define LINE_RESET                  PAL_LINE(GPIOD, 4U)
-#define LINE_OVER_CURRENT           PAL_LINE(GPIOD, 5U)
-#define LINE_LED4                   PAL_LINE(GPIOD, 12U)
-#define LINE_LED3                   PAL_LINE(GPIOD, 13U)
-#define LINE_LED5                   PAL_LINE(GPIOD, 14U)
-#define LINE_LED6                   PAL_LINE(GPIOD, 15U)
-#define LINE_INT1                   PAL_LINE(GPIOE, 0U)
-#define LINE_INT2                   PAL_LINE(GPIOE, 1U)
-#define LINE_CS_SPI                 PAL_LINE(GPIOE, 3U)
-#define LINE_OSC_IN                 PAL_LINE(GPIOH, 0U)
-#define LINE_OSC_OUT                PAL_LINE(GPIOH, 1U)
+#define LINE_BUTTON                 PAL_LINE(GPIOA, GPIOA_BUTTON)
+#define LINE_LRCK                   PAL_LINE(GPIOA, GPIOA_LRCK)
+#define LINE_SPC                    PAL_LINE(GPIOA, GPIOA_SPC)
+#define LINE_SDO                    PAL_LINE(GPIOA, GPIOA_SDO)
+#define LINE_SDI                    PAL_LINE(GPIOA, GPIOA_SDI)
+#define LINE_VBUS_FS                PAL_LINE(GPIOA, GPIOA_VBUS_FS)
+#define LINE_OTG_FS_ID              PAL_LINE(GPIOA, GPIOA_OTG_FS_ID)
+#define LINE_OTG_FS_DM              PAL_LINE(GPIOA, GPIOA_FS_DM)
+#define LINE_OTG_FS_DP              PAL_LINE(GPIOA, GPIOA_FS_DP)
+#define LINE_SWDIO                  PAL_LINE(GPIOA, GPIOA_SWDIO)
+#define LINE_SWCLK                  PAL_LINE(GPIOA, GPIOA_SWCLK)
+
+#define LINE_SWO                    PAL_LINE(GPIOB, GPIOB_SWO)
+#define LINE_SCL                    PAL_LINE(GPIOB, GPIOA_SCL)
+#define LINE_SDA                    PAL_LINE(GPIOB, GPIOA_SDA)
+#define LINE_CLK_IN                 PAL_LINE(GPIOB, GPIOA_CLK_IN)
+
+#define LINE_OTG_FS_POWER_ON        PAL_LINE(GPIOC, GPIOC_OTG_FS_POWER_ON)
+#define LINE_PDM_OUT                PAL_LINE(GPIOC, GPIOC_PDM_OUT)
+#define LINE_MCLK                   PAL_LINE(GPIOC, GPIOC_MCLK)
+#define LINE_SCLK                   PAL_LINE(GPIOC, GPIOC_SCLK)
+#define LINE_SDIN                   PAL_LINE(GPIOC, GPIOC_SDIN)
+
+#define LINE_RESET                  PAL_LINE(GPIOD, GPIOD_RESET)
+#define LINE_OVER_CURRENT           PAL_LINE(GPIOD, GPIOD_OVER_CURRENT)
+#define LINE_LED4                   PAL_LINE(GPIOD, GPIOD_LED4)
+#define LINE_LED3                   PAL_LINE(GPIOD, GPIOD_LED3)
+#define LINE_LED5                   PAL_LINE(GPIOD, GPIOD_LED5)
+#define LINE_LED6                   PAL_LINE(GPIOD, GPIOD_LED6)
+
+#define LINE_INT1                   PAL_LINE(GPIOE, GPIOE_INT1)
+#define LINE_INT2                   PAL_LINE(GPIOE, GPIOE_INT2)
+#define LINE_CS_SPI                 PAL_LINE(GPIOE, GPIOE_VS_SPI)
+
+#define LINE_OSC_IN                 PAL_LINE(GPIOH, GPIOH_OSC_IN)
+#define LINE_OSC_OUT                PAL_LINE(GPIOH, GPIOE_OSC_OUT)
 
 /*===========================================================================*/
 /* Driver pre-compile time settings.                                         */
diff --git a/modules/STM32F407G-DISC1/module.c b/modules/STM32F407G-DISC1/module.c
index a53ac6e..244b961 100644
--- a/modules/STM32F407G-DISC1/module.c
+++ b/modules/STM32F407G-DISC1/module.c
@@ -62,8 +62,7 @@ SerialConfig moduleHalProgIfConfig = {
  * @brief   Red LED output signal GPIO.
  */
 static apalGpio_t _gpioLedRed = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_LED5,
+  /* line */ LINE_LED5,
 };
 ROMCONST apalControlGpio_t moduleGpioLedRed = {
   /* GPIO */ &_gpioLedRed,
@@ -78,8 +77,7 @@ ROMCONST apalControlGpio_t moduleGpioLedRed = {
  * @brief   Green LED output signal GPIO.
  */
 static apalGpio_t _gpioLedGreen = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_LED4,
+  /* line */ LINE_LED4,
 };
 ROMCONST apalControlGpio_t moduleGpioLedGreen = {
   /* GPIO */ &_gpioLedGreen,
@@ -94,8 +92,7 @@ ROMCONST apalControlGpio_t moduleGpioLedGreen = {
  * @brief   Blue LED output signal GPIO.
  */
 static apalGpio_t _gpioLedBlue = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_LED6,
+  /* line */ LINE_LED6,
 };
 ROMCONST apalControlGpio_t moduleGpioLedBlue = {
   /* GPIO */ &_gpioLedBlue,
@@ -110,8 +107,7 @@ ROMCONST apalControlGpio_t moduleGpioLedBlue = {
  * @brief   Orange LED output signal GPIO.
  */
 static apalGpio_t _gpioLedOrange = {
-  /* port */ GPIOD,
-  /* pad  */ GPIOD_LED3,
+  /* line */ LINE_LED3,
 };
 ROMCONST apalControlGpio_t moduleGpioLedOrange = {
   /* GPIO */ &_gpioLedOrange,
@@ -126,8 +122,7 @@ ROMCONST apalControlGpio_t moduleGpioLedOrange = {
  * @brief   User button input signal GPIO.
  */
 static apalGpio_t _gpioUserButton = {
-  /* port */ GPIOA,
-  /* pad  */ GPIOA_BUTTON,
+  /* line */ LINE_BUTTON,
 };
 ROMCONST apalControlGpio_t moduleGpioUserButton = {
   /* GPIO */ &_gpioUserButton,
diff --git a/modules/STM32F407G-DISC1/module.h b/modules/STM32F407G-DISC1/module.h
index 1d1c676..3092959 100644
--- a/modules/STM32F407G-DISC1/module.h
+++ b/modules/STM32F407G-DISC1/module.h
@@ -133,7 +133,7 @@ extern ROMCONST apalControlGpio_t moduleGpioUserButton;
 /**
  * @brief   Event flag to be set on a USER_BUTTON interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(GPIOA_BUTTON)
+#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
 /**
@@ -148,8 +148,8 @@ extern ROMCONST char* moduleShellPrompt;
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* user button */                                                           \
-  palSetPadCallback(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, _intCallback, &moduleGpioUserButton.gpio->pad);  \
-  palEnablePadEvent(moduleGpioUserButton.gpio->port, moduleGpioUserButton.gpio->pad, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));   \
+  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
+  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
 }
 
 /**
diff --git a/periphery-lld/AMiRo-LLD b/periphery-lld/AMiRo-LLD
index 78cc79d..7021191 160000
--- a/periphery-lld/AMiRo-LLD
+++ b/periphery-lld/AMiRo-LLD
@@ -1 +1 @@
-Subproject commit 78cc79d4e470ffbd441c47a8835c138718996c85
+Subproject commit 7021191ecfc8747358c1ea4b331b95ceb8908716
diff --git a/periphery-lld/periphAL.h b/periphery-lld/periphAL.h
index 6e43017..18c9f0f 100644
--- a/periphery-lld/periphAL.h
+++ b/periphery-lld/periphAL.h
@@ -35,7 +35,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * @brief   The periphery abstraction layer interface minor version.
  * @note    A higher minor version implies new functionalty, but all old interfaces are still available.
  */
-#define PERIPHAL_VERSION_MINOR    0
+#define PERIPHAL_VERSION_MINOR    1
 
 /*============================================================================*/
 /* DEPENDENCIES                                                               */
@@ -107,8 +107,7 @@ static inline void usleep(apalTime_t us)
  * @brief GPIO driver type.
  */
 struct apalGpio_t {
-  ioportid_t port;
-  iopadid_t pad;
+  ioline_t line;
 } PACKED_VAR;
 
 /**
@@ -124,7 +123,7 @@ static inline apalExitStatus_t apalGpioRead(apalGpio_t* gpio, apalGpioState_t* c
   apalDbgAssert(gpio != NULL);
   apalDbgAssert(val != NULL);
 
-  *val = (palReadPad(gpio->port, gpio->pad) == PAL_HIGH) ? APAL_GPIO_HIGH : APAL_GPIO_LOW;
+  *val = (palReadLine(gpio->line) == PAL_HIGH) ? APAL_GPIO_HIGH : APAL_GPIO_LOW;
   return APAL_STATUS_OK;
 }
 
@@ -140,9 +139,9 @@ static inline apalExitStatus_t apalGpioWrite(apalGpio_t* gpio, const apalGpioSta
 {
   apalDbgAssert(gpio != NULL);
 
-  // palWritePad() is not guaranteed to be atomic, thus the scheduler is locked.
+  // palWriteLine() is not guaranteed to be atomic, thus the scheduler is locked.
   syssts_t sysstatus = chSysGetStatusAndLockX();
-  palWritePad(gpio->port, gpio->pad, (val == APAL_GPIO_HIGH) ? PAL_HIGH : PAL_LOW);
+  palWriteLine(gpio->line, (val == APAL_GPIO_HIGH) ? PAL_HIGH : PAL_LOW);
   chSysRestoreStatusX(sysstatus);
   return APAL_STATUS_OK;
 }
@@ -158,9 +157,9 @@ static inline apalExitStatus_t apalGpioToggle(apalGpio_t* gpio)
 {
   apalDbgAssert(gpio != NULL);
 
-  // palWritePad() is not guaranteed to be atomic, thus the scheduler is locked.
+  // palWriteLine() is not guaranteed to be atomic, thus the scheduler is locked.
   syssts_t sysstatus = chSysGetStatusAndLockX();
-  palWritePad(gpio->port, gpio->pad, (palReadPad(gpio->port, gpio->pad) == PAL_HIGH) ? PAL_LOW : PAL_HIGH);
+  palWriteLine(gpio->line, (palReadLine(gpio->line) == PAL_HIGH) ? PAL_LOW : PAL_HIGH);
   chSysRestoreStatusX(sysstatus);
   return APAL_STATUS_OK;
 }
@@ -179,7 +178,7 @@ static inline apalExitStatus_t apalControlGpioGet(const apalControlGpio_t* const
   apalDbgAssert(cgpio->gpio != NULL);
   apalDbgAssert(val != NULL);
 
-  *val = ((palReadPad(cgpio->gpio->port, cgpio->gpio->pad) == PAL_HIGH) ^ (cgpio->meta.active == APAL_GPIO_ACTIVE_HIGH)) ? APAL_GPIO_OFF : APAL_GPIO_ON;
+  *val = ((palReadLine(cgpio->gpio->line) == PAL_HIGH) ^ (cgpio->meta.active == APAL_GPIO_ACTIVE_HIGH)) ? APAL_GPIO_OFF : APAL_GPIO_ON;
   return APAL_STATUS_OK;
 }
 
@@ -197,9 +196,9 @@ static inline apalExitStatus_t apalControlGpioSet(const apalControlGpio_t* const
   apalDbgAssert(cgpio->gpio != NULL);
   apalDbgAssert(cgpio->meta.direction == APAL_GPIO_DIRECTION_OUTPUT || cgpio->meta.direction == APAL_GPIO_DIRECTION_BIDIRECTIONAL);
 
-  // palWritePad() is not guaranteed to be atomic, thus the scheduler is locked.
+  // palWriteLine() is not guaranteed to be atomic, thus the scheduler is locked.
   syssts_t sysstatus = chSysGetStatusAndLockX();
-  palWritePad(cgpio->gpio->port, cgpio->gpio->pad, ((cgpio->meta.active == APAL_GPIO_ACTIVE_HIGH) ^ (val == APAL_GPIO_ON)) ? PAL_LOW : PAL_HIGH);
+  palWriteLine(cgpio->gpio->line, ((cgpio->meta.active == APAL_GPIO_ACTIVE_HIGH) ^ (val == APAL_GPIO_ON)) ? PAL_LOW : PAL_HIGH);
   chSysRestoreStatusX(sysstatus);
   return APAL_STATUS_OK;
 }
@@ -600,7 +599,7 @@ static inline apalExitStatus_t apalSPITransmit(apalSPIDriver_t* spid, const uint
 }
 
 /**
- * @brief Transmit data to SPI and receive data afterwards without releasing the bus in between
+ * @brief Transmit data to SPI and receive data afterwards without releasing the bus in between.
  *
  * @param   spid        The SPI driver to use.
  * @param   txData      Transmit data buffer.
diff --git a/unittests/periphery-lld/src/ut_alld_DW1000_v1.c b/unittests/periphery-lld/src/ut_alld_DW1000_v1.c
index c5cc995..2600a7a 100755
--- a/unittests/periphery-lld/src/ut_alld_DW1000_v1.c
+++ b/unittests/periphery-lld/src/ut_alld_DW1000_v1.c
@@ -111,13 +111,13 @@ void clear_SPI_chip_select(void){
 void reset_DW1000(void){
 
   // Set the pin as output
-  palSetPadMode(moduleGpioDw1000Reset.gpio->port, moduleGpioDw1000Reset.gpio->pad, APAL_GPIO_DIRECTION_OUTPUT);
+  palSetLineMode(moduleGpioDw1000Reset.gpio->line, APAL_GPIO_DIRECTION_OUTPUT);
 
   //drive the RSTn pin low
   apalGpioWrite(moduleGpioDw1000Reset.gpio, APAL_GPIO_LOW);
 
   //put the pin back to tri-state ... as input
-//  palSetPadMode(moduleGpioDw1000Reset.gpio->port, moduleGpioDw1000Reset.gpio->pad, APAL_GPIO_DIRECTION_INPUT); // TODO:
+//  palSetLineMode(moduleGpioDw1000Reset.gpio->line, APAL_GPIO_DIRECTION_INPUT); // TODO:
 
   aosThdMSleep(2);
 }
diff --git a/unittests/periphery-lld/src/ut_alld_TLC5947_v1.c b/unittests/periphery-lld/src/ut_alld_TLC5947_v1.c
index 204bbe9..e303d45 100644
--- a/unittests/periphery-lld/src/ut_alld_TLC5947_v1.c
+++ b/unittests/periphery-lld/src/ut_alld_TLC5947_v1.c
@@ -101,7 +101,7 @@ aos_utresult_t utAlldTlc5947Func(BaseSequentialStream *stream, aos_unittest_t *u
     status |= tlc5947_lld_update((TLC5947Driver*)ut->data);
     aosThdMSleep(100);
   }
-  if (status == APAL_STATUS_OK) {
+  if (status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) {
     aosUtPassed(stream, &result);
   } else {
     aosUtFailedMsg(stream, &result, "0x%08X\n", status);
@@ -121,7 +121,7 @@ aos_utresult_t utAlldTlc5947Func(BaseSequentialStream *stream, aos_unittest_t *u
     aosThdMSleep(100);
   }
   status |= tlc5947_lld_setBlank((TLC5947Driver*)ut->data, TLC5947_LLD_BLANK_ENABLE);
-  if (status == APAL_STATUS_OK) {
+  if (status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) {
     aosUtPassed(stream, &result);
   } else {
     aosUtFailedMsg(stream, &result, "0x%08X\n", status);
@@ -154,7 +154,7 @@ aos_utresult_t utAlldTlc5947Func(BaseSequentialStream *stream, aos_unittest_t *u
       tlc5947_lld_setBuffer(&buffer, channel, 0);
     }
   }
-  if (status == APAL_STATUS_OK) {
+  if (status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) {
     aosUtPassed(stream, &result);
   } else {
     aosUtFailedMsg(stream, &result, "0x%08X\n", status);
@@ -179,7 +179,7 @@ aos_utresult_t utAlldTlc5947Func(BaseSequentialStream *stream, aos_unittest_t *u
       tlc5947_lld_setBuffer(&buffer, channel, 0);
     }
   }
-  if (status == APAL_STATUS_OK) {
+  if (status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) {
     aosUtPassed(stream, &result);
   } else {
     aosUtFailedMsg(stream, &result, "0x%08X\n", status);
