]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Added EA module.
authorjoek <devnull@localhost>
Mon, 20 Jun 2011 19:16:30 +0000 (21:16 +0200)
committerjoek <devnull@localhost>
Mon, 20 Jun 2011 19:16:30 +0000 (21:16 +0200)
boards/board_common.mk
boards/linux/build_config.mk
boards/mpc5516it/config/Eep_Cfg.h
boards/mpc5606s_xpc560s/config/Eep_Cfg.h
include/Ea.h
include/Ea_Cbk.h
include/Ea_Types.h [new file with mode: 0644]
include/Eep_ConfigTypes.h

index e92d18269c651d0950e0ccf3a65290e9b286f91b..15190cb5ed3c768c7901c9fabd5b249af13b35be 100644 (file)
@@ -40,6 +40,10 @@ obj-$(USE_ECUM) += EcuM_Callout_template.o
 inc-$(USE_ECUM) += $(ROOTDIR)/system/EcuM\r
 vpath-$(USE_ECUM) += $(ROOTDIR)/system/EcuM\r
 \r
+#Ea\r
+obj-$(USE_EA) += Ea.o\r
+vpath-$(USE_EA) += $(ROOTDIR)/memory/Ea\r
+\r
 # Gpt\r
 obj-$(USE_GPT) += Gpt.o\r
 obj-$(USE_GPT) += Gpt_Cfg.o\r
index 6b4c611ec1a06c079bb8156b64435cdd210b85b7..205765f0403a7edf0a49b22ab635f72194ede6a5 100644 (file)
@@ -11,7 +11,7 @@ CFG= BRD_LINUX
 \r
 # What buildable modules does this board have, \r
 # default or private\r
-MOD_AVAIL+=COM PDUR WDGM WDGIF DET DCM DEM CANTP CANIF RTE FEE NVM ECUM MCU\r
+MOD_AVAIL+=COM PDUR WDGM WDGIF DET DCM DEM CANTP CANIF RTE FEE NVM ECUM MCU EA\r
 # Network management\r
 MOD_AVAIL+=COMM NM CANNM CANSM\r
 \r
index 05f1fdedddb5dc1d444006f6f810e917a834cb10..fbe9a9d583167722ab843a97a6487a8b6b64fc73 100644 (file)
@@ -18,6 +18,7 @@
 #define EEP_CFG_H_
 
 
+#define EEP_USES_EXTERNAL_DRIVER
 
 #include "Spi.h"
 #include "Eep_ConfigTypes.h"
index 05f1fdedddb5dc1d444006f6f810e917a834cb10..fbe9a9d583167722ab843a97a6487a8b6b64fc73 100644 (file)
@@ -18,6 +18,7 @@
 #define EEP_CFG_H_
 
 
+#define EEP_USES_EXTERNAL_DRIVER
 
 #include "Spi.h"
 #include "Eep_ConfigTypes.h"
index a78cf0abe4a36dec87af59784154486293969533..f30f854f900d11a0c45f5ed8e0df3ea55a4fb01a 100644 (file)
  * -------------------------------- Arctic Core ------------------------------*/\r
 \r
 \r
-\r
-\r
-\r
-\r
-\r
-\r
 #ifndef EA_H_\r
 #define EA_H_\r
 \r
-#include "Ea_Cfg.h"\r
-\r
-\r
 #define EA_MODULE_ID                   MODULE_ID_EA\r
 #define EA_VENDOR_ID                   1\r
 \r
 #define EA_AR_MINOR_VERSION    0\r
 #define EA_AR_PATCH_VERSION    1\r
 \r
+#include "Eep.h"\r
+#include "Ea_Cfg.h"\r
+\r
+/*\r
+       DESCRIPTION:\r
+               API parameter checking\r
+*/\r
+/** @req EA010 */\r
+#define EA_E_INVALID_BLOCK_NO          0x02\r
+/** @req EA017 */\r
+#define EA_E_BUSY              0x21\r
+\r
+/*\r
+       DESCRIPTION:\r
+               EA Module Service ID Macro Collection\r
+*/\r
+#define EA_INIT_ID                                     0x00\r
+#define EA_SETMODE_ID                          0x01\r
+#define EA_READ_ID                             0x02\r
+#define EA_WRITE_ID                            0x03\r
+#define EA_CANCEL_ID                           0x04\r
+#define EA_GETSTATUS_ID                        0x05\r
+#define EA_GETJOBRESULT_ID                     0x06\r
+#define EA_INVALIDATEBLOCK_ID          0x07\r
+#define EA_GETVERSIONINFO_ID           0x08\r
+#define EA_ERASEIMMEDIATEBLOCK_ID      0x09\r
+#define EA_MAIN_ID                                     0x12\r
+\r
 #if ( EA_VERSION_INFO_API == STD_ON )\r
 #define Ea_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi, EA)   /** @req EA092 */\r
 #endif /* EA_VERSION_INFO_API */\r
index dcea49700e381b992dcebbc2a1c46f1ef2d4ef9d..90ab1e749109e8579fc7bb5f9f083c48062ca2e8 100644 (file)
 \r
 \r
 \r
-\r
-\r
-\r
-\r
-\r
 #ifndef EA_CBK_H_\r
 #define EA_CBK_H_\r
 \r
+/** @req EA114 */\r
 void Ea_JobEndNotification(void);      /** @req EA094 */\r
 void Ea_JobErrorNotification(void);    /** @req EA095 */\r
 \r
diff --git a/include/Ea_Types.h b/include/Ea_Types.h
new file mode 100644 (file)
index 0000000..64cbe38
--- /dev/null
@@ -0,0 +1,36 @@
+/* -------------------------------- 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 EA_TYPES_H_\r
+#define EA_TYPES_H_\r
+\r
+#include "Std_Types.h"\r
+\r
+/*\r
+       ITEM NAME:              <Ea_JobType>\r
+       SCOPE:                  <EA Module>\r
+       DESCRIPTION:\r
+               define all job in EA module     \r
+*/\r
+typedef enum \r
+{      \r
+       EA_JOB_NONE,\r
+       EA_JOB_COMPARE,\r
+       EA_JOB_ERASE,\r
+       EA_JOB_READ,\r
+       EA_JOB_WRITE,\r
+} Ea_JobType;\r
+\r
+#endif\r
index 9816c47e25a3c137093fe7d6f7b3ffa257d6ad45..fae2a5ab708d047503820008c9df566f3bc9fe75 100644 (file)
@@ -12,6 +12,7 @@
  * EepSpiReference:                            1..*  Ref to SPI sequence\r
  */\r
 \r
+#if defined(EEP_USES_EXTERNAL_DRIVER)\r
 typedef struct {\r
   /* Reference to SPI sequence (required for external EEPROM drivers).\r
    *\r
@@ -54,8 +55,8 @@ typedef struct {
   Spi_ChannelType EepCmdChannel;\r
   Spi_ChannelType EepDataChannel;\r
   Spi_ChannelType EepWrenChannel;\r
-\r
 } Eep_ExternalDriverType;\r
+#endif\r
 \r
 \r
 /* STD container : EepInitConfiguration\r
@@ -109,8 +110,9 @@ typedef struct {
   // This parameter is the EEPROM page size, i.e. number of bytes.\r
   Eep_LengthType EepPageSize;\r
 \r
+#if defined(EEP_USES_EXTERNAL_DRIVER)\r
   Eep_ExternalDriverType *externalDriver;\r
-\r
+#endif\r
 } Eep_ConfigType;\r
 \r
 \r