commit acc97cbf65961b19d0b6455b859d3402c8a6f438
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Fri Oct 19 17:20:26 2018 +0200

    Minor optimizations regarding memory utilization.

diff --git a/core/inc/aos_system.h b/core/inc/aos_system.h
index dbba08c..c1e9eed 100644
--- a/core/inc/aos_system.h
+++ b/core/inc/aos_system.h
@@ -206,17 +206,12 @@ extern "C" {
 /**
  * @brief   Retrieves the system uptime.
  *
- * @param[out] ut   The system uptime.
+ * @param[out] ut   Pointer to the system uptime.
  */
-static inline void aosSysGetUptime(aos_timestamp_t* ut)
-{
-  aosDbgCheck(ut != NULL);
-
-  chSysLock();
-  aosSysGetUptimeX(ut);
-  chSysUnlock();
-
-  return;
+#define aosSysGetUptime(ut) {         \
+  chSysLock();                        \
+  aosSysGetUptimeX(ut);               \
+  chSysUnlock();                      \
 }
 
 #endif /* _AMIROOS_SYSTEM_H_ */
diff --git a/modules/DiWheelDrive_1-1/module.c b/modules/DiWheelDrive_1-1/module.c
index e8b0955..75e75f6 100644
--- a/modules/DiWheelDrive_1-1/module.c
+++ b/modules/DiWheelDrive_1-1/module.c
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /**
- * @file    
+ * @file
  * @brief   Structures and constant for the DiWheelDrive module.
  *
  * @addtogroup diwheeldrive_module
@@ -144,7 +144,7 @@ static apalGpio_t _gpioLed = {
   /* port */ GPIOA,
   /* pad  */ GPIOA_LED,
 };
-apalControlGpio_t moduleGpioLed = {
+ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -160,7 +160,7 @@ static apalGpio_t _gpioPowerEn = {
   /* port */ GPIOB,
   /* pad  */  GPIOB_POWER_EN,
 };
-apalControlGpio_t moduleGpioPowerEn = {
+ROMCONST apalControlGpio_t moduleGpioPowerEn = {
   /* GPIO */ &_gpioPowerEn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -176,7 +176,7 @@ static apalGpio_t _gpioCompassDrdy = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_COMPASS_DRDY,
 };
-apalControlGpio_t moduleGpioCompassDrdy = {
+ROMCONST apalControlGpio_t moduleGpioCompassDrdy = {
   /* GPIO */ &_gpioCompassDrdy,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -192,7 +192,7 @@ static apalGpio_t _gpioIrInt = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_IR_INT,
 };
-apalControlGpio_t moduleGpioIrInt = {
+ROMCONST apalControlGpio_t moduleGpioIrInt = {
   /* GPIO */ &_gpioIrInt,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -208,7 +208,7 @@ static apalGpio_t _gpioGyroDrdy = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_GYRO_DRDY,
 };
-apalControlGpio_t moduleGpioGyroDrdy = {
+ROMCONST apalControlGpio_t moduleGpioGyroDrdy = {
   /* GPIO */ &_gpioGyroDrdy,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -224,7 +224,7 @@ static apalGpio_t _gpioSysUartUp = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_SYS_UART_UP,
 };
-apalControlGpio_t moduleGpioSysUartUp = {
+ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -240,7 +240,7 @@ static apalGpio_t _gpioAccelInt = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_ACCEL_INT_N,
 };
-apalControlGpio_t moduleGpioAccelInt = {
+ROMCONST apalControlGpio_t moduleGpioAccelInt = {
   /* GPIO */ &_gpioAccelInt,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -256,7 +256,7 @@ static apalGpio_t _gpioSysSync = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_INT_N,
 };
-apalControlGpio_t moduleGpioSysSync = {
+ROMCONST apalControlGpio_t  moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -272,7 +272,7 @@ static apalGpio_t _gpioPathDcStat = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_PATH_DCSTAT,
 };
-apalControlGpio_t moduleGpioPathDcStat = {
+ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
   /* GPIO */ &_gpioPathDcStat,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -288,7 +288,7 @@ static apalGpio_t _gpioPathDcEn = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_PATH_DCEN,
 };
-apalControlGpio_t moduleGpioPathDcEn = {
+ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
   /* GPIO */ &_gpioPathDcEn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -304,7 +304,7 @@ static apalGpio_t _gpioSysPd = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_PD_N,
 };
-apalControlGpio_t moduleGpioSysPd = {
+ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -320,7 +320,7 @@ static apalGpio_t _gpioSysRegEn = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_REG_EN,
 };
-apalControlGpio_t moduleGpioSysRegEn = {
+ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
   /* GPIO */ &_gpioSysRegEn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -336,7 +336,7 @@ static apalGpio_t _gpioSysWarmrst = {
   /* port */ GPIOD,
   /* pad  */ GPIOD_SYS_WARMRST_N,
 };
-apalControlGpio_t moduleGpioSysWarmrst = {
+ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
   /* GPIO */ &_gpioSysWarmrst,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -355,7 +355,7 @@ apalControlGpio_t moduleGpioSysWarmrst = {
 /*===========================================================================*/
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
-const char* moduleShellPrompt = "DiWheelDrive";
+ROMCONST char* moduleShellPrompt = "DiWheelDrive";
 #endif
 
 /** @} */
@@ -462,8 +462,11 @@ static ut_a3906data_t _utA3906Data = {
     /* right wheel              */ &MODULE_HAL_QEI_RIGHT_WHEEL,
     /* increment per revolution */ MODULE_HAL_QEI_INCREMENTS_PER_REVOLUTION,
   },
-  /* Wheel diameter   */ 0.05571f,
-  /* timeout          */ 10 * MICROSECONDS_PER_SECOND,
+  /* Wheel diameter   */ {
+    /* left wheel   */ 0.05571f,
+    /* right wheel  */ 0.05571f,
+  },
+  /* timeout          */ 5 * MICROSECONDS_PER_SECOND,
 };
 aos_unittest_t moduleUtAlldA3906  = {
   /* name           */ "A3906",
diff --git a/modules/DiWheelDrive_1-1/module.h b/modules/DiWheelDrive_1-1/module.h
index b8d810a..421668f 100644
--- a/modules/DiWheelDrive_1-1/module.h
+++ b/modules/DiWheelDrive_1-1/module.h
@@ -169,67 +169,67 @@ extern SPIConfig moduleHalSpiGyroscopeConfig;
 /**
  * @brief   LED output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioLed;
+extern ROMCONST apalControlGpio_t moduleGpioLed;
 
 /**
  * @brief   POWER_EN output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioPowerEn;
+extern ROMCONST apalControlGpio_t moduleGpioPowerEn;
 
 /**
  * @brief   COMPASS_DRDY input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioCompassDrdy;
+extern ROMCONST apalControlGpio_t moduleGpioCompassDrdy;
 
 /**
  * @brief   IR_INT input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioIrInt;
+extern ROMCONST apalControlGpio_t moduleGpioIrInt;
 
 /**
  * @brief   GYRO_DRDY input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioGyroDrdy;
+extern ROMCONST apalControlGpio_t moduleGpioGyroDrdy;
 
 /**
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysUartUp;
+extern ROMCONST apalControlGpio_t moduleGpioSysUartUp;
 
 /**
  * @brief   ACCEL_INT input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioAccelInt;
+extern ROMCONST apalControlGpio_t moduleGpioAccelInt;
 
 /**
  * @brief   SYS_SNYC bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysSync;
+extern ROMCONST apalControlGpio_t moduleGpioSysSync;
 
 /**
  * @brief   PATH_DCSTAT input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioPathDcStat;
+extern ROMCONST apalControlGpio_t moduleGpioPathDcStat;
 
 /**
  * @brief   PATH_DCEN output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioPathDcEn;
+extern ROMCONST apalControlGpio_t moduleGpioPathDcEn;
 
 /**
  * @brief   SYS_PD bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysPd;
+extern ROMCONST apalControlGpio_t moduleGpioSysPd;
 
 /**
  * @brief   SYS_REG_EN input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysRegEn;
+extern ROMCONST apalControlGpio_t moduleGpioSysRegEn;
 
 /**
  * @brief   SYS_WARMRST bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysWarmrst;
+extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
 
 /** @} */
 
@@ -294,7 +294,7 @@ extern apalControlGpio_t moduleGpioSysWarmrst;
 /**
  * @brief   Shell prompt text.
  */
-extern const char* moduleShellPrompt;
+extern ROMCONST char* moduleShellPrompt;
 #endif
 
 /**
diff --git a/modules/LightRing_1-0/module.c b/modules/LightRing_1-0/module.c
index 1431f0f..d74ad6f 100644
--- a/modules/LightRing_1-0/module.c
+++ b/modules/LightRing_1-0/module.c
@@ -86,7 +86,7 @@ static apalGpio_t _gpioLightBlank = {
   /* port */ GPIOA,
   /* pad  */ GPIOA_LIGHT_BLANK,
 };
-apalControlGpio_t moduleGpioLightBlank = {
+ROMCONST apalControlGpio_t moduleGpioLightBlank = {
   /* GPIO */ &_gpioLightBlank,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -102,7 +102,7 @@ static apalGpio_t _gpioLaserEn = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_LASER_EN,
 };
-apalControlGpio_t moduleGpioLaserEn = {
+ROMCONST apalControlGpio_t moduleGpioLaserEn = {
   /* GPIO */ &_gpioLaserEn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -118,7 +118,7 @@ static apalGpio_t _gpioLaserOc = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_LASER_OC_N,
 };
-apalControlGpio_t moduleGpioLaserOc = {
+ROMCONST apalControlGpio_t moduleGpioLaserOc = {
   /* GPIO */ &_gpioLaserOc,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -134,7 +134,7 @@ static apalGpio_t _gpioSysUartDn = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_SYS_UART_DN,
 };
-apalControlGpio_t moduleGpioSysUartDn = {
+ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
   /* GPIO */ &_gpioSysUartDn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -150,7 +150,7 @@ static apalGpio_t _gpioWlGdo2 = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_WL_GDO2,
 };
-apalControlGpio_t moduleGpioWlGdo2 = {
+ROMCONST apalControlGpio_t moduleGpioWlGdo2 = {
   /* GPIO */ &_gpioWlGdo2,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -166,7 +166,7 @@ static apalGpio_t _gpioWlGdo0= {
   /* port */ GPIOB,
   /* pad  */ GPIOB_WL_GDO0,
 };
-apalControlGpio_t moduleGpioWlGdo0 = {
+ROMCONST apalControlGpio_t moduleGpioWlGdo0 = {
   /* GPIO */ &_gpioWlGdo0,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -182,7 +182,7 @@ static apalGpio_t _gpioLightXlat = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_LIGHT_XLAT,
 };
-apalControlGpio_t moduleGpioLightXlat = {
+ROMCONST apalControlGpio_t moduleGpioLightXlat = {
   /* GPIO */ &_gpioLightXlat,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -198,7 +198,7 @@ static apalGpio_t _gpioSysPd = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_PD_N,
 };
-apalControlGpio_t moduleGpioSysPd = {
+ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -214,7 +214,7 @@ static apalGpio_t _gpioSysSync = {
   /* port */ GPIOD,
   /* pad  */ GPIOD_SYS_INT_N,
 };
-apalControlGpio_t moduleGpioSysSync = {
+ROMCONST apalControlGpio_t moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -233,7 +233,7 @@ apalControlGpio_t moduleGpioSysSync = {
 /*===========================================================================*/
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
-const char* moduleShellPrompt = "LightRing";
+ROMCONST char* moduleShellPrompt = "LightRing";
 #endif
 
 /** @} */
diff --git a/modules/LightRing_1-0/module.h b/modules/LightRing_1-0/module.h
index 7e7ce3d..d730304 100644
--- a/modules/LightRing_1-0/module.h
+++ b/modules/LightRing_1-0/module.h
@@ -104,47 +104,47 @@ extern SPIConfig moduleHalSpiWlConfig;
 /**
  * @brief   LIGHT_BANK output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioLightBlank;
+extern ROMCONST apalControlGpio_t moduleGpioLightBlank;
 
 /**
  * @brief   LASER_EN output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioLaserEn;
+extern ROMCONST apalControlGpio_t moduleGpioLaserEn;
 
 /**
  * @brief   LASER_OC input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioLaserOc;
+extern ROMCONST apalControlGpio_t moduleGpioLaserOc;
 
 /**
  * @brief   SYS_UART_DN bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysUartDn;
+extern ROMCONST apalControlGpio_t moduleGpioSysUartDn;
 
 /**
  * @brief   WL_GDO2 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioWlGdo2;
+extern ROMCONST apalControlGpio_t moduleGpioWlGdo2;
 
 /**
  * @brief   WL_GDO0 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioWlGdo0;
+extern ROMCONST apalControlGpio_t moduleGpioWlGdo0;
 
 /**
  * @brief   LIGHT_XLAT output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioLightXlat;
+extern ROMCONST apalControlGpio_t moduleGpioLightXlat;
 
 /**
  * @brief   SYS_PD bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysPd;
+extern ROMCONST apalControlGpio_t moduleGpioSysPd;
 
 /**
  * @brief   SYS_SYNC bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysSync;
+extern ROMCONST apalControlGpio_t moduleGpioSysSync;
 
 /** @} */
 
@@ -189,7 +189,7 @@ extern apalControlGpio_t moduleGpioSysSync;
 /**
  * @brief   Shell prompt text.
  */
-extern const char* moduleShellPrompt;
+extern ROMCONST char* moduleShellPrompt;
 #endif
 
 /**
diff --git a/modules/PowerManagement_1-1/board.c b/modules/PowerManagement_1-1/board.c
index e3aa013..db3a4de 100644
--- a/modules/PowerManagement_1-1/board.c
+++ b/modules/PowerManagement_1-1/board.c
@@ -49,7 +49,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * @param[in] afrh      AF register (high ) configuration.
  * @param[in] ignmask   Mask to ignore individual pads.
  */
-static void gpio_init(stm32_gpio_t *gpiop,
+static void _gpio_init(stm32_gpio_t *gpiop,
                       const uint32_t moder,
                       const uint32_t otyper,
                       const uint32_t ospeedr,
@@ -90,7 +90,7 @@ static void gpio_init(stm32_gpio_t *gpiop,
 /**
  * @brief   GPIO initilization for all ports.
  */
-static void stm32_gpio_init(void) {
+static void _stm32_gpio_init(void) {
 
   /* Enabling GPIO-related clocks, the mask comes from the
      registry header file.*/
@@ -99,37 +99,37 @@ static void stm32_gpio_init(void) {
 
   /* Initializing all the defined GPIO ports.*/
 #if STM32_HAS_GPIOA
-  gpio_init(GPIOA, VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH, VAL_GPIOA_IGNORE);
+  _gpio_init(GPIOA, VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH, VAL_GPIOA_IGNORE);
 #endif
 #if STM32_HAS_GPIOB
-  gpio_init(GPIOB, VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH, VAL_GPIOB_IGNORE);
+  _gpio_init(GPIOB, VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH, VAL_GPIOB_IGNORE);
 #endif
 #if STM32_HAS_GPIOC
-  gpio_init(GPIOC, VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH, VAL_GPIOC_IGNORE);
+  _gpio_init(GPIOC, VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH, VAL_GPIOC_IGNORE);
 #endif
 #if STM32_HAS_GPIOD
-  gpio_init(GPIOD, VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH, VAL_GPIOD_IGNORE);
+  _gpio_init(GPIOD, VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH, VAL_GPIOD_IGNORE);
 #endif
 #if STM32_HAS_GPIOE
-  gpio_init(GPIOE, VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH, VAL_GPIOE_IGNORE);
+  _gpio_init(GPIOE, VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH, VAL_GPIOE_IGNORE);
 #endif
 #if STM32_HAS_GPIOF
-  gpio_init(GPIOF, VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH, VAL_GPIOF_IGNORE);
+  _gpio_init(GPIOF, VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH, VAL_GPIOF_IGNORE);
 #endif
 #if STM32_HAS_GPIOG
-  gpio_init(GPIOG, VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH, VAL_GPIOG_IGNORE);
+  _gpio_init(GPIOG, VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH, VAL_GPIOG_IGNORE);
 #endif
 #if STM32_HAS_GPIOH
-  gpio_init(GPIOH, VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH, VAL_GPIOH_IGNORE);
+  _gpio_init(GPIOH, VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH, VAL_GPIOH_IGNORE);
 #endif
 #if STM32_HAS_GPIOI
-  gpio_init(GPIOI, VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_IGNORE);
+  _gpio_init(GPIOI, VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_IGNORE);
 #endif
 #if STM32_HAS_GPIOJ
-  gpio_init(GPIOJ, VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH, VAL_GPIOJ_IGNORE);
+  _gpio_init(GPIOJ, VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH, VAL_GPIOJ_IGNORE);
 #endif
 #if STM32_HAS_GPIOK
-  gpio_init(GPIOK, VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH, VAL_GPIOK_IGNORE);
+  _gpio_init(GPIOK, VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH, VAL_GPIOK_IGNORE);
 #endif
 }
 
@@ -140,7 +140,7 @@ static void stm32_gpio_init(void) {
  */
 void __early_init(void) {
 
-  stm32_gpio_init();
+  _stm32_gpio_init();
   stm32_clock_init();
 }
 
diff --git a/modules/PowerManagement_1-1/module.c b/modules/PowerManagement_1-1/module.c
index 739e300..f4b800a 100644
--- a/modules/PowerManagement_1-1/module.c
+++ b/modules/PowerManagement_1-1/module.c
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /**
- * @file    
+ * @file
  * @brief   Structures and constant for the PowerManagement module.
  *
  * @addtogroup powermanagement_module
@@ -129,7 +129,7 @@ static apalGpio_t _gpioSysRegEn = {
   /* port */ GPIOA,
   /* pad  */ GPIOA_SYS_REG_EN,
 };
-apalControlGpio_t moduleSysRegEn = {
+ROMCONST apalControlGpio_t moduleSysRegEn = {
   /* GPIO */ &_gpioSysRegEn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -145,7 +145,7 @@ static apalGpio_t _gpioIrInt1 = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_IR_INT1_N,
 };
-apalControlGpio_t moduleGpioIrInt1 = {
+ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
   /* GPIO */ &_gpioIrInt1,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -161,7 +161,7 @@ static apalGpio_t _gpioPowerEn = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_POWER_EN,
 };
-apalControlGpio_t moduleGpioPowerEn = {
+ROMCONST apalControlGpio_t moduleGpioPowerEn = {
   /* GPIO */ &_gpioPowerEn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -177,7 +177,7 @@ static apalGpio_t _gpioSysUartDn = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_SYS_UART_DN,
 };
-apalControlGpio_t moduleGpioSysUartDn = {
+ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
   /* GPIO */ &_gpioSysUartDn,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -193,7 +193,7 @@ static apalGpio_t _gpioChargeStat2A = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_CHARGE_STAT2A,
 };
-apalControlGpio_t moduleGpioChargeStat2A = {
+ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
   /* GPIO */ &_gpioChargeStat2A,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -209,7 +209,7 @@ static apalGpio_t _gpioGaugeBatLow2 = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_GAUGE_BATLOW2,
 };
-apalControlGpio_t moduleGpioGaugeBatLow2 = {
+ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
   /* GPIO */ &_gpioGaugeBatLow2,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -225,7 +225,7 @@ static apalGpio_t _gpioGaugeBatGd2 = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_GAUGE_BATGD2_N,
 };
-apalControlGpio_t moduleGpioGaugeBatGd2 = {
+ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
   /* GPIO */ &_gpioGaugeBatGd2,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -241,7 +241,7 @@ static apalGpio_t _gpioLed = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_LED,
 };
-apalControlGpio_t moduleGpioLed = {
+ROMCONST apalControlGpio_t moduleGpioLed = {
   /* GPIO */ &_gpioLed,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -257,7 +257,7 @@ static apalGpio_t _gpioSysUartUp = {
   /* port */ GPIOB,
   /* pad  */ GPIOB_SYS_UART_UP,
 };
-apalControlGpio_t moduleGpioSysUartUp = {
+ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
   /* GPIO */ &_gpioSysUartUp,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -273,7 +273,7 @@ static apalGpio_t _gpioChargeStat1A = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_CHARGE_STAT1A,
 };
-apalControlGpio_t moduleGpioChargeStat1A = {
+ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
   /* GPIO */ &_gpioChargeStat1A,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -289,7 +289,7 @@ static apalGpio_t _gpioGaugeBatLow1 = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_GAUGE_BATLOW1,
 };
-apalControlGpio_t moduleGpioGaugeBatLow1 = {
+ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
   /* GPIO */ &_gpioGaugeBatLow1,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -305,7 +305,7 @@ static apalGpio_t _gpioGaugeBatGd1 = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_GAUGE_BATGD1_N,
 };
-apalControlGpio_t moduleGpioGaugeBatGd1 = {
+ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
   /* GPIO */ &_gpioGaugeBatGd1,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -321,7 +321,7 @@ static apalGpio_t _gpioChargeEn1 = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_CHARGE_EN1_N,
 };
-apalControlGpio_t moduleGpioChargeEn1 = {
+ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
   /* GPIO */ &_gpioChargeEn1,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -337,7 +337,7 @@ static apalGpio_t _gpioIrInt2 = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_IR_INT2_N,
 };
-apalControlGpio_t moduleGpioIrInt2 = {
+ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
   /* GPIO */ &_gpioIrInt2,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -353,7 +353,7 @@ static apalGpio_t _gpioTouchInt = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_TOUCH_INT_N,
 };
-apalControlGpio_t moduleGpioTouchInt = {
+ROMCONST apalControlGpio_t moduleGpioTouchInt = {
   /* GPIO */ &_gpioTouchInt,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -369,7 +369,7 @@ static apalGpio_t _gpioSysDone = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_DONE,
 };
-apalControlGpio_t moduleGpioSysDone = {
+ROMCONST apalControlGpio_t moduleGpioSysDone = {
   /* GPIO */ &_gpioSysDone,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -385,7 +385,7 @@ static apalGpio_t _gpioSysProg = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_PROG_N,
 };
-apalControlGpio_t moduleGpioSysProg = {
+ROMCONST apalControlGpio_t moduleGpioSysProg = {
   /* GPIO */ &_gpioSysProg,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -401,7 +401,7 @@ static apalGpio_t _gpioPathDc = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_PATH_DC,
 };
-apalControlGpio_t moduleGpioPathDc = {
+ROMCONST apalControlGpio_t moduleGpioPathDc = {
   /* GPIO */ &_gpioPathDc,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_INPUT,
@@ -417,7 +417,7 @@ static apalGpio_t _gpioSysSpiDir = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_SPI_DIR,
 };
-apalControlGpio_t moduleGpioSysSpiDir = {
+ROMCONST apalControlGpio_t moduleGpioSysSpiDir = {
   /* GPIO */ &_gpioSysSpiDir,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -433,7 +433,7 @@ static apalGpio_t _gpioSysSync = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_INT_N,
 };
-apalControlGpio_t moduleGpioSysSync = {
+ROMCONST apalControlGpio_t moduleGpioSysSync = {
   /* GPIO */ &_gpioSysSync,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -449,7 +449,7 @@ static apalGpio_t _gpioSysPd = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_PD_N,
 };
-apalControlGpio_t moduleGpioSysPd = {
+ROMCONST apalControlGpio_t moduleGpioSysPd = {
   /* GPIO */ &_gpioSysPd,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -465,7 +465,7 @@ static apalGpio_t _gpioSysWarmrst = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_SYS_WARMRST_N,
 };
-apalControlGpio_t moduleGpioSysWarmrst = {
+ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
   /* GPIO */ &_gpioSysWarmrst,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
@@ -481,7 +481,7 @@ static apalGpio_t _gpioBtRst = {
   /* port */ GPIOC,
   /* pad  */ GPIOC_BT_RST,
 };
-apalControlGpio_t moduleGpioBtRst = {
+ROMCONST apalControlGpio_t moduleGpioBtRst = {
   /* GPIO */ &_gpioBtRst,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -497,7 +497,7 @@ static apalGpio_t _gpioChargeEn2 = {
   /* port */ GPIOD,
   /* pad  */ GPIOD_CHARGE_EN2_N,
 };
-apalControlGpio_t moduleGpioChargeEn2 = {
+ROMCONST apalControlGpio_t moduleGpioChargeEn2 = {
   /* GPIO */ &_gpioChargeEn2,
   /* meta */ {
     /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
@@ -516,7 +516,7 @@ apalControlGpio_t moduleGpioChargeEn2 = {
 /*===========================================================================*/
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
-const char* moduleShellPrompt = "PowerManagement";
+ROMCONST char* moduleShellPrompt = "PowerManagement";
 #endif
 
 /** @} */
@@ -1051,7 +1051,7 @@ static int _utShellCmdCb_AlldTps62113Ina219(BaseSequentialStream* stream, int ar
   aosUtRun(stream, &moduleUtAlldTps62113Ina219, "VSYS (4.2V)");
   return AOS_OK;
 }
-ut_tps62113ina219data_t _utAlldTps62113Ina219Data = {
+static ut_tps62113ina219data_t _utAlldTps62113Ina219Data = {
   /* TPS62113 */ &moduleLldStepDownConverter,
   /* INA219   */ &moduleLldPowerMonitorVsys42,
   /* timeout  */ MICROSECONDS_PER_SECOND,
diff --git a/modules/PowerManagement_1-1/module.h b/modules/PowerManagement_1-1/module.h
index 37fa360..c9a231e 100644
--- a/modules/PowerManagement_1-1/module.h
+++ b/modules/PowerManagement_1-1/module.h
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /**
- * @file    
+ * @file
  * @brief   Structures and constant for the PowerManagement module.
  *
  * @addtogroup powermanagement_module
@@ -154,122 +154,122 @@ extern SerialConfig moduleHalProgIfConfig;
 /**
  * @brief   SYS_REG_EN output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysRegEn;
+extern ROMCONST apalControlGpio_t moduleGpioSysRegEn;
 
 /**
  * @brief   IR_INT1 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioIrInt1;
+extern ROMCONST apalControlGpio_t moduleGpioIrInt1;
 
 /**
  * @brief   POWER_EN output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioPowerEn;
+extern ROMCONST apalControlGpio_t moduleGpioPowerEn;
 
 /**
  * @brief   SYS_UART_DN bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysUartDn;
+extern ROMCONST apalControlGpio_t moduleGpioSysUartDn;
 
 /**
  * @brief   CHARGE_STAT2A input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioChargeStat2A;
+extern ROMCONST apalControlGpio_t moduleGpioChargeStat2A;
 
 /**
  * @brief   GAUGE_BATLOW2 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioGaugeBatLow2;
+extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2;
 
 /**
  * @brief   GAUGE_BATGD2 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioGaugeBatGd2;
+extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2;
 
 /**
  * @brief   LED output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioLed;
+extern ROMCONST apalControlGpio_t moduleGpioLed;
 
 /**
  * @brief   SYS_UART_UP bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysUartUp;
+extern ROMCONST apalControlGpio_t moduleGpioSysUartUp;
 
 /**
  * @brief   CHARGE_STAT1A input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioChargeStat1A;
+extern ROMCONST apalControlGpio_t moduleGpioChargeStat1A;
 
 /**
  * @brief   GAUGE_BATLOW1 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioGaugeBatLow1;
+extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1;
 
 /**
  * @brief   GAUGE_BATGD1 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioGaugeBatGd1;
+extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1;
 
 /**
  * @brief   CHARG_EN1 output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioChargeEn1;
+extern ROMCONST apalControlGpio_t moduleGpioChargeEn1;
 
 /**
  * @brief   IR_INT2 input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioIrInt2;
+extern ROMCONST apalControlGpio_t moduleGpioIrInt2;
 
 /**
  * @brief   TOUCH_INT input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioTouchInt;
+extern ROMCONST apalControlGpio_t moduleGpioTouchInt;
 
 /**
  * @brief   SYS_DONE input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysDone;
+extern ROMCONST apalControlGpio_t moduleGpioSysDone;
 
 /**
  * @brief   SYS_PROG output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysProg;
+extern ROMCONST apalControlGpio_t moduleGpioSysProg;
 
 /**
  * @brief   PATH_DC input signal GPIO.
  */
-extern apalControlGpio_t moduleGpioPathDc;
+extern ROMCONST apalControlGpio_t moduleGpioPathDc;
 
 /**
  * @brief   SYS_SPI_DIR bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysSpiDir;
+extern ROMCONST apalControlGpio_t moduleGpioSysSpiDir;
 
 /**
  * @brief   SYS_SYNC bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysSync;
+extern ROMCONST apalControlGpio_t moduleGpioSysSync;
 
 /**
  * @brief   SYS_PD bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysPd;
+extern ROMCONST apalControlGpio_t moduleGpioSysPd;
 
 /**
  * @brief   SYS_WARMRST bidirectional signal GPIO.
  */
-extern apalControlGpio_t moduleGpioSysWarmrst;
+extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
 
 /**
  * @brief   BT_RST output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioBtRst;
+extern ROMCONST apalControlGpio_t moduleGpioBtRst;
 
 /**
  * @brief   CHARGE_EN2 output signal GPIO.
  */
-extern apalControlGpio_t moduleGpioChargeEn2;
+extern ROMCONST apalControlGpio_t moduleGpioChargeEn2;
 
 /** @} */
 
@@ -354,7 +354,7 @@ extern apalControlGpio_t moduleGpioChargeEn2;
 /**
  * @brief   Shell prompt text.
  */
-extern const char* moduleShellPrompt;
+extern ROMCONST char* moduleShellPrompt;
 #endif
 
 /**
diff --git a/periphery-lld/AMiRo-LLD b/periphery-lld/AMiRo-LLD
index 9d4563d..11500ad 160000
--- a/periphery-lld/AMiRo-LLD
+++ b/periphery-lld/AMiRo-LLD
@@ -1 +1 @@
-Subproject commit 9d4563d7664d7a39bc04d065e7580e1991bb5dbb
+Subproject commit 11500ad81cfe6291b84e2faaf5731446da4014d4
