1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
27 #define FEE_MODULE_ID MODULE_ID_FEE
\r
28 #define FEE_VENDOR_ID 1
\r
30 #define FEE_SW_MAJOR_VERSION 1
\r
31 #define FEE_SW_MINOR_VERSION 0
\r
32 #define FEE_SW_PATCH_VERSION 0
\r
33 #define FEE_AR_MAJOR_VERSION 3
\r
34 #define FEE_AR_MINOR_VERSION 0
\r
35 #define FEE_AR_PATCH_VERSION 1
\r
37 #include "Std_Types.h"
\r
38 #include "Fee_Cfg.h"
\r
41 #if (FEE_DEV_ERROR_DETECT == STD_ON)
\r
42 // Error codes reported by this module defined by AUTOSAR
\r
43 #define FEE_E_UNINIT 0x01
\r
44 #define FEE_E_INVALID_BLOCK_NO 0x02
\r
45 #define FEE_E_INVALID_BLOCK_OFS 0x03
\r
46 #define FEE_E_INVALID_DATA_PTR 0x04
\r
47 #define FEE_E_INVALID_BLOCK_LEN 0x05
\r
48 #define FEE_E_BUSY 0x06
\r
52 // Other error codes reported by this module
\r
53 #define FEE_PARAM_OUT_OF_RANGE 0x40
\r
54 #define FEE_UNEXPECTED_STATE 0x41
\r
55 #define FEE_FLASH_CORRUPT 0xfa
\r
56 #define FEE_UNEXPECTED_STATUS 0xfb
\r
57 #define FEE_E_WRONG_CONFIG 0xfc
\r
58 #define FEE_E_UNEXPECTED_EXECUTION 0xfd
\r
59 #define FEE_E_NOT_SUPPORTED 0xfe
\r
60 #define FEE_E_NOT_IMPLEMENTED_YET 0xff
\r
62 // Service ID in this module
\r
63 #define FEE_INIT 0x00
\r
64 #define FEE_SET_MODE_ID 0x01
\r
65 #define FEE_READ_ID 0x02
\r
66 #define FEE_WRITE_ID 0x03
\r
67 #define FEE_CANCEL_ID 0x04
\r
68 #define FEE_GET_STATUS_ID 0x05
\r
69 #define FEE_GET_JOB_RESULT_ID 0x06
\r
70 #define FEE_INVALIDATE_BLOCK_ID 0x07
\r
71 #define FEE_GET_VERSION_INFO_ID 0x08
\r
72 #define FEE_ERASE_IMMEDIATE_ID 0x09
\r
73 #define FEE_JOB_END_NOTIFICTION_ID 0x10
\r
74 #define FEE_JOB_ERROR_NOTIFICTION_ID 0x11
\r
75 #define FEE_MAIN_FUNCTION_ID 0x12
\r
77 #define FEE_STARTUP_ID 0x40
\r
78 #define FEE_GARBAGE_WRITE_HEADER_ID 0x41
\r
79 #define FEE_GLOBAL_ID 0xff
\r
84 #if ( FEE_VERSION_INFO_API == STD_ON )
\r
85 #define Fee_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi, FEE) /** @req FEE093 */
\r
86 #endif /* FEE_VERSION_INFO_API */
\r
88 void Fee_MainFunction(void); /** @req FEE097 */
\r
90 void Fee_Init(void); /** @req FEE085 */
\r
91 void Fee_SetMode(MemIf_ModeType mode); /** @req FEE086 */
\r
92 Std_ReturnType Fee_Read(uint16 blockNumber, uint16 blockOffset, uint8* dataBufferPtr, uint16 length); /** @req FEE087 */
\r
93 Std_ReturnType Fee_Write(uint16 blockNumber, uint8* dataBufferPtr); /** @req FEE088 */
\r
94 void Fee_Cancel(void); /** @req FEE089 */
\r
95 MemIf_StatusType Fee_GetStatus(void); /** @req FEE090 */
\r
96 MemIf_JobResultType Fee_GetJobResult(void); /** @req FEE091 */
\r
97 Std_ReturnType Fee_InvalidateBlock(uint16 blockNumber); /** @req FEE092 */
\r
98 Std_ReturnType Fee_EraseImmediateBlock(uint16 blockNumber); /** @req FEE094 */
\r