commit 6b53f6bfd727243d04e4a665bf64dcd255281137
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Tue Jul 10 19:15:19 2018 +0200

    Several enhancements to memory structure, naming and code quality.
    AMiRo-OS is now prepared so the SSSP startup stage 3 (module stack initialization can be implemented).

diff --git a/modules/DiWheelDrive_1-1/aosconf.h b/modules/DiWheelDrive_1-1/aosconf.h
index 029ac0e..e67a96c 100644
--- a/modules/DiWheelDrive_1-1/aosconf.h
+++ b/modules/DiWheelDrive_1-1/aosconf.h
@@ -28,13 +28,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <stdbool.h>
 
-/*===========================================================================*/
-/**
- * @name Kernel parameters and options
- * @{
- */
-/*===========================================================================*/
-
 /*
  * Include an external configuration file to override the following default settings only if required.
  */
@@ -42,25 +35,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   #include <osconf.h>
 #endif
 
+/*===========================================================================*/
 /**
- * @brief   Flag to set the module as SSSP master.
- */
-#if !defined(OS_CFG_SSSP_MASTER)
-  #define AMIROOS_CFG_SSSP_MASTER               false
-#else
-  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
-#endif
-
-/**
- * @brief   Time boundary for robot wide clock synchronization in microseconds.
- * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
- *          All modules need to align their local uptime to the nearest multiple of this value.
+ * @name Kernel parameters and options
+ * @{
  */
-#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
-  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
-#else
-  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
-#endif
+/*===========================================================================*/
 
 /**
  * @brief   Flag to enable/disable debug API.
@@ -103,6 +83,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /*===========================================================================*/
 /**
+ * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief   Flag to set the module as SSSP master.
+ * @details There must be only one module with this flag set to true in a system.
+ */
+#if !defined(OS_CFG_SSSP_MASTER)
+  #define AMIROOS_CFG_SSSP_MASTER               false
+#else
+  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
+#endif
+
+/**
+ * @brief   Time boundary for robot wide clock synchronization in microseconds.
+ * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
+ *          All modules need to align their local uptime to the nearest multiple of this value.
+ */
+#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
+  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
+#else
+  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
  * @name System shell options
  * @{
  */
diff --git a/modules/DiWheelDrive_1-1/module.c b/modules/DiWheelDrive_1-1/module.c
index 989186d..13fce46 100644
--- a/modules/DiWheelDrive_1-1/module.c
+++ b/modules/DiWheelDrive_1-1/module.c
@@ -36,7 +36,7 @@ static void _moduleIsrCallback(EXTDriver* extp, expchannel_t channel) {
   (void)extp;
 
   chSysLockFromISR();
-  chEvtBroadcastFlagsI(&aos.events.io.source, (1 << channel));
+  chEvtBroadcastFlagsI(&aos.events.io, (1 << channel));
   chSysUnlockFromISR();
 
   return;
@@ -297,7 +297,21 @@ apalGpio_t moduleGpioSysWarmrst = {
  */
 /*===========================================================================*/
 
-apalControlGpio_t moduleSsspPd = {
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
+const char* moduleShellPrompt = "DiWheelDrive";
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Startup Shutdown Synchronization Protocol (SSSP)
+ * @{
+ */
+/*===========================================================================*/
+
+
+apalControlGpio_t moduleSsspGpioPd = {
   /* GPIO */ &moduleGpioSysPd,
   /* meta */ {
     /* active state */ APAL_GPIO_ACTIVE_LOW,
@@ -306,7 +320,7 @@ apalControlGpio_t moduleSsspPd = {
   },
 };
 
-apalControlGpio_t moduleSsspSync = {
+apalControlGpio_t moduleSsspGpioSync = {
   /* GPIO */ &moduleGpioSysSync,
   /* meta */ {
     /* active state */ APAL_GPIO_ACTIVE_LOW,
@@ -315,8 +329,6 @@ apalControlGpio_t moduleSsspSync = {
   },
 };
 
-const char* moduleShellPrompt = "DiWheelDrive";
-
 /** @} */
 
 /*===========================================================================*/
@@ -497,7 +509,7 @@ static int _utShellCmdCb_AlldHmc5883l(BaseSequentialStream* stream, int argc, ch
 }
 static ut_hmc5883ldata_t _utHmc5883lData = {
   /* HMC driver   */ &moduleLldCompass,
-  /* event source */ &aos.events.io.source,
+  /* event source */ &aos.events.io,
   /* event flags  */ (1 << MODULE_GPIO_EXTCHANNEL_COMPASSDRDY),
   /* timeout      */ MICROSECONDS_PER_SECOND,
 };
@@ -553,7 +565,7 @@ static int _utShellCmdCb_AlldL3g4200d(BaseSequentialStream* stream, int argc, ch
 static ut_l3g4200ddata_t _utL3g4200dData = {
   /* driver            */ &moduleLldGyroscope,
   /* SPI configuration */ &moduleHalSpiGyroscopeConfig,
-  /* event source */ &aos.events.io.source,
+  /* event source */ &aos.events.io,
   /* event flags  */ (1 << MODULE_GPIO_EXTCHANNEL_GYRODRDY),
 };
 aos_unittest_t moduleUtAlldL3g4200d = {
@@ -602,7 +614,7 @@ static int _utShellCmdCb_AlldLis331dlh(BaseSequentialStream* stream, int argc, c
 static ut_lis331dlhdata_t _utLis331dlhData = {
   /* driver            */ &moduleLldAccelerometer,
   /* SPI configuration */ &moduleHalSpiAccelerometerConfig,
-  /* event source */ &aos.events.io.source,
+  /* event source */ &aos.events.io,
   /* event flags  */ (1 << MODULE_GPIO_EXTCHANNEL_ACCELINT),
 };
 aos_unittest_t moduleUtAlldLis331dlh = {
@@ -758,7 +770,7 @@ static int _utShellCmdCb_AlldVcnl4020(BaseSequentialStream* stream, int argc, ch
 static ut_vcnl4020data_t _utVcnl4020Data = {
   /* driver       */ &moduleLldProximity,
   /* timeout      */ MICROSECONDS_PER_SECOND,
-  /* event source */ &aos.events.io.source,
+  /* event source */ &aos.events.io,
   /* event flags  */ (1 << MODULE_GPIO_EXTCHANNEL_IRINT),
 };
 aos_unittest_t moduleUtAlldVcnl4020 = {
diff --git a/modules/DiWheelDrive_1-1/module.h b/modules/DiWheelDrive_1-1/module.h
index a056d65..556cd2d 100644
--- a/modules/DiWheelDrive_1-1/module.h
+++ b/modules/DiWheelDrive_1-1/module.h
@@ -342,20 +342,12 @@ extern apalGpio_t moduleGpioSysWarmrst;
  */
 #define MODULE_OS_IOEVENTFLAGS_ACCELINT         ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_ACCELINT))
 
-/**
- * @brief   PD signal for SSSP.
- */
-extern apalControlGpio_t moduleSsspPd;
-
-/**
- * @brief   SYNC signal for SSSP.
- */
-extern apalControlGpio_t moduleSsspSync;
-
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
 /**
  * @brief   Shell prompt text.
  */
 extern const char* moduleShellPrompt;
+#endif
 
 /**
  * @brief   Additional HAL initialization hook.
@@ -369,17 +361,17 @@ extern const char* moduleShellPrompt;
  */
 #define MODULE_INIT_TESTS() {                                                 \
   /* add unit-test shell commands */                                          \
-  aosShellAddCommand(aos.shell, &moduleUtAlldA3906.shellcmd);                 \
-  aosShellAddCommand(aos.shell, &moduleUtAlldAt24c01bn.shellcmd);             \
-  aosShellAddCommand(aos.shell, &moduleUtAlldHmc5883l.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldIna219.shellcmd);                \
-  aosShellAddCommand(aos.shell, &moduleUtAlldL3g4200d.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldLed.shellcmd);                   \
-  aosShellAddCommand(aos.shell, &moduleUtAlldLis331dlh.shellcmd);             \
-  aosShellAddCommand(aos.shell, &moduleUtAlldLtc4412.shellcmd);               \
-  aosShellAddCommand(aos.shell, &moduleUtAlldPca9544a.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldTps62113.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldVcnl4020.shellcmd);              \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldA3906.shellcmd);                \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01bn.shellcmd);            \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldHmc5883l.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldIna219.shellcmd);               \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldL3g4200d.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldLed.shellcmd);                  \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldLis331dlh.shellcmd);            \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldLtc4412.shellcmd);              \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldPca9544a.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldVcnl4020.shellcmd);             \
 }
 
 /**
@@ -409,15 +401,6 @@ extern const char* moduleShellPrompt;
 }
 
 /**
- * @brief   Hook to handle IO events during SSSP startup synchronization.
- */
-#define MODULE_SSP_STARTUP_OUTRO_IO_EVENT(mask, flags) {                      \
-  /* ignore all events */                                                     \
-  (void)mask;                                                                 \
-  (void)flags;                                                                \
-}
-
-/**
  * @brief   Periphery communication interface deinitialization hook.
  */
 #define MODULE_SHUTDOWN_PERIPHERY_COMM() {                                    \
@@ -438,6 +421,44 @@ extern const char* moduleShellPrompt;
 
 /*===========================================================================*/
 /**
+ * @name Startup Shutdown Synchronization Protocol (SSSP)
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief   PD signal GPIO.
+ */
+extern apalControlGpio_t moduleSsspGpioPd;
+
+/**
+ * @brief   SYNC signal GPIO.
+ */
+extern apalControlGpio_t moduleSsspGpioSync;
+
+/**
+ * @brief   Event flags for PD signal events.
+ */
+#define MODULE_SSSP_EVENTFLAGS_PD               MODULE_OS_IOEVENTFLAGS_SYSPD
+
+/**
+ * @brief   Event flags for Sync signal events.
+ */
+#define MODULE_SSSP_EVENTFLAGS_SYNC             MODULE_OS_IOEVENTFLAGS_SYSSYNC
+
+/**
+ * @brief   Hook to handle IO events during SSSP startup synchronization.
+ */
+#define MODULE_SSSP_STARTUP_OSINIT_OUTRO_IOEVENT_HOOK(mask, flags) {          \
+  /* ignore all events */                                                     \
+  (void)mask;                                                                 \
+  (void)flags;                                                                \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/**
  * @name Low-level drivers
  * @{
  */
diff --git a/modules/LightRing_1-0/aosconf.h b/modules/LightRing_1-0/aosconf.h
index 029ac0e..e67a96c 100644
--- a/modules/LightRing_1-0/aosconf.h
+++ b/modules/LightRing_1-0/aosconf.h
@@ -28,13 +28,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <stdbool.h>
 
-/*===========================================================================*/
-/**
- * @name Kernel parameters and options
- * @{
- */
-/*===========================================================================*/
-
 /*
  * Include an external configuration file to override the following default settings only if required.
  */
@@ -42,25 +35,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   #include <osconf.h>
 #endif
 
+/*===========================================================================*/
 /**
- * @brief   Flag to set the module as SSSP master.
- */
-#if !defined(OS_CFG_SSSP_MASTER)
-  #define AMIROOS_CFG_SSSP_MASTER               false
-#else
-  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
-#endif
-
-/**
- * @brief   Time boundary for robot wide clock synchronization in microseconds.
- * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
- *          All modules need to align their local uptime to the nearest multiple of this value.
+ * @name Kernel parameters and options
+ * @{
  */
-#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
-  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
-#else
-  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
-#endif
+/*===========================================================================*/
 
 /**
  * @brief   Flag to enable/disable debug API.
@@ -103,6 +83,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /*===========================================================================*/
 /**
+ * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief   Flag to set the module as SSSP master.
+ * @details There must be only one module with this flag set to true in a system.
+ */
+#if !defined(OS_CFG_SSSP_MASTER)
+  #define AMIROOS_CFG_SSSP_MASTER               false
+#else
+  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
+#endif
+
+/**
+ * @brief   Time boundary for robot wide clock synchronization in microseconds.
+ * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
+ *          All modules need to align their local uptime to the nearest multiple of this value.
+ */
+#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
+  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
+#else
+  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
  * @name System shell options
  * @{
  */
diff --git a/modules/LightRing_1-0/module.c b/modules/LightRing_1-0/module.c
index e27dda3..f05c0b3 100644
--- a/modules/LightRing_1-0/module.c
+++ b/modules/LightRing_1-0/module.c
@@ -36,7 +36,7 @@ static void _moduleIsrCallback(EXTDriver* extp, expchannel_t channel) {
   (void)extp;
 
   chSysLockFromISR();
-  chEvtBroadcastFlagsI(&aos.events.io.source, (1 << channel));
+  chEvtBroadcastFlagsI(&aos.events.io, (1 << channel));
   chSysUnlockFromISR();
 
   return;
@@ -219,7 +219,20 @@ apalGpio_t moduleGpioSysSync = {
  */
 /*===========================================================================*/
 
-apalControlGpio_t moduleSsspPd = {
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
+const char* moduleShellPrompt = "LightRing";
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Startup Shutdown Synchronization Protocol (SSSP)
+ * @{
+ */
+/*===========================================================================*/
+
+apalControlGpio_t moduleSsspGpioPd = {
   /* GPIO */ &moduleGpioSysPd,
   /* meta */ {
     /* active state */ APAL_GPIO_ACTIVE_LOW,
@@ -228,7 +241,7 @@ apalControlGpio_t moduleSsspPd = {
   },
 };
 
-apalControlGpio_t moduleSsspSync = {
+apalControlGpio_t moduleSsspGpioSync = {
   /* GPIO */ &moduleGpioSysSync,
   /* meta */ {
     /* active state */ APAL_GPIO_ACTIVE_LOW,
@@ -237,8 +250,6 @@ apalControlGpio_t moduleSsspSync = {
   },
 };
 
-const char* moduleShellPrompt = "LightRing";
-
 /** @} */
 
 /*===========================================================================*/
diff --git a/modules/LightRing_1-0/module.h b/modules/LightRing_1-0/module.h
index a8e203f..a4a1e00 100644
--- a/modules/LightRing_1-0/module.h
+++ b/modules/LightRing_1-0/module.h
@@ -215,29 +215,21 @@ extern apalGpio_t moduleGpioSysSync;
  */
 #define MODULE_OS_IOEVENTFLAGS_SYSSYNC          ((eventflags_t)(1 << MODULE_GPIO_EXTCHANNEL_SYSSYNC))
 
-/**
- * @brief   PD signal for SSSP.
- */
-extern apalControlGpio_t moduleSsspPd;
-
-/**
- * @brief   SYNC signal for SSSP.
- */
-extern apalControlGpio_t moduleSsspSync;
-
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
 /**
  * @brief   Shell prompt text.
  */
 extern const char* moduleShellPrompt;
+#endif
 
 /**
  * @brief   Unit test initialization hook.
  */
 #define MODULE_INIT_TESTS() {                                                 \
   /* add unit-test shell commands */                                          \
-  aosShellAddCommand(aos.shell, &moduleUtAlldAt24c01bn.shellcmd);             \
-  aosShellAddCommand(aos.shell, &moduleUtAlldTlc5947.shellcmd);               \
-  aosShellAddCommand(aos.shell, &moduleUtAlldTps2051bdbv.shellcmd);           \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01bn.shellcmd);            \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldTlc5947.shellcmd);              \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldTps2051bdbv.shellcmd);          \
 }
 
 /**
@@ -255,15 +247,6 @@ extern const char* moduleShellPrompt;
 }
 
 /**
- * @brief   Hook to handle IO events during SSSP startup synchronization.
- */
-#define MODULE_SSP_STARTUP_OUTRO_IO_EVENT(mask, flags) {                      \
-  /* ignore all events */                                                     \
-  (void)mask;                                                                 \
-  (void)flags;                                                                \
-}
-
-/**
  * @brief   Periphery communication interface deinitialization hook.
  */
 #define MODULE_SHUTDOWN_PERIPHERY_COMM() {                                    \
@@ -278,6 +261,44 @@ extern const char* moduleShellPrompt;
 
 /*===========================================================================*/
 /**
+ * @name Startup Shutdown Synchronization Protocol (SSSP)
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief   PD signal GPIO.
+ */
+extern apalControlGpio_t moduleSsspGpioPd;
+
+/**
+ * @brief   SYNC signal GPIO.
+ */
+extern apalControlGpio_t moduleSsspGpioSync;
+
+/**
+ * @brief   Event flags for PD signal events.
+ */
+#define MODULE_SSSP_EVENTFLAGS_PD               MODULE_OS_IOEVENTFLAGS_SYSPD
+
+/**
+ * @brief   Event flags for Sync signal events.
+ */
+#define MODULE_SSSP_EVENTFLAGS_SYNC             MODULE_OS_IOEVENTFLAGS_SYSSYNC
+
+/**
+ * @brief   Hook to handle IO events during SSSP startup synchronization.
+ */
+#define MODULE_SSSP_STARTUP_OSINIT_OUTRO_IOEVENT_HOOK(mask, flags) {          \
+  /* ignore all events */                                                     \
+  (void)mask;                                                                 \
+  (void)flags;                                                                \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/**
  * @name Low-level drivers
  * @{
  */
diff --git a/modules/PowerManagement_1-1/aosconf.h b/modules/PowerManagement_1-1/aosconf.h
index d3fb990..da26819 100644
--- a/modules/PowerManagement_1-1/aosconf.h
+++ b/modules/PowerManagement_1-1/aosconf.h
@@ -28,13 +28,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <stdbool.h>
 
-/*===========================================================================*/
-/**
- * @name Kernel parameters and options
- * @{
- */
-/*===========================================================================*/
-
 /*
  * Include an external configuration file to override the following default settings only if required.
  */
@@ -42,25 +35,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   #include <osconf.h>
 #endif
 
+/*===========================================================================*/
 /**
- * @brief   Flag to set the module as SSSP master.
- */
-#if !defined(OS_CFG_SSSP_MASTER)
-  #define AMIROOS_CFG_SSSP_MASTER               true
-#else
-  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
-#endif
-
-/**
- * @brief   Time boundary for robot wide clock synchronization in microseconds.
- * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
- *          All modules need to align their local uptime to the nearest multiple of this value.
+ * @name Kernel parameters and options
+ * @{
  */
-#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
-  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
-#else
-  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
-#endif
+/*===========================================================================*/
 
 /**
  * @brief   Flag to enable/disable debug API.
@@ -103,6 +83,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /*===========================================================================*/
 /**
+ * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief   Flag to set the module as SSSP master.
+ * @details There must be only one module with this flag set to true in a system.
+ */
+#if !defined(OS_CFG_SSSP_MASTER)
+  #define AMIROOS_CFG_SSSP_MASTER               true
+#else
+  #define AMIROOS_CFG_SSSP_MASTER               OS_CFG_SSSP_MASTER
+#endif
+
+/**
+ * @brief   Time boundary for robot wide clock synchronization in microseconds.
+ * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
+ *          All modules need to align their local uptime to the nearest multiple of this value.
+ */
+#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
+  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        1000000
+#else
+  #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD        OS_CFG_SSSP_SYSSYNCPERIOD
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
  * @name System shell options
  * @{
  */
diff --git a/modules/PowerManagement_1-1/module.c b/modules/PowerManagement_1-1/module.c
index 94feab6..f2b7ea9 100644
--- a/modules/PowerManagement_1-1/module.c
+++ b/modules/PowerManagement_1-1/module.c
@@ -36,7 +36,7 @@ static void _moduleIsrCallback(EXTDriver* extp, expchannel_t channel) {
   (void)extp;
 
   chSysLockFromISR();
-  chEvtBroadcastFlagsI(&aos.events.io.source, (1 << channel));
+  chEvtBroadcastFlagsI(&aos.events.io, (1 << channel));
   chSysUnlockFromISR();
 
   return;
@@ -355,7 +355,20 @@ apalGpio_t moduleGpioChargeEn2 = {
  */
 /*===========================================================================*/
 
-apalControlGpio_t moduleSsspPd = {
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
+const char* moduleShellPrompt = "PowerManagement";
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Startup Shutdown Synchronization Protocol (SSSP)
+ * @{
+ */
+/*===========================================================================*/
+
+apalControlGpio_t moduleSsspGpioPd = {
   /* GPIO */ &moduleGpioSysPd,
   /* meta */ {
     /* active state */ APAL_GPIO_ACTIVE_LOW,
@@ -364,7 +377,7 @@ apalControlGpio_t moduleSsspPd = {
   },
 };
 
-apalControlGpio_t moduleSsspSync = {
+apalControlGpio_t moduleSsspGpioSync = {
   /* GPIO */ &moduleGpioSysSync,
   /* meta */ {
     /* active state */ APAL_GPIO_ACTIVE_LOW,
@@ -373,8 +386,6 @@ apalControlGpio_t moduleSsspSync = {
   },
 };
 
-const char* moduleShellPrompt = "PowerManagement";
-
 /** @} */
 
 /*===========================================================================*/
@@ -857,7 +868,7 @@ static int _utShellCmdCb_AlldMpr121(BaseSequentialStream* stream, int argc, char
 static ut_mpr121data_t _utAlldMpr121Data= {
   /* MPR121 driver  */ &moduleLldTouch,
   /* timeout        */ MICROSECONDS_PER_SECOND,
-  /* event source   */ &aos.events.io.source,
+  /* event source   */ &aos.events.io,
   /* event flags    */ (1 << MODULE_GPIO_EXTCHANNEL_TOUCHINT),
 };
 aos_unittest_t moduleUtAlldMpr121 = {
@@ -1119,7 +1130,7 @@ static int _utShellCmdCb_AlldVcnl4020(BaseSequentialStream* stream, int argc, ch
 static ut_vcnl4020data_t _utAlldVcnl4020Data = {
   /* driver       */ NULL,
   /* timeout      */ MICROSECONDS_PER_SECOND,
-  /* event source */ &aos.events.io.source,
+  /* event source */ &aos.events.io,
   /* event flags  */ 0,
 };
 aos_unittest_t moduleUtAlldVcnl4020 = {
diff --git a/modules/PowerManagement_1-1/module.h b/modules/PowerManagement_1-1/module.h
index a8185dd..49f66b1 100644
--- a/modules/PowerManagement_1-1/module.h
+++ b/modules/PowerManagement_1-1/module.h
@@ -422,39 +422,31 @@ extern apalGpio_t moduleGpioChargeEn2;
  */
 #define MODULE_OS_IOEVENTFLAGS_SYSUARTUP        ((eventflags_t)1 << MODULE_GPIO_EXTCHANNEL_SYSUARTUP)
 
-/**
- * @brief   PD signal for SSSP.
- */
-extern apalControlGpio_t moduleSsspPd;
-
-/**
- * @brief   SYNC signal for SSSP.
- */
-extern apalControlGpio_t moduleSsspSync;
-
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
 /**
  * @brief   Shell prompt text.
  */
 extern const char* moduleShellPrompt;
+#endif
 
 /**
  * @brief   Unit test initialization hook.
  */
 #define MODULE_INIT_TESTS() {                                                 \
   /* add unit-test shell commands */                                          \
-  aosShellAddCommand(aos.shell, &moduleUtAdcVsys.shellcmd);                   \
-  aosShellAddCommand(aos.shell, &moduleUtAlldAt24c01bn.shellcmd);             \
-  aosShellAddCommand(aos.shell, &moduleUtAlldBq24103a.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldBq27500.shellcmd);               \
-  aosShellAddCommand(aos.shell, &moduleUtAlldBq27500Bq24103a.shellcmd);       \
-  aosShellAddCommand(aos.shell, &moduleUtAlldIna219.shellcmd);                \
-  aosShellAddCommand(aos.shell, &moduleUtAlldMpr121.shellcmd);                \
-  aosShellAddCommand(aos.shell, &moduleUtAlldPca9544a.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldPklcs1212e4001.shellcmd);        \
-  aosShellAddCommand(aos.shell, &moduleUtAlldLed.shellcmd);                   \
-  aosShellAddCommand(aos.shell, &moduleUtAlldTps62113.shellcmd);              \
-  aosShellAddCommand(aos.shell, &moduleUtAlldTps62113Ina219.shellcmd);        \
-  aosShellAddCommand(aos.shell, &moduleUtAlldVcnl4020.shellcmd);              \
+  aosShellAddCommand(&aos.shell, &moduleUtAdcVsys.shellcmd);                  \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldAt24c01bn.shellcmd);            \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldBq24103a.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldBq27500.shellcmd);              \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldBq27500Bq24103a.shellcmd);      \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldIna219.shellcmd);               \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldMpr121.shellcmd);               \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldPca9544a.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldPklcs1212e4001.shellcmd);       \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldLed.shellcmd);                  \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113.shellcmd);             \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113Ina219.shellcmd);       \
+  aosShellAddCommand(&aos.shell, &moduleUtAlldVcnl4020.shellcmd);             \
 }
 
 /**
@@ -489,15 +481,6 @@ extern const char* moduleShellPrompt;
 }
 
 /**
- * @brief   Hook to handle IO events during SSSP startup synchronization.
- */
-#define MODULE_SSP_STARTUP_OUTRO_IO_EVENT(mask, flags) {                      \
-  /* ignore all events */                                                     \
-  (void)mask;                                                                 \
-  (void)flags;                                                                \
-}
-
-/**
  * @brief   Periphery communication interface deinitialization hook.
  */
 #define MODULE_SHUTDOWN_PERIPHERY_COMM() {                                    \
@@ -515,6 +498,44 @@ extern const char* moduleShellPrompt;
 
 /*===========================================================================*/
 /**
+ * @name Startup Shutdown Synchronization Protocol (SSSP)
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief   PD signal GPIO.
+ */
+extern apalControlGpio_t moduleSsspGpioPd;
+
+/**
+ * @brief   SYNC signal GPIO.
+ */
+extern apalControlGpio_t moduleSsspGpioSync;
+
+/**
+ * @brief   Event flags for PD signal events.
+ */
+#define MODULE_SSSP_EVENTFLAGS_PD               MODULE_OS_IOEVENTFLAGS_SYSPD
+
+/**
+ * @brief   Event flags for Sync signal events.
+ */
+#define MODULE_SSSP_EVENTFLAGS_SYNC             MODULE_OS_IOEVENTFLAGS_SYSSYNC
+
+/**
+ * @brief   Hook to handle IO events during SSSP startup synchronization.
+ */
+#define MODULE_SSSP_STARTUP_OSINIT_OUTRO_IOEVENT_HOOK(mask, flags) {          \
+  /* ignore all events */                                                     \
+  (void)mask;                                                                 \
+  (void)flags;                                                                \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/**
  * @name Low-level drivers
  * @{
  */
diff --git a/os/amiroos.h b/os/amiroos.h
index 0dd1a9a..74ccb53 100644
--- a/os/amiroos.h
+++ b/os/amiroos.h
@@ -54,20 +54,24 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /** @} */
 
-/* core headers */
+/* subsystems headers */
 #include <aosconf.h>
 #include <hal.h>
+#if defined(HAL_USE_QEI) && (HAL_USE_QEI == TRUE)
 #include <hal_qei.h>
+#endif
 #include <ch.h>
 
+/* configuration check */
 #if !defined(_AMIRO_OS_CFG_)
 #error "invalid AMiRo-OS configuration file"
 #endif
 #if (_AMIRO_OS_CFG_VERSION_MAJOR_ != AMIROOS_VERSION_MAJOR) || (_AMIRO_OS_CFG_VERSION_MINOR_ < AMIROOS_VERSION_MINOR)
 #error "incompatible AMiRo-OS configuration file"
 #endif
-
 #include "core/inc/aos_confcheck.h"
+
+/* core headers */
 #include "core/inc/aos_debug.h"
 #include <core/inc/aos_iostream.h>
 #include "core/inc/aos_shell.h"
diff --git a/os/core/inc/aos_confcheck.h b/os/core/inc/aos_confcheck.h
index 06dd4cd..520a72d 100644
--- a/os/core/inc/aos_confcheck.h
+++ b/os/core/inc/aos_confcheck.h
@@ -25,14 +25,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * Kernel parameters and options
  */
 
-#ifndef AMIROOS_CFG_SSSP_MASTER
-  #error "AMIROOS_CFG_SSSP_MASTER not defined in aosconf.h"
-#endif
-
-#ifndef AMIROOS_CFG_SSSP_SYSSYNCPERIOD
-  #error "AMIROOS_CFG_SSSP_SYSSYNCPERIOD not defined in aosconf.h"
-#endif
-
 #ifndef AMIROOS_CFG_DBG
   #error "AMIROOS_CFG_DBG not defined in aosconf.h"
 #endif
@@ -50,6 +42,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #endif
 
 /*
+ * SSSP parameters and options
+ */
+
+#ifndef AMIROOS_CFG_SSSP_MASTER
+  #error "AMIROOS_CFG_SSSP_MASTER not defined in aosconf.h"
+#endif
+
+#ifndef AMIROOS_CFG_SSSP_SYSSYNCPERIOD
+  #error "AMIROOS_CFG_SSSP_SYSSYNCPERIOD not defined in aosconf.h"
+#endif
+
+/*
  * System shell options
  */
 
diff --git a/os/core/inc/aos_system.h b/os/core/inc/aos_system.h
index 579676f..bd4382c 100644
--- a/os/core/inc/aos_system.h
+++ b/os/core/inc/aos_system.h
@@ -103,10 +103,16 @@ typedef enum aos_ssspstage {
  * @brief   AMiRo-OS base system structure.
  */
 typedef struct aos_system {
+
   /**
-   * @brief   Current SSSP stage of the system.
+   * @brief   SSSP relevant data.
    */
-  aos_ssspstage_t ssspStage;
+  struct {
+    /**
+     * @brief   Current SSSP stage of the system.
+     */
+    aos_ssspstage_t stage;
+  } sssp;
 
   /**
    * @brief   System I/O stream.
@@ -119,41 +125,21 @@ typedef struct aos_system {
   struct {
 
     /**
-     * @brief   I/O related events.
+     * @brief   I/O event source.
      */
-    struct {
-      /**
-       * @brief   I/O event source.
-       */
-      event_source_t source;
-
-      /**
-       * @brief   Event flags emitted when a PD signal interrupt occurs.
-       */
-      eventflags_t flagsSignalPd;
-
-      /**
-       * @brief   Event flags emitted when a Sync signal interrupt occurs.
-       */
-      eventflags_t flagsSignalSync;
-    } io;
+    event_source_t io;
 
     /**
-     * @brief   Operating system events.
+     * @brief   OS event source.
      */
-    struct {
-      /**
-       * @brief   OS event source.
-       */
-      event_source_t source;
-    } os;
+    event_source_t os;
   } events;
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
   /**
    * @brief   Pointer to the shell object.
    */
-  aos_shell_t* shell;
+  aos_shell_t shell;
 #endif
 
 } aos_system_t;
@@ -171,7 +157,11 @@ extern aos_system_t aos;
 #ifdef __cplusplus
 extern "C" {
 #endif
-  void aosSysInit(EXTDriver* extDrv, EXTConfig* extCfg, apalControlGpio_t* gpioPd, apalControlGpio_t* gpioSync, eventflags_t flagsSignalPd, eventflags_t evtFlagsSync, const char* shellPrompt);
+#if (AMIROOS_CFG_SHELL_ENABLE == true)
+  void aosSysInit(const char* shellPrompt);
+#else
+  void aosSysInit(void);
+#endif
   void aosSysStart(void);
   eventmask_t aosSysSsspStartupOsInitSyncCheck(event_listener_t* syncEvtListener);
   void aosSysGetUptimeX(aos_timestamp_t* ut);
diff --git a/os/core/src/aos_iostream.c b/os/core/src/aos_iostream.c
index 1c58b44..8cc5b8f 100644
--- a/os/core/src/aos_iostream.c
+++ b/os/core/src/aos_iostream.c
@@ -21,8 +21,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <aos_debug.h>
 #include <chprintf.h>
 
-
-
 /**
  * @brief   Implementation of the BaseAsynchronousChannel write() method (inherited from BaseSequentialStream).
  */
diff --git a/os/core/src/aos_main.cpp b/os/core/src/aos_main.cpp
index 2d996c0..eee6a32 100644
--- a/os/core/src/aos_main.cpp
+++ b/os/core/src/aos_main.cpp
@@ -29,12 +29,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /**
  * @brief   Event mask to identify I/O events.
  */
-#define _IOEVENT_MASK                           EVENT_MASK(0)
+#define IOEVENT_MASK                            EVENT_MASK(0)
 
 /**
  * @brief   Event mask to identify OS events.
  */
-#define _OSEVENT_MASK                           EVENT_MASK(1)
+#define OSEVENT_MASK                            EVENT_MASK(1)
 
 /**
  * @brief   Listener object for I/O events.
@@ -75,7 +75,12 @@ AMIROOS_CFG_MAIN_EXTRA_STATIC_VARIABLES
  */
 static inline void _unexpectedEventError(eventmask_t mask, eventflags_t flags)
 {
-  aosprintf("unexpected/unknown event recieved. mask: 0x%08X; flags: 0x%08X\n", mask, flags);
+#if (AMIROOS_CFG_DBG == true)
+  aosprintf("unexpected/unknown event received. mask: 0x%08X; flags: 0x%08X\n", mask, flags);
+#else
+  (void)mask;
+  (void)flags;
+#endif
   return;
 }
 
@@ -136,13 +141,11 @@ int main(void)
 #endif
 
   // AMiRo-OS and custom OS additions (if any)
-  aosSysInit(&MODULE_HAL_EXT,
-             &moduleHalExtConfig,
-             &moduleSsspPd,
-             &moduleSsspSync,
-             MODULE_OS_IOEVENTFLAGS_SYSPD,
-             MODULE_OS_IOEVENTFLAGS_SYSSYNC,
-             moduleShellPrompt);
+#if (AMIROOS_CFG_SHELL_ENABLE == true)
+  aosSysInit(moduleShellPrompt);
+#else
+  aosSysInit();
+#endif
 #ifdef MODULE_INIT_OS_EXTRA
   MODULE_INIT_OS_EXTRA();
 #endif
@@ -172,8 +175,8 @@ int main(void)
 #endif
 
   /* event associations */
-  chEvtRegisterMask(&aos.events.io.source, &_eventListenerIO, _IOEVENT_MASK);
-  chEvtRegisterMask(&aos.events.os.source, &_eventListenerOS, _OSEVENT_MASK);
+  chEvtRegisterMask(&aos.events.io, &_eventListenerIO, IOEVENT_MASK);
+  chEvtRegisterMask(&aos.events.os, &_eventListenerOS, OSEVENT_MASK);
 
 #if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5)
 #if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5_ARGS)
@@ -199,7 +202,7 @@ int main(void)
   aosShellChannelInit(&_stdshellchannel, (BaseAsynchronousChannel*)&MODULE_HAL_PROGIF);
   aosShellChannelInputEnable(&_stdshellchannel);
   aosShellChannelOutputEnable(&_stdshellchannel);
-  aosShellStreamAddChannel(&aos.shell->stream, &_stdshellchannel);
+  aosShellStreamAddChannel(&aos.shell.stream, &_stdshellchannel);
 #endif
 #endif
 
@@ -236,7 +239,7 @@ int main(void)
 #endif
 #endif
 
-  /* SSSP startup outro (end of startup stage 2) synchronization */
+  /* SSSP startup OS synchronization phase (end of startup stage 2) */
   while ((eventmask = aosSysSsspStartupOsInitSyncCheck(&_eventListenerIO)) != 0) {
     /*
      * This code is executed if the received event was not about the SYS_SYNC control signal.
@@ -245,8 +248,8 @@ int main(void)
     // unexpected IO events
     if (eventmask & _eventListenerIO.events) {
       eventflags = chEvtGetAndClearFlags(&_eventListenerIO);
-#ifdef MODULE_SSP_STARTUP_OUTRO_IO_EVENT
-      MODULE_SSP_STARTUP_OUTRO_IO_EVENT(eventmask, eventflags);
+#ifdef MODULE_SSSP_STARTUP_OSINIT_OUTRO_IOEVENT_HOOK
+      MODULE_SSSP_STARTUP_OSINIT_OUTRO_IOEVENT_HOOK(eventmask, eventflags);
 #else
       _unexpectedEventError(eventmask, eventflags);
 #endif
@@ -256,13 +259,10 @@ int main(void)
       eventflags = chEvtGetAndClearFlags(&_eventListenerOS);
       _unexpectedEventError(eventmask, eventflags);
     }
-#if (AMIROOS_CFG_DBG == true)
     // unknown event (must never occur, thus disabled for release builds)
     else {
-      eventflags = 0;
       _unexpectedEventError(eventmask, eventflags);
     }
-#endif
   }
 
 #if defined(AMIROOS_CFG_MAIN_INIT_HOOK_8)
@@ -309,11 +309,11 @@ int main(void)
 
     switch (eventmask) {
       // if this was an I/O event
-      case _IOEVENT_MASK:
+      case IOEVENT_MASK:
         // evaluate flags
         eventflags = chEvtGetAndClearFlags(&_eventListenerIO);
         // PD event
-        if (eventflags & MODULE_OS_IOEVENTFLAGS_SYSPD) {
+        if (eventflags & MODULE_SSSP_EVENTFLAGS_PD) {
           shutdown = AOS_SHUTDOWN_PASSIVE;
         }
         // all other events
@@ -325,7 +325,7 @@ int main(void)
         break;
 
       // if this was an OS event
-      case _OSEVENT_MASK:
+      case OSEVENT_MASK:
         // evaluate flags
         eventflags = chEvtGetAndClearFlags(&_eventListenerOS);
         switch (eventflags) {
diff --git a/os/core/src/aos_system.c b/os/core/src/aos_system.c
index 24fa977..30a9bba 100644
--- a/os/core/src/aos_system.c
+++ b/os/core/src/aos_system.c
@@ -54,16 +54,6 @@ static int _shellcmd_kerneltestcb(BaseSequentialStream* stream, int argc, char*
 #endif /* AMIROOS_CFG_TESTS_ENABLE == true */
 
 /**
- * @brief   PD signal GPIO.
- */
-static apalControlGpio_t* _gpioPd;
-
-/**
- * @brief   Sync signal GPIO.
- */
-static apalControlGpio_t* _gpioSync;
-
-/**
  * @brief   Timer to accumulate system uptime.
  */
 static virtual_timer_t _systimer;
@@ -92,11 +82,6 @@ static aos_timestamp_t _syssynctime;
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
 /**
- * @brief   System shell.
- */
-static aos_shell_t _shell;
-
-/**
  * @brief   Shell thread working area.
  */
 THD_WORKING_AREA(_shell_wa, AMIROOS_CFG_SHELL_STACKSIZE);
@@ -153,29 +138,7 @@ static aos_shellcommand_t _shellcmd_kerneltest = {
 /**
  * @brief   Global system object.
  */
-aos_system_t aos = {
-  /* SSSP stage       */ AOS_SSSP_STARTUP_2_1,
-  /* I/O stream       */ {
-    /* channel          */ NULL,
-  },
-  /* event            */ {
-    /* I/O              */ {
-      /* source           */ {
-        /* next listener    */ NULL,
-      },
-      /* flagsSignalPd    */ 0,
-      /* flagsSignalSync  */ 0,
-    },
-    /* OS               */ {
-      /* source           */ {
-        /* next listener    */ NULL,
-      }
-    },
-  },
-#if (AMIROOS_CFG_SHELL_ENABLE == true)
-  /* shell            */ &_shell,
-#endif
-};
+aos_system_t aos;
 
 /**
  * @brief   Print a separator line.
@@ -328,25 +291,25 @@ static int _shellcmd_configcb(BaseSequentialStream* stream, int argc, char* argv
           if (argc > 3) {
             // handle the option
             if (strcmp(argv[3], "text") == 0) {
-              aos.shell->config &= ~AOS_SHELL_CONFIG_PROMPT_MINIMAL;
+              aos.shell.config &= ~AOS_SHELL_CONFIG_PROMPT_MINIMAL;
               retval = AOS_OK;
             }
             else if (strcmp(argv[3], "minimal") == 0) {
-              aos.shell->config |= AOS_SHELL_CONFIG_PROMPT_MINIMAL;
+              aos.shell.config |= AOS_SHELL_CONFIG_PROMPT_MINIMAL;
               retval = AOS_OK;
             }
             else if (strcmp(argv[3], "notime") == 0) {
-              aos.shell->config &= ~(AOS_SHELL_CONFIG_PROMPT_UPTIME | AOS_SHELL_CONFIG_PROMPT_DATETIME);
+              aos.shell.config &= ~(AOS_SHELL_CONFIG_PROMPT_UPTIME | AOS_SHELL_CONFIG_PROMPT_DATETIME);
               retval = AOS_OK;
             }
             else if (strcmp(argv[3], "uptime") == 0) {
-              aos.shell->config &= ~AOS_SHELL_CONFIG_PROMPT_DATETIME;
-              aos.shell->config |= AOS_SHELL_CONFIG_PROMPT_UPTIME;
+              aos.shell.config &= ~AOS_SHELL_CONFIG_PROMPT_DATETIME;
+              aos.shell.config |= AOS_SHELL_CONFIG_PROMPT_UPTIME;
               retval = AOS_OK;
             }
             else if (strcmp(argv[3], "date&time") == 0) {
-              aos.shell->config &= ~AOS_SHELL_CONFIG_PROMPT_UPTIME;
-              aos.shell->config |= AOS_SHELL_CONFIG_PROMPT_DATETIME;
+              aos.shell.config &= ~AOS_SHELL_CONFIG_PROMPT_UPTIME;
+              aos.shell.config |= AOS_SHELL_CONFIG_PROMPT_DATETIME;
               retval = AOS_OK;
             }
             else {
@@ -360,11 +323,11 @@ static int _shellcmd_configcb(BaseSequentialStream* stream, int argc, char* argv
           // there must be a further argument
           if (argc > 3) {
             if (strcmp(argv[3], "casesensitive") == 0) {
-              aos.shell->config |= AOS_SHELL_CONFIG_MATCH_CASE;
+              aos.shell.config |= AOS_SHELL_CONFIG_MATCH_CASE;
               retval = AOS_OK;
             }
             else if (strcmp(argv[3], "caseinsensitive") == 0) {
-              aos.shell->config &= ~AOS_SHELL_CONFIG_MATCH_CASE;
+              aos.shell.config &= ~AOS_SHELL_CONFIG_MATCH_CASE;
               retval = AOS_OK;
             }
           }
@@ -374,9 +337,9 @@ static int _shellcmd_configcb(BaseSequentialStream* stream, int argc, char* argv
       else {
         chprintf(stream, "current shell configuration:\n");
         chprintf(stream, "  prompt text:   %s\n",
-                 (aos.shell->prompt != NULL) ? aos.shell->prompt : "n/a");
+                 (aos.shell.prompt != NULL) ? aos.shell.prompt : "n/a");
         char time[10];
-        switch (aos.shell->config & (AOS_SHELL_CONFIG_PROMPT_UPTIME | AOS_SHELL_CONFIG_PROMPT_DATETIME)) {
+        switch (aos.shell.config & (AOS_SHELL_CONFIG_PROMPT_UPTIME | AOS_SHELL_CONFIG_PROMPT_DATETIME)) {
           case AOS_SHELL_CONFIG_PROMPT_UPTIME:
             strcpy(time, "uptime"); break;
           case AOS_SHELL_CONFIG_PROMPT_DATETIME:
@@ -385,12 +348,12 @@ static int _shellcmd_configcb(BaseSequentialStream* stream, int argc, char* argv
             strcpy(time, "no time"); break;
         }
         chprintf(stream, "  prompt style:  %s, %s\n",
-                 (aos.shell->config & AOS_SHELL_CONFIG_PROMPT_MINIMAL) ? "minimal" : "text",
+                 (aos.shell.config & AOS_SHELL_CONFIG_PROMPT_MINIMAL) ? "minimal" : "text",
                  time);
         chprintf(stream, "  input method:  %s\n",
-                 (aos.shell->config & AOS_SHELL_CONFIG_INPUT_OVERWRITE) ? "replace" : "insert");
+                 (aos.shell.config & AOS_SHELL_CONFIG_INPUT_OVERWRITE) ? "replace" : "insert");
         chprintf(stream, "  text matching: %s\n",
-                 (aos.shell->config & AOS_SHELL_CONFIG_MATCH_CASE) ? "case sensitive" : "case insensitive");
+                 (aos.shell.config & AOS_SHELL_CONFIG_MATCH_CASE) ? "case sensitive" : "case insensitive");
         retval = AOS_OK;
       }
     }
@@ -536,22 +499,22 @@ static int _shellcmd_shutdowncb(BaseSequentialStream* stream, int argc, char* ar
   // handle argument
   else {
     if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--hibernate") == 0) {
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_HIBERNATE);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_HIBERNATE);
       chThdTerminate(currp);
       return AOS_OK;
     }
     else if (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "--deepsleep") == 0) {
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_DEEPSLEEP);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_DEEPSLEEP);
       chThdTerminate(currp);
       return AOS_OK;
     }
     else if (strcmp(argv[1], "-t") == 0 || strcmp(argv[1], "--transportation") == 0) {
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_TRANSPORTATION);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_TRANSPORTATION);
       chThdTerminate(currp);
       return AOS_OK;
     }
     else if (strcmp(argv[1], "-r") == 0 || strcmp(argv[1], "--restart") == 0) {
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_RESTART);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_RESTART);
       chThdTerminate(currp);
       return AOS_OK;
     }
@@ -598,10 +561,9 @@ static int _shellcmd_kerneltestcb(BaseSequentialStream* stream, int argc, char*
 static void _signalPdCallback(EXTDriver* extp, expchannel_t channel)
 {
   (void)extp;
-  (void)channel;
 
   chSysLockFromISR();
-  chEvtBroadcastFlagsI(&aos.events.io.source, aos.events.io.flagsSignalPd);
+  chEvtBroadcastFlagsI(&aos.events.io, (1 << channel));
   chSysUnlockFromISR();
 
   return;
@@ -616,11 +578,10 @@ static void _signalPdCallback(EXTDriver* extp, expchannel_t channel)
 static void _signalSyncCallback(EXTDriver* extp, expchannel_t channel)
 {
   (void)extp;
-  (void)channel;
 
 #if (AMIROOS_CFG_SSSP_MASTER == true)
   chSysLockFromISR();
-  chEvtBroadcastFlagsI(&aos.events.io.source, aos.events.io.flagsSignalSync);
+  chEvtBroadcastFlagsI(&aos.events.io, (1 << channel));
   chSysUnlockFromISR();
 #else
   apalControlGpioState_t s_state;
@@ -630,9 +591,9 @@ static void _signalSyncCallback(EXTDriver* extp, expchannel_t channel)
   // get current uptime
   aosSysGetUptimeX(&uptime);
   // read signal S
-  apalControlGpioGet(_gpioSync, &s_state);
+  apalControlGpioGet(&moduleSsspGpioSync, &s_state);
   // if S was toggled from on to off during SSSP operation phase
-  if (aos.ssspStage == AOS_SSSP_OPERATION && s_state == APAL_GPIO_OFF) {
+  if (aos.sssp.stage == AOS_SSSP_OPERATION && s_state == APAL_GPIO_OFF) {
     // align the uptime with the synchronization period
     if (uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD < AMIROOS_CFG_SSSP_SYSSYNCPERIOD / 2) {
       _uptime -= uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD;
@@ -641,7 +602,7 @@ static void _signalSyncCallback(EXTDriver* extp, expchannel_t channel)
     }
   }
   // broadcast event
-  chEvtBroadcastFlagsI(&aos.events.io.source, aos.events.io.flagsSignalSync);
+  chEvtBroadcastFlagsI(&aos.events.io, (1 << channel));
   chSysUnlockFromISR();
 #endif
 
@@ -686,9 +647,9 @@ static void _sysSyncTimerCallback(void* par)
 
   chSysLockFromISR();
   // read and toggle signal S
-  apalControlGpioGet(_gpioSync, &s_state);
+  apalControlGpioGet(&moduleSsspGpioSync, &s_state);
   s_state = (s_state == APAL_GPIO_ON) ? APAL_GPIO_OFF : APAL_GPIO_ON;
-  apalControlGpioSet(_gpioSync, s_state);
+  apalControlGpioSet(&moduleSsspGpioSync, s_state);
   // if S was toggled from off to on
   if (s_state == APAL_GPIO_ON) {
     // reconfigure the timer precisely, because the logically falling edge (next interrupt) snychronizes the system time
@@ -711,35 +672,18 @@ static void _sysSyncTimerCallback(void* par)
  * @brief   AMiRo-OS system initialization.
  * @note    Must be called from the system control thread (usually main thread).
  *
- * @param[in] extDrv        Pointer to the interrupt driver.
- * @param[in] extCfg        Configuration for the interrupt driver.
- * @param[in] gpioPd        GPIO of the PD signal.
- * @param[in] gpioSync      GPIO of the Sync signal
- * @param[in] evtFlagsPd    Event flags to be set when a PD interrupt occurs.
- * @param[in] evtFlagsSync  Event flags to be set when a Sync interrupt occurs.
  * @param[in] shellPrompt   String to be printed as prompt of the system shell.
- * @param[in] stdio         Default (usually physically) interface for I/O like shell.
  */
-void aosSysInit(EXTDriver* extDrv,
-                EXTConfig* extCfg,
-                apalControlGpio_t* gpioPd,
-                apalControlGpio_t* gpioSync,
-                eventflags_t evtFlagsPd,
-                eventflags_t evtFlagsSync,
-                const char* shellPrompt)
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
+void aosSysInit(const char* shellPrompt)
+#else
+void aosSysInit(void)
+#endif
 {
-  // check arguments
-  aosDbgCheck(extDrv != NULL);
-  aosDbgCheck(extCfg != NULL);
-  aosDbgCheck(gpioPd != NULL);
-  aosDbgCheck(gpioSync != NULL);
-
   // set control thread to maximum priority
   chThdSetPriority(AOS_THD_CTRLPRIO);
 
   // set local variables
-  _gpioPd = gpioPd;
-  _gpioSync = gpioSync;
   chVTObjectInit(&_systimer);
   _synctime = 0;
   _uptime = 0;
@@ -749,36 +693,33 @@ void aosSysInit(EXTDriver* extDrv,
 #endif
 
   // set aos configuration
-  aos.ssspStage = AOS_SSSP_STARTUP_2_1;
+  aos.sssp.stage = AOS_SSSP_STARTUP_2_1;
+  aos.sssp.moduleId = 0;
   aosIOStreamInit(&aos.iostream);
-  chEvtObjectInit(&aos.events.io.source);
-  chEvtObjectInit(&aos.events.os.source);
-  aos.events.io.flagsSignalPd = evtFlagsPd;
-  aos.events.io.flagsSignalSync = evtFlagsSync;
+  chEvtObjectInit(&aos.events.io);
+  chEvtObjectInit(&aos.events.os);
 
   // setup external interrupt system
-  extCfg->channels[gpioPd->gpio->pad].cb = _signalPdCallback;
-  extCfg->channels[gpioSync->gpio->pad].cb = _signalSyncCallback;
-  extStart(extDrv, extCfg);
+  moduleHalExtConfig.channels[moduleSsspGpioPd.gpio->pad].cb = _signalPdCallback;
+  moduleHalExtConfig.channels[moduleSsspGpioSync.gpio->pad].cb = _signalSyncCallback;
+  extStart(&MODULE_HAL_EXT, &moduleHalExtConfig);
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true)
   // init shell
-  aosShellInit(aos.shell,
-               &aos.events.os.source,
+  aosShellInit(&aos.shell,
+               &aos.events.os,
                shellPrompt,
                _shell_line,
                AMIROOS_CFG_SHELL_LINEWIDTH,
                _shell_arglist,
                AMIROOS_CFG_SHELL_MAXARGS);
   // add system commands
-  aosShellAddCommand(aos.shell, &_shellcmd_config);
-  aosShellAddCommand(aos.shell, &_shellcmd_info);
-  aosShellAddCommand(aos.shell, &_shellcmd_shutdown);
+  aosShellAddCommand(&aos.shell, &_shellcmd_config);
+  aosShellAddCommand(&aos.shell, &_shellcmd_info);
+  aosShellAddCommand(&aos.shell, &_shellcmd_shutdown);
 #if (AMIROOS_CFG_TESTS_ENABLE == true)
-  aosShellAddCommand(aos.shell, &_shellcmd_kerneltest);
+  aosShellAddCommand(&aos.shell, &_shellcmd_kerneltest);
 #endif
-#else
-  (void)shellPrompt;
 #endif
 
   return;
@@ -790,7 +731,7 @@ void aosSysInit(EXTDriver* extDrv,
 inline void aosSysStart(void)
 {
   // update the system SSSP stage
-  aos.ssspStage = AOS_SSSP_OPERATION;
+  aos.sssp.stage = AOS_SSSP_OPERATION;
 
   // print system information;
   _printSystemInfo((BaseSequentialStream*)&aos.iostream);
@@ -798,7 +739,7 @@ inline void aosSysStart(void)
 
 #if (AMIROOS_CFG_SHELL_ENABLE == true)
   // start system shell thread
-  aos.shell->thread = chThdCreateStatic(_shell_wa, sizeof(_shell_wa), AMIROOS_CFG_SHELL_THREADPRIO, aosShellThread, aos.shell);
+  aos.shell.thread = chThdCreateStatic(_shell_wa, sizeof(_shell_wa), AMIROOS_CFG_SHELL_THREADPRIO, aosShellThread, &aos.shell);
 #endif
 
   return;
@@ -822,21 +763,21 @@ eventmask_t aosSysSsspStartupOsInitSyncCheck(event_listener_t* syncEvtListener)
   apalControlGpioState_t s;
 
   // update the system SSSP stage
-  aos.ssspStage = AOS_SSSP_STARTUP_2_2;
+  aos.sssp.stage = AOS_SSSP_STARTUP_2_2;
 
   // deactivate the sync signal to indicate that the module is ready (SSSPv1 stage 2.1 of startup phase)
-  apalControlGpioSet(_gpioSync, APAL_GPIO_OFF);
+  apalControlGpioSet(&moduleSsspGpioSync, APAL_GPIO_OFF);
 
   // wait for any event to occur (do not apply any filter in order not to miss any event)
   m = chEvtWaitOne(ALL_EVENTS);
   f = chEvtGetAndClearFlags(syncEvtListener);
-  apalControlGpioGet(_gpioSync, &s);
+  apalControlGpioGet(&moduleSsspGpioSync, &s);
 
   // if the event was a system event,
   //   and it was fired because of the SysSync control signal,
   //   and the SysSync control signal has been deactivated
   if (m & syncEvtListener->events &&
-      f == aos.events.io.flagsSignalSync &&
+      f == MODULE_SSSP_EVENTFLAGS_SYNC &&
       s == APAL_GPIO_OFF) {
     chSysLock();
 #if (AMIROOS_CFG_SSSP_MASTER == true)
@@ -922,36 +863,36 @@ void aosSysShutdownInit(aos_shutdown_t shutdown)
 #endif
 
   // update the system SSSP stage
-  aos.ssspStage = AOS_SSSP_SHUTDOWN_1_1;
+  aos.sssp.stage = AOS_SSSP_SHUTDOWN_1_1;
 
   // activate the SYS_PD control signal only, if this module initiated the shutdown
   chSysLock();
   if (shutdown != AOS_SHUTDOWN_PASSIVE) {
-    apalControlGpioSet(_gpioPd, APAL_GPIO_ON);
+    apalControlGpioSet(&moduleSsspGpioPd, APAL_GPIO_ON);
   }
   // activate the SYS_SYNC signal
-  apalControlGpioSet(_gpioSync, APAL_GPIO_ON);
+  apalControlGpioSet(&moduleSsspGpioSync, APAL_GPIO_ON);
   chSysUnlock();
 
   switch (shutdown) {
     case AOS_SHUTDOWN_PASSIVE:
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_SHUTDOWN);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_SHUTDOWN);
       aosprintf("shutdown request received...\n");
       break;
     case AOS_SHUTDOWN_HIBERNATE:
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_HIBERNATE);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_HIBERNATE);
       aosprintf("shutdown to hibernate mode...\n");
       break;
     case AOS_SHUTDOWN_DEEPSLEEP:
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_DEEPSLEEP);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_DEEPSLEEP);
       aosprintf("shutdown to deepsleep mode...\n");
       break;
     case AOS_SHUTDOWN_TRANSPORTATION:
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_TRANSPORTATION);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_TRANSPORTATION);
       aosprintf("shutdown to transportation mode...\n");
       break;
     case AOS_SHUTDOWN_RESTART:
-      chEvtBroadcastFlags(&aos.events.os.source, AOS_SYSTEM_EVENTFLAGS_RESTART);
+      chEvtBroadcastFlags(&aos.events.os, AOS_SYSTEM_EVENTFLAGS_RESTART);
       aosprintf("restarting system...\n");
       break;
    // must never occur
@@ -961,7 +902,7 @@ void aosSysShutdownInit(aos_shutdown_t shutdown)
   }
 
   // update the system SSSP stage
-  aos.ssspStage = AOS_SSSP_SHUTDOWN_1_2;
+  aos.sssp.stage = AOS_SSSP_SHUTDOWN_1_2;
 
   return;
 }
@@ -972,7 +913,7 @@ void aosSysShutdownInit(aos_shutdown_t shutdown)
 void aosSysStop(void)
 {
 #if (AMIROOS_CFG_SHELL_ENABLE == true)
-  chThdWait(aos.shell->thread);
+  chThdWait(aos.shell.thread);
 #endif
 
   return;
@@ -1003,7 +944,7 @@ void aosSysShutdownFinal(EXTDriver* extDrv, aos_shutdown_t shutdown)
   extStop(extDrv);
 
   // update the system SSSP stage
-  aos.ssspStage = AOS_SSSP_SHUTDOWN_1_3;
+  aos.sssp.stage = AOS_SSSP_SHUTDOWN_1_3;
 
   // call bootloader callback depending on arguments
   switch (shutdown) {
