]> rtime.felk.cvut.cz Git - arc.git/blob - boards/mpc5606b_xpc560b/config/Eep_Cfg.h
added 5606b support(5607b should be mostly the exact same so added that for linkfile...
[arc.git] / boards / mpc5606b_xpc560b / config / Eep_Cfg.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16
17 #ifndef EEP_CFG_H_
18 #define EEP_CFG_H_
19
20
21 #define EEP_USES_EXTERNAL_DRIVER
22
23 #include "Spi.h"
24 #include "Eep_ConfigTypes.h"
25
26
27 // M95256 or 25LC160B
28 #define E2_WREN   0x6           // Write Enable 0000 0110
29 #define E2_WRDI   0x4           // Write Disable 0000 0100
30 #define E2_RDSR   0x5           // Read Status Register  0000 0101
31                                                                                                         // 1 - Read data
32 #define E2_WRSR   0x1           // Write Status Register  0000 0001
33                                                                                                         // 1 - Write data
34 #define E2_READ   0x3           // Read from Memory Array 0000 0011
35                                                                                                         // 1  - Write 16-bit address
36                                                                                                         // n  - 8 -bit read data
37 #define E2_WRITE  0x2           // WRITE  Write to Memory Array  0000 0010
38                                                                                                         // 1  Write 16-bit address
39                                                                                                         // n  - 8-bit reads
40
41 /* EepGeneral */
42
43 // Switches to activate or deactivate interrupt controlled job processing. true:
44 // Interrupt controlled job processing enabled. false: Interrupt controlled job
45 // processing disabled.
46 #define EEP_USE_INTERRUPTS                            STD_OFF
47
48 // Pre-processor switch to enable and disable development error detection.
49 // true: Development error detection enabled. false: Development error
50 // detection disabled.
51 #define EEP_DEV_ERROR_DETECT                  STD_ON
52
53 // Pre-processor switch to enable / disable the API to read out the modules
54 // version information. true: Version info API enabled. false: Version info API
55 // disabled.
56 #define EEP_VERSION_INFO_API                  STD_ON
57
58 // ndex of the driver, used by EA.
59 #define EEP_DRIVER_INDEX                                1
60
61 // Switches to activate or deactivate write cycle reduction (EEPROM value is
62 // read and compared before being overwritten). true: Write cycle reduction
63 // enabled. false: Write cycle reduction disabled.
64 #define EEP_WRITE_CYCLE_REDUCTION         STD_OFF
65
66 // Container for runtime configuration parameters of the EEPROM driver.
67 // Implementation Type: Eep_ConfigType.
68
69 /*  EepPublishedInformation
70  */
71
72 // Total size of EEPROM in bytes. Implementation Type: Eep_LengthType.
73 #define EEP_TOTAL_SIZE                          TBD
74
75 // Size of smallest erasable EEPROM data unit in bytes.
76 #define EEP_ERASE_UNIT_SIZE             TBD
77
78 // EepMinimumLengthType {EEP_MINIMUM_LENGTH_TYPE}
79 // Minimum expected size of Eep_LengthType.
80 #define EEP_MINIMUM_LENGTH_TYPE         TBD
81
82 // Minimum expected size of Eep_AddressType.
83 #define EEP_MINIMUM_ADDRESS_TYPE        TBD
84
85 // Size of smallest writable EEPROM data unit in bytes.
86 #define EEP_WRITE_UNIT_SIZE             TBD
87
88 // Value of an erased EEPROM cell.
89 #define EEP_ERASE_VALUE                         0
90
91 // Number of erase cycles specified for the EEP device (usually given in the
92 // device data sheet).
93 #define EEP_SPECIFIED_ERASE_CYCLES      TBD
94
95 // Size of smallest readable EEPROM data unit in bytes.
96 #define EEP_READ_UNIT_SIZE                      TBD
97
98 // Time for writing one EEPROM data unit.(float)
99 #define EEP_WRITE_TIME                          TBD
100
101 // Time for erasing one EEPROM data unit (float)
102 #define EEP_ERASE_TIME                          TBD
103
104 // Specified maximum number of write cycles under worst case conditions of
105 // specific EEPROM hardware (e.g. +90°C)
106 #define EEP_ALLOWED_WRITE_CYCLES x
107
108
109 extern const Eep_ConfigType EepConfigData[];
110
111 #define EEP_DEFAULT_CONFIG EepConfigData[0]
112
113 #endif /*EEP_CFG_H_*/