1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
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>.
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
14 * -------------------------------- Arctic Core ------------------------------*/
21 #define EEP_USES_EXTERNAL_DRIVER
24 #include "Eep_ConfigTypes.h"
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
32 #define E2_WRSR 0x1 // Write Status Register 0000 0001
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
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
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
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
56 #define EEP_VERSION_INFO_API STD_ON
58 // ndex of the driver, used by EA.
59 #define EEP_DRIVER_INDEX 1
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
66 // Container for runtime configuration parameters of the EEPROM driver.
67 // Implementation Type: Eep_ConfigType.
69 /* EepPublishedInformation
72 // Total size of EEPROM in bytes. Implementation Type: Eep_LengthType.
73 #define EEP_TOTAL_SIZE TBD
75 // Size of smallest erasable EEPROM data unit in bytes.
76 #define EEP_ERASE_UNIT_SIZE TBD
78 // EepMinimumLengthType {EEP_MINIMUM_LENGTH_TYPE}
79 // Minimum expected size of Eep_LengthType.
80 #define EEP_MINIMUM_LENGTH_TYPE TBD
82 // Minimum expected size of Eep_AddressType.
83 #define EEP_MINIMUM_ADDRESS_TYPE TBD
85 // Size of smallest writable EEPROM data unit in bytes.
86 #define EEP_WRITE_UNIT_SIZE TBD
88 // Value of an erased EEPROM cell.
89 #define EEP_ERASE_VALUE 0
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
95 // Size of smallest readable EEPROM data unit in bytes.
96 #define EEP_READ_UNIT_SIZE TBD
98 // Time for writing one EEPROM data unit.(float)
99 #define EEP_WRITE_TIME TBD
101 // Time for erasing one EEPROM data unit (float)
102 #define EEP_ERASE_TIME TBD
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
109 extern const Eep_ConfigType EepConfigData[];
111 #define EEP_DEFAULT_CONFIG EepConfigData[0]
113 #endif /*EEP_CFG_H_*/