commit cda1472944648652764c6980f5ee3f3e91459ef3
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Mon Oct 28 11:15:03 2019 +0100

    Major SSSP overhaul:
    - SSSP no works even without Bootloader (AMiRo-OS implements startup and shutdown phases)
    - MSI and calendar synchronization are currently not available (WIP)
    - lots of minor changes

diff --git a/modules/LightRing_1-0/module.h b/modules/LightRing_1-0/module.h
index 93ee58d..30f47b1 100644
--- a/modules/LightRing_1-0/module.h
+++ b/modules/LightRing_1-0/module.h
@@ -166,53 +166,52 @@ extern ROMCONST apalControlGpio_t moduleGpioSysSync;
 /**
  * @brief   Event flag to be set on a LASER_OC interrupt.
  */
-#define MODULE_OS_IOEVENTFLAGS_LASEROC          AOS_IOEVENT_FLAG(PAL_PAD(LINE_LASER_OC_N))
+#define MODULE_OS_GPIOEVENTFLAG_LASEROC         AOS_GPIOEVENT_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(PAL_PAD(LINE_SYS_UART_DN))
+#define MODULE_OS_GPIOEVENTFLAG_SYSUARTDN       AOS_GPIOEVENT_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(PAL_PAD(LINE_WL_GDO2))
+#define MODULE_OS_GPIOEVENTFLAG_WLGDO2          AOS_GPIOEVENT_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(PAL_PAD(LINE_WL_GDO0))
+#define MODULE_OS_GPIOEVENTFLAG_WLGDO0          AOS_GPIOEVENT_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(PAL_PAD(LINE_SYS_PD_N))
+#define MODULE_OS_GPIOEVENTFLAG_SYSPD           AOS_GPIOEVENT_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(PAL_PAD(LINE_SYS_INT_N))
+#define MODULE_OS_GPIOEVENTFLAG_SYSSYNC         AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
 
-#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
+#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
 /**
  * @brief   Shell prompt text.
  */
 extern ROMCONST char* moduleShellPrompt;
-#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
+#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */
 
 /**
  * @brief   Interrupt initialization macro.
- * @note    SSSP related interrupt signals are already initialized in 'aos_system.c'.
  */
 #define MODULE_INIT_INTERRUPTS() {                                            \
   /* LASER_OC */                                                              \
-  palSetLineCallback(moduleGpioLaserOc.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioLaserOc.gpio->line);  \
+  palSetLineCallback(moduleGpioLaserOc.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioLaserOc.gpio->line);  \
   palEnableLineEvent(moduleGpioLaserOc.gpio->line, APAL2CH_EDGE(moduleGpioLaserOc.meta.edge));                  \
   /* WL_GDO2 */                                                               \
-  palSetLineCallback(moduleGpioWlGdo2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioWlGdo2.gpio->line);  \
+  palSetLineCallback(moduleGpioWlGdo2.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioWlGdo2.gpio->line);  \
   palEnableLineEvent(moduleGpioWlGdo2.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo2.meta.edge));                  \
   /* WL_GDO0 */                                                               \
-  palSetLineCallback(moduleGpioWlGdo0.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioWlGdo0.gpio->line);  \
+  palSetLineCallback(moduleGpioWlGdo0.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioWlGdo0.gpio->line);  \
   /*palEnableLineEvent(moduleGpioWlGdo0.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo0.meta.edge)); // this is broken for some reason*/  \
 }
 
@@ -220,7 +219,7 @@ extern ROMCONST char* moduleShellPrompt;
  * @brief   Test initialization hook.
  */
 #define MODULE_INIT_TESTS() {                                                 \
-  /* initialize tests and add to shell */                                     \
+  /* add test commands to shell */                                            \
   aosShellAddCommand(&aos.shell, &moduleTestAt24c01bShellCmd);                \
   aosShellAddCommand(&aos.shell, &moduleTestTlc5947ShellCmd);                 \
   aosShellAddCommand(&aos.shell, &moduleTestTps2051bdbvShellCmd);             \
@@ -240,12 +239,16 @@ extern ROMCONST char* moduleShellPrompt;
   /* SPI */                                                                   \
   spiStart(&MODULE_HAL_SPI_LIGHT, &moduleHalSpiLightConfig);                  \
   spiStart(&MODULE_HAL_SPI_WL, &moduleHalSpiWlConfig);                        \
+  /* CAN */                                                                   \
+  canStart(&MODULE_HAL_CAN, &moduleHalCanConfig);                             \
 }
 
 /**
  * @brief   Periphery communication interface deinitialization hook.
  */
 #define MODULE_SHUTDOWN_PERIPHERY_IF() {                                      \
+  /* CAN */                                                                   \
+  canStop(&MODULE_HAL_CAN);                                                   \
   /* SPI */                                                                   \
   spiStop(&MODULE_HAL_SPI_LIGHT);                                             \
   spiStop(&MODULE_HAL_SPI_WL);                                                \
@@ -263,35 +266,39 @@ extern ROMCONST char* moduleShellPrompt;
  */
 /*===========================================================================*/
 
+#if (AMIROOS_CFG_SSSP_ENABLE == true) || defined(__DOXYGEN__)
+
 /**
  * @brief   PD signal GPIO.
  */
-#define moduleSsspGpioPd                        moduleGpioSysPd
+#define moduleSsspGpioPD                        moduleGpioSysPd
 
 /**
- * @brief   SYNC signal GPIO.
+ * @brief   S signal GPIO.
  */
-#define moduleSsspGpioSync                      moduleGpioSysSync
+#define moduleSsspGpioS                         moduleGpioSysSync
 
 /**
  * @brief   DN signal GPIO.
  */
-#define moduleSsspGpioDn                        moduleGpioSysUartDn
+#define moduleSsspGpioDN                        moduleGpioSysUartDn
 
 /**
- * @brief   Event flags for PD signal events.
+ * @brief   Event flag for PD signal events.
  */
-#define MODULE_SSSP_EVENTFLAGS_PD               MODULE_OS_IOEVENTFLAGS_SYSPD
+#define MODULE_SSSP_EVENTFLAG_PD                MODULE_OS_GPIOEVENTFLAG_SYSPD
 
 /**
- * @brief   Event flags for SYNC signal events.
+ * @brief   Event flag for S signal events.
  */
-#define MODULE_SSSP_EVENTFLAGS_SYNC             MODULE_OS_IOEVENTFLAGS_SYSSYNC
+#define MODULE_SSSP_EVENTFLAG_S                 MODULE_OS_GPIOEVENTFLAG_SYSSYNC
 
 /**
- * @brief   Event flags for DN signal events.
+ * @brief   Event flag for DN signal events.
  */
-#define MODULE_SSSP_EVENTFLAGS_DN               MODULE_OS_IOEVENTFLAGS_SYSUARTDN
+#define MODULE_SSSP_EVENTFLAG_DN                MODULE_OS_GPIOEVENTFLAG_SYSUARTDN
+
+#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */
 
 /** @} */
 
