4 * Created on: 1 jun 2011
\r
8 #ifndef EEP_CONFIGTYPES_H_
\r
9 #define EEP_CONFIGTYPES_H_
\r
11 /* STD container : EepExternalDriver
\r
12 * EepSpiReference: 1..* Ref to SPI sequence
\r
15 #if defined(EEP_USES_EXTERNAL_DRIVER)
\r
17 /* Reference to SPI sequence (required for external EEPROM drivers).
\r
19 * The 3.0 and 4.0 does things a bit different here
\r
23 * const Eep_ConfigType EepConfigData =
\r
26 * EepCmdChannel = EEP_SPI_CH_COMMAND,
\r
27 * EepAdrChannel = EEP_SPI_CH_ADDRESS,
\r
29 * EepWriteSequence = EEP_SPI_SEQ_WRITE,
\r
36 * Wants the defines generated to Spi_Cfg.h to be used directly as:
\r
37 * #define Spi_EepReadSequence 10
\r
38 * #define Spi_EepReadJob 20
\r
40 * #define Spi_EepChCommand 30
\r
41 * #define Spi_EepChAddress 31
\r
42 * #define Spi_EepChReadData 32
\r
46 // uint32 SpiReference;
\r
49 Spi_SequenceType EepCmdSequence;
\r
50 Spi_SequenceType EepCmd2Sequence;
\r
51 Spi_SequenceType EepReadSequence;
\r
52 Spi_SequenceType EepWriteSequence;
\r
54 Spi_ChannelType EepAddrChannel;
\r
55 Spi_ChannelType EepCmdChannel;
\r
56 Spi_ChannelType EepDataChannel;
\r
57 Spi_ChannelType EepWrenChannel;
\r
58 } Eep_ExternalDriverType;
\r
62 /* STD container : EepInitConfiguration
\r
63 * EepBaseAddress: 1 int
\r
64 * EepDefaultMode: 1 enum MEMIF_MODE_FAST, MEMIF_MODE_SLOW
\r
65 * EepFastReadBlockSize: 1
\r
66 * EepFastWriteBlockSize: 1
\r
67 * EepJobCallCycle: 1 float (not used by config?)
\r
68 * Eep_JobEndNotification 0..1 Function
\r
69 * Eep_JobErrorNotification 0..1 Function
\r
70 * EepNormalReadBlockSize 1 Int
\r
71 * EepNormalWriteBlockSize 1 Int
\r
79 // This parameter is the EEPROM device base address.
\r
80 Eep_AddressType EepBaseAddress;
\r
82 // This parameter is the default EEPROM device mode after initialization.
\r
83 MemIf_ModeType EepDefaultMode;
\r
85 // This parameter is the number of bytes read within one job processing cycle in fast mode
\r
86 Eep_LengthType EepFastReadBlockSize;
\r
88 // This parameter is the number of bytes written within one job processing cycle in fast mode
\r
89 Eep_LengthType EepFastWriteBlockSize;
\r
91 // call cycle of the job processing function during write/erase operations. Unit: [s]
\r
92 //float EepJobCallCycle;
\r
94 // This parameter is a reference to a callback function for positive job result
\r
95 void (*Eep_JobEndNotification)();
\r
97 // This parameter is a reference to a callback function for negative job result
\r
98 void (*Eep_JobErrorNotification)();
\r
100 // number of bytes read within one job processing cycle in normal mode.
\r
101 Eep_LengthType EepNormalReadBlockSize;
\r
103 // Number of bytes written within one job processing cycle in normal mode.
\r
104 Eep_LengthType EepNormalWriteBlockSize;
\r
106 // This parameter is the used size of EEPROM device in bytes.
\r
107 Eep_LengthType EepSize;
\r
109 // ---- ARC ADDITIONS ----
\r
110 // This parameter is the EEPROM page size, i.e. number of bytes.
\r
111 Eep_LengthType EepPageSize;
\r
113 #if defined(EEP_USES_EXTERNAL_DRIVER)
\r
114 const Eep_ExternalDriverType *externalDriver;
\r
121 #endif /* EEP_CONFIGTYPES_H_ */
\r