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
23 #warning "This default file may only be used as an example!"
\r
32 // Switches to activate or deactivate interrupt controlled job processing. true:
\r
33 // Interrupt controlled job processing enabled. false: Interrupt controlled job
\r
34 // processing disabled.
\r
35 #define EEP_USE_INTERRUPTS STD_OFF
\r
37 // Pre-processor switch to enable and disable development error detection.
\r
38 // true: Development error detection enabled. false: Development error
\r
39 // detection disabled.
\r
40 #define EEP_DEV_ERROR_DETECT STD_ON
\r
42 // Pre-processor switch to enable / disable the API to read out the modules
\r
43 // version information. true: Version info API enabled. false: Version info API
\r
45 #define EEP_VERSION_INFO_API STD_ON
\r
47 // ndex of the driver, used by EA.
\r
48 #define EEP_DRIVER_INDEX 1
\r
50 // Switches to activate or deactivate write cycle reduction (EEPROM value is
\r
51 // read and compared before being overwritten). true: Write cycle reduction
\r
52 // enabled. false: Write cycle reduction disabled.
\r
53 #define EEP_WRITE_CYCLE_REDUCTION STD_OFF
\r
55 // Container for runtime configuration parameters of the EEPROM driver.
\r
56 // Implementation Type: Eep_ConfigType.
\r
58 /* EepPublishedInformation
\r
65 // Total size of EEPROM in bytes. Implementation Type: Eep_LengthType.
\r
66 #define EEP_TOTAL_SIZE TBD
\r
68 // Size of smallest erasable EEPROM data unit in bytes.
\r
69 #define EEP_ERASE_UNIT_SIZE TBD
\r
71 // EepMinimumLengthType {EEP_MINIMUM_LENGTH_TYPE}
\r
72 // Minimum expected size of Eep_LengthType.
\r
73 #define EEP_MINIMUM_LENGTH_TYPE TBD
\r
75 // Minimum expected size of Eep_AddressType.
\r
76 #define EEP_MINIMUM_ADDRESS_TYPE TBD
\r
78 // Size of smallest writable EEPROM data unit in bytes.
\r
79 #define EEP_WRITE_UNIT_SIZE TBD
\r
81 // Value of an erased EEPROM cell.
\r
82 #define EEP_ERASE_VALUE 0
\r
84 // Number of erase cycles specified for the EEP device (usually given in the
\r
85 // device data sheet).
\r
86 #define EEP_SPECIFIED_ERASE_CYCLES TBD
\r
88 // Size of smallest readable EEPROM data unit in bytes.
\r
89 #define EEP_READ_UNIT_SIZE TBD
\r
91 // Time for writing one EEPROM data unit.
\r
92 #define EEP_WRITE_TIME TBD
\r
94 // Time for erasing one EEPROM data unit
\r
95 #define EEP_ERASE_TIME TBD
\r
97 // Specified maximum number of write cycles under worst case conditions of
\r
98 // specific EEPROM hardware (e.g. +90°C)
\r
99 #define EEP_ALLOWED_WRITE_CYCLES x
\r
106 Spi_SequenceType EepCmdSequence;
\r
107 Spi_SequenceType EepCmd2Sequence;
\r
108 Spi_SequenceType EepReadSequence;
\r
109 Spi_SequenceType EepWriteSequence;
\r
111 Spi_ChannelType EepAddrChannel;
\r
112 Spi_ChannelType EepCmdChannel;
\r
113 Spi_ChannelType EepDataChannel;
\r
114 Spi_ChannelType EepWrenChannel;
\r
116 // number of bytes read within one job processing cycle in normal mode.
\r
117 Eep_LengthType EepNormalReadBlockSize;
\r
119 // call cycle of the job processing function during write/erase operations. Unit: [s]
\r
120 float EepJobCallCycle;
\r
122 // This parameter is the used size of EEPROM device in bytes.
\r
123 Eep_LengthType EepSize;
\r
125 // This parameter is a reference to a callback function for positive job result
\r
126 void (*Eep_JobEndNotification)();
\r
128 // This parameter is the default EEPROM device mode after initialization.
\r
129 MemIf_ModeType EepDefaultMode;
\r
131 // This parameter is the number of bytes read within one job processing cycle in fast mode
\r
132 Eep_LengthType EepFastReadBlockSize;
\r
134 // Number of bytes written within one job processing cycle in normal mode.
\r
135 Eep_LengthType EepNormalWriteBlockSize;
\r
137 // This parameter is a reference to a callback function for negative job result
\r
138 void (*Eep_JobErrorNotification)();
\r
140 // This parameter is the number of bytes written within one job processing cycle in fast mode
\r
141 Eep_LengthType EepFastWriteBlockSize;
\r
143 // This parameter is the EEPROM page size, i.e. number of bytes.
144 Eep_LengthType EepPageSize;
146 // This parameter is the EEPROM device base address.
\r
147 Eep_AddressType EepBaseAddress;
\r
150 // This container is present for external EEPROM drivers only. Internal
\r
151 // EEPROM drivers do not use the parameter listed in this container, hence
\r
152 // its multiplicity is 0 for internal drivers.
\r
154 // Reference to SPI sequence (required for external EEPROM drivers).
\r
156 uint32 SpiReference;
\r
157 } Eep_ExternalDriverType;
\r
159 extern const Eep_ConfigType EepConfigData[];
\r
161 #define EEP_DEFAULT_CONFIG EepConfigData[0]
\r
163 #endif /*EEP_CFG_H_*/
\r