From: mahi Date: Mon, 10 Sep 2012 15:04:55 +0000 (+0200) Subject: Type changes... X-Git-Url: https://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/7b05976b0aa1ec02d6a2cfd20487d16e8a708be5 Type changes... --- diff --git a/include/EcuM_Types.h b/include/EcuM_Types.h index 903c916e..27e7929b 100644 --- a/include/EcuM_Types.h +++ b/include/EcuM_Types.h @@ -41,8 +41,7 @@ #include "Mcu.h" - -#if defined(USE_WDGM) +#if 0 typedef struct EcuM_WdgM { WdgM_SupervisedEntityIdType EcuMSupervisedEntity; @@ -54,6 +53,22 @@ typedef struct EcuM_WdgM } EcuM_WdgMType; #endif +typedef uint8 WdgM_SupervisedEntityIdType_; +typedef uint8 WdgM_ModeType_; + + +#if defined(USE_WDGM) +typedef struct EcuM_WdgM +{ + WdgM_SupervisedEntityIdType_ EcuMSupervisedEntity; + WdgM_ModeType_ EcuMWdgMWakeupMode; + WdgM_ModeType_ EcuMWdgMStartupMode; + WdgM_ModeType_ EcuMWdgMRunMode; + WdgM_ModeType_ EcuMWdgMPostRunMode; + WdgM_ModeType_ EcuMWdgMShutdownMode; +} EcuM_WdgMType; +#endif + typedef struct EcuM_WakeupSourceConfig { EcuM_WakeupSourceType EcuMWakeupSourceId; uint32 EcuMValidationTimeout; @@ -68,7 +83,7 @@ typedef struct EcuM_SleepMode EcuM_WakeupSourceType EcuMWakeupSourceMask; Mcu_ModeType EcuMSleepModeMcuMode; #if defined(USE_WDGM) - WdgM_ModeType EcuMSleepModeWdgMMode; + WdgM_ModeType_ EcuMSleepModeWdgMMode; #endif } EcuM_SleepModeType; diff --git a/include/Gpt.h b/include/Gpt.h index 9879842d..ab33f867 100644 --- a/include/Gpt.h +++ b/include/Gpt.h @@ -24,7 +24,12 @@ #define GPT_H_ #include "Std_Types.h" -//#include "EcuM.h" mahi: What for ??? + +/* "forward" declare types due to circular dependency chain */ +/** Channel id type */ +typedef uint8_t Gpt_ChannelType; + +#include "EcuM.h" /** @name Error Codes */ //@{ @@ -54,9 +59,6 @@ #define GPT_CBK_CHECKWAKEUP_SERVICE_ID 0x0c //@} -/** Channel id type */ -typedef uint8_t Gpt_ChannelType; - /** Channel time value type */ typedef uint32_t Gpt_ValueType; diff --git a/include/WdgM.h b/include/WdgM.h index ad12445d..bc8de2cd 100644 --- a/include/WdgM.h +++ b/include/WdgM.h @@ -25,6 +25,10 @@ #define WDGM_SW_MINOR_VERSION 0 #define WDGM_SW_PATCH_VERSION 0 +/* "forward" declare types due to circular dependency chain */ +typedef uint8 WdgM_SupervisedEntityIdType; +typedef uint8 WdgM_ModeType; + #include "Std_Types.h" #include "WdgM_Cfg.h" diff --git a/system/SchM/SchM_WdgM.h b/system/SchM/SchM_WdgM.h new file mode 100644 index 00000000..9c46e76d --- /dev/null +++ b/system/SchM/SchM_WdgM.h @@ -0,0 +1,25 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_WDGM_H_ +#define SCHM_WDGM_H_ + +#define SCHM_MAINFUNCTION_WDGM_TRIGGER() SCHM_MAINFUNCTION(WDGM_TRIGGER,WdgM_MainFunction_Trigger()) +#define SCHM_MAINFUNCTION_WDGM_ALIVESUPERVISON() SCHM_MAINFUNCTION(WDGM_ALIVESUPERVISON,WdgM_MainFunction_AliveSupervision()) + +#define SCHM_MAINFUNCTION_WDGM() SCHM_MAINFUNCTION(WDGM,Dcm_MainFunction()) + +#endif /* SCHM_WDGM_H_ */