]> rtime.felk.cvut.cz Git - arc.git/blob - include/Fee.h
Correct Vendor id for all modules and upstep to AR3.1.5
[arc.git] / include / Fee.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\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
9  *\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
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 \r
17 \r
18 \r
19 \r
20 \r
21 \r
22 \r
23 #ifndef FEE_H_\r
24 #define FEE_H_\r
25 \r
26 #include "Modules.h"\r
27 \r
28 #define FEE_MODULE_ID                   MODULE_ID_FEE\r
29 #define FEE_VENDOR_ID                   VENDOR_ID_ARCCORE\r
30 \r
31 #define FEE_SW_MAJOR_VERSION    1\r
32 #define FEE_SW_MINOR_VERSION    0\r
33 #define FEE_SW_PATCH_VERSION    0\r
34 #define FEE_AR_MAJOR_VERSION    3\r
35 #define FEE_AR_MINOR_VERSION    1\r
36 #define FEE_AR_PATCH_VERSION    5\r
37 \r
38 #include "Std_Types.h"\r
39 #include "Fee_Cfg.h"\r
40 #include "Fls.h"\r
41 \r
42 #if (FEE_DEV_ERROR_DETECT == STD_ON)\r
43 // Error codes reported by this module defined by AUTOSAR\r
44 #define FEE_E_UNINIT                                            0x01\r
45 #define FEE_E_INVALID_BLOCK_NO                          0x02\r
46 #define FEE_E_INVALID_BLOCK_OFS                         0x03\r
47 #define FEE_E_INVALID_DATA_PTR                          0x04\r
48 #define FEE_E_INVALID_BLOCK_LEN                         0x05\r
49 #define FEE_E_BUSY                                                      0x06\r
50 \r
51 \r
52 \r
53 // Other error codes reported by this module\r
54 #define FEE_PARAM_OUT_OF_RANGE                          0x40\r
55 #define FEE_UNEXPECTED_STATE                            0x41\r
56 #define FEE_FLASH_CORRUPT                                       0xfa\r
57 #define FEE_UNEXPECTED_STATUS                           0xfb\r
58 #define FEE_E_WRONG_CONFIG                                      0xfc\r
59 #define FEE_E_UNEXPECTED_EXECUTION                      0xfd\r
60 #define FEE_E_NOT_SUPPORTED                                     0xfe\r
61 #define FEE_E_NOT_IMPLEMENTED_YET                       0xff\r
62 \r
63 // Service ID in this module\r
64 #define FEE_INIT                                                                0x00\r
65 #define FEE_SET_MODE_ID                                                 0x01\r
66 #define FEE_READ_ID                                                             0x02\r
67 #define FEE_WRITE_ID                                                    0x03\r
68 #define FEE_CANCEL_ID                                                   0x04\r
69 #define FEE_GET_STATUS_ID                                               0x05\r
70 #define FEE_GET_JOB_RESULT_ID                                   0x06\r
71 #define FEE_INVALIDATE_BLOCK_ID                                 0x07\r
72 #define FEE_GET_VERSION_INFO_ID                                 0x08\r
73 #define FEE_ERASE_IMMEDIATE_ID                                  0x09\r
74 #define FEE_JOB_END_NOTIFICTION_ID                              0x10\r
75 #define FEE_JOB_ERROR_NOTIFICTION_ID                    0x11\r
76 #define FEE_MAIN_FUNCTION_ID                                    0x12\r
77 \r
78 #define FEE_STARTUP_ID                                                  0x40\r
79 #define FEE_GARBAGE_WRITE_HEADER_ID                             0x41\r
80 #define FEE_GLOBAL_ID                                                   0xff\r
81 \r
82 #endif\r
83 \r
84 \r
85 #if ( FEE_VERSION_INFO_API == STD_ON )\r
86 #define Fee_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi, FEE)  /** @req FEE093 */\r
87 #endif /* FEE_VERSION_INFO_API */\r
88 \r
89 void Fee_MainFunction(void);    /** @req FEE097 */\r
90 \r
91 void Fee_Init(void);    /** @req FEE085 */\r
92 void Fee_SetMode(MemIf_ModeType mode);  /** @req FEE086 */\r
93 Std_ReturnType Fee_Read(uint16 blockNumber, uint16 blockOffset, uint8* dataBufferPtr, uint16 length); /** @req FEE087 */\r
94 Std_ReturnType Fee_Write(uint16 blockNumber, uint8* dataBufferPtr); /** @req FEE088 */\r
95 void Fee_Cancel(void);  /** @req FEE089 */\r
96 MemIf_StatusType Fee_GetStatus(void);   /** @req FEE090 */\r
97 MemIf_JobResultType Fee_GetJobResult(void);     /** @req FEE091 */\r
98 Std_ReturnType Fee_InvalidateBlock(uint16 blockNumber); /** @req FEE092 */\r
99 Std_ReturnType Fee_EraseImmediateBlock(uint16 blockNumber);     /** @req FEE094 */\r
100 \r
101 \r
102 \r
103 #endif /*FEE_H_*/\r