]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Added default wdg conf for 5606
authorjcar <devnull@localhost>
Sat, 18 Jun 2011 12:24:16 +0000 (14:24 +0200)
committerjcar <devnull@localhost>
Sat, 18 Jun 2011 12:24:16 +0000 (14:24 +0200)
boards/board_common.mk
boards/mpc5606s_xpc560s/config/Wdg_Cfg.h [new file with mode: 0644]
boards/mpc5606s_xpc560s/config/Wdg_Lcfg.c [new file with mode: 0644]

index dc4ad1709b96a48d0aeeb0fbb355a3ac9ba7fc91..e92d18269c651d0950e0ccf3a65290e9b286f91b 100644 (file)
@@ -121,7 +121,7 @@ vpath-y += $(ROOTDIR)/peripherals
 \r
 #Wdg\r
 obj-$(USE_WDG) += Wdg.o\r
-#obj-$(USE_WDG) += Wdg_Lcfg.o\r
+obj-$(USE_WDG) += Wdg_Lcfg.o\r
 \r
 #WdgIf\r
 obj-$(USE_WDGIF) += WdgIf.o\r
diff --git a/boards/mpc5606s_xpc560s/config/Wdg_Cfg.h b/boards/mpc5606s_xpc560s/config/Wdg_Cfg.h
new file mode 100644 (file)
index 0000000..29c26c4
--- /dev/null
@@ -0,0 +1,45 @@
+/* -------------------------------- Arctic Core ------------------------------\r
+ * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
+ *\r
+ * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
+ *\r
+ * This source code is free software; you can redistribute it and/or modify it\r
+ * under the terms of the GNU General Public License version 2 as published by the\r
+ * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
+ * for more details.\r
+ * -------------------------------- Arctic Core ------------------------------*/\r
+\r
+#ifndef WDG_CFG_H_\r
+#define WDG_CFG_H_\r
+\r
+#include "Std_Types.h"\r
+#include "WdgIf_Types.h"\r
+\r
+typedef struct\r
+{\r
+   uint32 ReloadValue;\r
+   uint8 ActivationBit;\r
+}Wdg_SettingsType;\r
+\r
+typedef struct\r
+{\r
+       WdgIf_ModeType Wdg_DefaultMode;\r
+       Wdg_SettingsType WdgSettingsFast;\r
+       Wdg_SettingsType WdgSettingsSlow;\r
+       Wdg_SettingsType WdgSettingsOff;\r
+}Wdg_ModeConfigType;\r
+\r
+typedef struct\r
+{\r
+       const Wdg_GeneralType    *Wdg_General;\r
+       const Wdg_ModeConfigType *Wdg_ModeConfig;\r
+}Wdg_ConfigType;\r
+\r
+ extern const Wdg_GeneralType WdgGeneral;\r
+ extern const Wdg_ConfigType WdgConfig;\r
+\r
+#endif /* WDG_CFG_H_ */\r
diff --git a/boards/mpc5606s_xpc560s/config/Wdg_Lcfg.c b/boards/mpc5606s_xpc560s/config/Wdg_Lcfg.c
new file mode 100644 (file)
index 0000000..b948ed6
--- /dev/null
@@ -0,0 +1,52 @@
+/* -------------------------------- Arctic Core ------------------------------\r
+ * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
+ *\r
+ * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
+ *\r
+ * This source code is free software; you can redistribute it and/or modify it\r
+ * under the terms of the GNU General Public License version 2 as published by the\r
+ * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
+ * for more details.\r
+ * -------------------------------- Arctic Core ------------------------------*/\r
+\r
+#include "Wdg.h"\r
+\r
+const Wdg_ModeConfigType WdgModeConfig =\r
+{\r
+       .Wdg_DefaultMode = WDGIF_OFF_MODE,\r
+       .WdgSettingsFast =\r
+       {\r
+               .ReloadValue = 0x200,\r
+               .ActivationBit = 1,\r
+       },\r
+       .WdgSettingsSlow =\r
+       {\r
+               .ReloadValue = 0x7D00,\r
+               .ActivationBit = 1,\r
+       },\r
+       .WdgSettingsOff =\r
+       {\r
+               .ReloadValue = 0x7D00,\r
+               .ActivationBit = 0,\r
+       },\r
+};\r
+\r
+const Wdg_GeneralType WdgGeneral =\r
+{\r
+       .Wdg_Index = 1,\r
+       .Wdg_TriggerLocationPtr = Wdg_Trigger,\r
+       .Wdg_SetModeLocationPtr = Wdg_SetMode,\r
+};\r
+\r
+\r
+const Wdg_ConfigType WdgConfig =\r
+{\r
+  .Wdg_General = &WdgGeneral,\r
+  .Wdg_ModeConfig = &WdgModeConfig,\r
+};\r
+\r
+\r