]> rtime.felk.cvut.cz Git - arc.git/blob - include/Eep_ConfigTypes.h
Dcm, Dynamic DIDs should be excluded in lookupDid.
[arc.git] / include / Eep_ConfigTypes.h
1 /*\r
2  * Eep_ConfigTypes.h\r
3  *\r
4  *  Created on: 1 jun 2011\r
5  *      Author: mahi\r
6  */\r
7 \r
8 #ifndef EEP_CONFIGTYPES_H_\r
9 #define EEP_CONFIGTYPES_H_\r
10 \r
11 /* STD container : EepExternalDriver\r
12  * EepSpiReference:                             1..*  Ref to SPI sequence\r
13  */\r
14 \r
15 #if defined(EEP_USES_EXTERNAL_DRIVER)\r
16 typedef struct {\r
17   /* Reference to SPI sequence (required for external EEPROM drivers).\r
18    *\r
19    * The 3.0 and 4.0 does things a bit different here\r
20    *\r
21    * 3.0\r
22    * =======\r
23    *   const Eep_ConfigType EepConfigData =\r
24    *   {\r
25    *    \85\r
26    *    EepCmdChannel    = EEP_SPI_CH_COMMAND,\r
27    *    EepAdrChannel    = EEP_SPI_CH_ADDRESS,\r
28    *    \85\r
29    *    EepWriteSequence = EEP_SPI_SEQ_WRITE,\r
30    *    \85\r
31    *  };\r
32    *\r
33    *\r
34    * 4.0\r
35    * =======\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
39    *  #define Spi_.....\r
40    *  #define Spi_EepChCommand    30\r
41    *  #define Spi_EepChAddress    31\r
42    *  #define Spi_EepChReadData   32\r
43    *\r
44    */\r
45 \r
46 //  uint32  SpiReference;\r
47 \r
48   /* EEP094 */\r
49   Spi_SequenceType EepCmdSequence;\r
50   Spi_SequenceType EepCmd2Sequence;\r
51   Spi_SequenceType EepReadSequence;\r
52   Spi_SequenceType EepWriteSequence;\r
53 \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
59 #endif\r
60 \r
61 \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
72  * EepSize                                              1        Int\r
73  *\r
74  * Defined by Arc:\r
75  * EepPageSize                                  1        Int\r
76  */\r
77 typedef struct {\r
78 \r
79   // This parameter is the EEPROM device base address.\r
80   Eep_AddressType EepBaseAddress;\r
81 \r
82   // This parameter is the default EEPROM device mode after initialization.\r
83   MemIf_ModeType EepDefaultMode;\r
84 \r
85   // This parameter is the number of bytes read within one job processing cycle in fast mode\r
86   Eep_LengthType EepFastReadBlockSize;\r
87 \r
88   // This parameter is the number of bytes written within one job processing cycle in fast mode\r
89   Eep_LengthType EepFastWriteBlockSize;\r
90 \r
91   // call cycle of the job processing function during write/erase operations. Unit: [s]\r
92   //float        EepJobCallCycle;\r
93 \r
94   // This parameter is a reference to a callback function for positive job result\r
95   void (*Eep_JobEndNotification)();\r
96 \r
97   // This parameter is a reference to a callback function for negative job result\r
98   void (*Eep_JobErrorNotification)();\r
99 \r
100   // number of bytes read within one job processing cycle in normal mode.\r
101   Eep_LengthType EepNormalReadBlockSize;\r
102 \r
103   // Number of bytes written within one job processing cycle in normal mode.\r
104   Eep_LengthType EepNormalWriteBlockSize;\r
105 \r
106   // This parameter is the used size of EEPROM device in bytes.\r
107   Eep_LengthType        EepSize;\r
108 \r
109   // ---- ARC ADDITIONS ----\r
110   // This parameter is the EEPROM page size, i.e. number of bytes.\r
111   Eep_LengthType EepPageSize;\r
112 \r
113 #if defined(EEP_USES_EXTERNAL_DRIVER)\r
114   const Eep_ExternalDriverType *externalDriver;\r
115 #endif\r
116 } Eep_ConfigType;\r
117 \r
118 \r
119 \r
120 \r
121 #endif /* EEP_CONFIGTYPES_H_ */\r