]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Updated for service ports
authormahi <devnull@localhost>
Thu, 16 Feb 2012 12:36:42 +0000 (13:36 +0100)
committermahi <devnull@localhost>
Thu, 16 Feb 2012 12:36:42 +0000 (13:36 +0100)
include/EcuM.h

index cbd337a9003d7ab2d97b7340689a5fb4a33e11ee..e75f5d1922a5270ac46787254f85b803de609e93 100644 (file)
 #if defined(USE_COM)\r
 #include "ComStack_Types.h"\r
 #endif\r
-#if defined(USE_RTE)\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
+\r
 \r
 /** @name Error Codes */\r
 //@{\r
 #define ECUM_COMM_HASREQUESTEDRUN_ID (0x1b)\r
 #define ECUM_ARC_STARTUPTWO_ID (0x20)\r
 \r
-#if !defined(_DEFINED_TYPEDEF_FOR_EcuM_StateType_)\r
-/** Possible states */\r
-typedef enum {\r
-       ECUM_STATE_APP_RUN = 0x32,\r
-       ECUM_STATE_SHUTDOWN = 0x40,\r
-       ECUM_STATE_WAKEUP = 0x20,\r
-       ECUM_SUBSTATE_MASK = 0x0F,\r
-       ECUM_STATE_WAKEUP_WAKESLEEP = 0x25,\r
-       ECUM_STATE_WAKEUP_ONE = 0x21,\r
-       ECUM_STATE_OFF = 0x80,\r
-       ECUM_STATE_STARTUP = 0x10,\r
-       ECUM_STATE_PREP_SHUTDOWN = 0x44,\r
-       ECUM_STATE_RUN = 0x30,\r
-       ECUM_STATE_STARTUP_TWO = 0x12,\r
-       ECUM_STATE_WAKEUP_TTII = 0x26,\r
-       ECUM_STATE_WAKEUP_VALIDATION = 0x22,\r
-       ECUM_STATE_GO_SLEEP = 0x49,\r
-       ECUM_STATE_STARTUP_ONE = 0x11,\r
-       ECUM_STATE_WAKEUP_TWO = 0x24,\r
-       ECUM_STATE_SLEEP = 0x50,\r
-       ECUM_STATE_WAKEUP_REACTION = 0x23,\r
-       ECUM_STATE_APP_POST_RUN = 0x33,\r
-       ECUM_STATE_GO_OFF_TWO = 0x4e,\r
-       ECUM_STATE_RESET = 0x90,\r
-       ECUM_STATE_GO_OFF_ONE = 0x4d\r
-} EcuM_StateType;\r
-\r
-#define _DEFINED_TYPEDEF_FOR_EcuM_StateType_\r
-\r
-#endif\r
-\r
-typedef uint8 EcuM_UserType;\r
-\r
-enum {\r
-       /** Internal reset of µC (bit 2).\r
-        *  The internal reset typically only resets the µC\r
-        *  core but not peripherals or memory\r
-        *  controllers. The exact behavior is hardware\r
-        *  specific.\r
-        *  This source may also indicate an unhandled\r
-        *  exception. */\r
-       ECUM_WKSOURCE_INTERNAL_RESET = 0x04,\r
-\r
-       /** Reset by external watchdog (bit 4), if\r
-        *  detection supported by hardware */\r
-       ECUM_WKSOURCE_EXTERNAL_WDG = 0x10,\r
-\r
-       /** Reset by internal watchdog (bit 3) */\r
-       ECUM_WKSOURCE_INTERNAL_WDG = 0x08,\r
-\r
-       /** Power cycle (bit 0) */\r
-       ECUM_WKSOURCE_POWER = 0x01,\r
-\r
-       /** ~0 to the power of 29 */\r
-       ECUM_WKSOURCE_ALL_SOURCES = 0x3FFFFFFF,\r
-\r
-       /** Hardware reset (bit 1).\r
-        *  If hardware cannot distinguish between a\r
-        *  power cycle and a reset reason, then this\r
-        *  shall be the default wakeup source */\r
-       ECUM_WKSOURCE_RESET = 0x02\r
-};\r
-\r
-typedef uint32 EcuM_WakeupSourceType;\r
-\r
-typedef enum\r
-{\r
-       ECUM_WKSTATUS_NONE = 0,        /**< No pending wakeup event was detected */\r
-       ECUM_WKSTATUS_PENDING = 1,     /**< The wakeup event was detected but not yet validated */\r
-       ECUM_WKSTATUS_VALIDATED = 2,   /**< The wakeup event is valid */\r
-       ECUM_WKSTATUS_EXPIRED = 3     /**< The wakeup event has not been validated and has expired therefore */\r
-} EcuM_WakeupStatusType;\r
-\r
-typedef enum\r
-{\r
-       ECUM_WWKACT_RUN = 0,       /**< Initialization into RUN state */\r
-       ECUM_WKACT_TTII = 2,       /**< Execute time triggered increased inoperation protocol and shutdown */\r
-       ECUM_WKACT_SHUTDOWN = 3   /**< Immediate shutdown */\r
-} EcuM_WakeupReactionType;\r
-\r
-#if !defined(_DEFINED_TYPEDEF_FOR_EcuM_BootTargetType_)\r
-typedef enum\r
-{\r
-       ECUM_BOOT_TARGET_APP = 0,          /**< The Ecu will boot into the application */\r
-       ECUM_BOOT_TARGET_BOOTLOADER = 1   /**< The Ecu will boot into the bootloader */\r
-} EcuM_BootTargetType;\r
-#define _DEFINED_TYPEDEF_FOR_EcuM_BootTargetType_\r
-#endif\r
-\r
 \r
 #define ECUM_MODULE_ID                 MODULE_ID_ECUM\r
 #define ECUM_VENDOR_ID                 1\r