* API and type definitions for ECU State Manager.\r
*/\r
\r
+/*\r
+ * Include structure:\r
+ *\r
+ *\r
+ *\r
+ * Rte_Type.h --> Std_Types.h\r
+ * ^ ^\r
+ * | |\r
+ * Rte_EcuM.h <-- EcuM_Types.h*\r
+ * ^ ^\r
+ * | | /-----> EcuM_Cfg.h\r
+ * | | /------> EcuM_Generated_Types.h\r
+ * | | / (Holds EcuM_ConfigType and includes all BSW modules )\r
+ * | | /-------> EcuM_Cbk.h\r
+ * | | / (want types EcuM_WakeupSourceType, EcuM_ConfigType *, EcuM_WakeupSourceType , EcuM_WakeupReactionType )\r
+ * | |/\r
+ * | EcuM.h <----- EcuM_Callout_Stubs.c\r
+ * | ^ \--- EcuM_PBCfg.c\r
+ * | |\r
+ * | |\r
+ * `---------- EcuM_xxx.c ---> Memmap.h\r
+ * \-> Det.h, Dem.h\r
+ *\r
+ * *) Only ifdef CFG_ECUM_USE_SERVICE_COMPONENT\r
+ *\r
+ * Problems:\r
+ * - Can_Cfg.h can include just "EcuM_Cbk.h"...\r
+ * .. it will need at EcuM.h.. problem is that EcuM.h includes EcuM_Cbk.h\r
+ * - Most BSW modules uses DEM that in Dem_Types.h will include "Rte_Type.h"\r
+ * (if enabled by CFG_DEM_USE_RTE)\r
+ *\r
+ * - EcuM_Generated_Types.h is quite crappy since it includes the\r
+ *\r
+ * Changes:\r
+ * - EcuM_Cfg.h , must not include ANY include files.\r
+ * - EcuM_Pbcfg.c must include "EcuM_Generated_Types.h"\r
+ * - EcuM.c, etc must include "EcuM_Generated_Types.h"\r
+ * --> The GOOD, we keep circular include from EcuM_Generated_Types.h\r
+ *\r
+ *\r
+ *\r
+ */\r
+\r
+\r
#ifndef ECUM_H_\r
#define ECUM_H_\r
\r
#define ECUM_AR_MINOR_VERSION 2\r
#define ECUM_AR_PATCH_VERSION 2\r
\r
+\r
#include "EcuM_Cfg.h"\r
+#include "EcuM_Types.h"\r
+#include "EcuM_Cbk.h"\r
\r
#if defined(USE_COM)\r
#include "ComStack_Types.h"\r
#endif\r
-#if (ECUM_USE_SERVICE_PORTS == STD_ON) && defined(USE_RTE)\r
-#include "Rte_Type.h"\r
-#endif\r
\r
-#include "EcuM_Types.h"\r
+#if defined(USE_COMM)\r
+#include "ComM.h"\r
+#endif\r
\r
\r
/** @name Error Codes */\r
#define ECUM_GETAPPMODE_ID (0x11)\r
#define ECUM_SELECT_BOOTARGET_ID (0x12)\r
#define ECUM_GET_BOOTARGET_ID (0x13)\r
+#define ECUM_VALIDATE_WAKEUP_EVENT_ID 0x14\r
#define ECUM_MAINFUNCTION_ID (0x18)\r
#define ECUM_COMM_HASREQUESTEDRUN_ID (0x1b)\r
#define ECUM_ARC_STARTUPTWO_ID (0x20)\r
#define ECUM_AR_MINOR_VERSION 2\r
#define ECUM_AR_PATCH_VERSION 2\r
\r
-#include "EcuM_Cfg.h"\r
+//#include "EcuM_Cfg.h"\r
\r
#if ( ECUM_VERSION_INFO_API == STD_ON)\r
#define EcuM_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,ECUM)\r
Std_ReturnType EcuM_GetLastShutdownTarget(EcuM_StateType* shutdownTarget, uint8* sleepMode);\r
\r
EcuM_WakeupSourceType EcuM_GetPendingWakeupEvents(void);\r
-void EcuM_ClearWakeupEvent(EcuM_WakeupSourceType sources);\r
+void EcuM_ClearWakeupEvent(EcuM_WakeupSourceType source );\r
EcuM_WakeupSourceType EcuM_GetValidatedWakeupEvents(void);\r
EcuM_WakeupSourceType EcuM_GetExpiredWakeupEvents(void);\r
EcuM_WakeupStatusType EcuM_GetStatusOfWakeupSource(EcuM_WakeupSourceType sources);\r
Std_ReturnType EcuM_SelectBootTarget(EcuM_BootTargetType target);\r
Std_ReturnType EcuM_GetBootTarget(EcuM_BootTargetType* target);\r
\r
+void EcuM_SetWakeupEvent(EcuM_WakeupSourceType sources);\r
+\r
void EcuM_MainFunction(void);\r
\r
+\r
#endif /*ECUM_H_*/\r
/** @} */\r