]> rtime.felk.cvut.cz Git - arc.git/blob - boards/mpc5606s/config/Eep_Lcfg.c
Cleanup of some drivers. Re-generated examples for mpc551xsim
[arc.git] / boards / mpc5606s / config / Eep_Lcfg.c
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\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
9  *\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
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 \r
17 \r
18 \r
19 \r
20 \r
21 \r
22 \r
23 #warning "This default file may only be used as an example!"\r
24 \r
25 #include "Eep.h"\r
26 #include "Spi.h"\r
27 #include "Spi_Cfg.h"\r
28 \r
29 //#define USE_LDEBUG_PRINTF     1\r
30 #undef DEBUG_LVL\r
31 #define DEBUG_LVL DEBUG_LOW\r
32 #include "debug.h"\r
33 \r
34 static void _JobEndNotify(){\r
35         DEBUG(DEBUG_LOW,"EEP JOB END NOTIFICATION\n");\r
36 }\r
37 static void _JobErrorNotify(){\r
38         DEBUG(DEBUG_LOW,"EEP JOB ERROR NOTIFICATION\n");\r
39 }\r
40 \r
41 const Eep_ConfigType EepConfigData[] = {\r
42     {\r
43 \r
44                 // READ and WRITE sequences and ID's defined in Spi_Cfg.h\r
45                 .EepCmdSequence = SPI_SEQ_EEP_CMD,\r
46                 .EepCmd2Sequence = SPI_SEQ_EEP_CMD2,\r
47                 .EepReadSequence = SPI_SEQ_EEP_READ,\r
48                 .EepWriteSequence = SPI_SEQ_EEP_WRITE,\r
49 \r
50                 // Channels used\r
51                 .EepCmdChannel  = SPI_CH_EEP_CMD,\r
52                 .EepAddrChannel = SPI_CH_EEP_ADDR,\r
53                 .EepWrenChannel = SPI_CH_EEP_WREN,\r
54                 .EepDataChannel = SPI_CH_EEP_DATA,\r
55 \r
56 #if 0\r
57     .EepCmdJob          = SPI_EEP_CMD_JOB,\r
58     .EepDataJob         = SPI_EEP_DATA_JOB,\r
59 \r
60     // Channels used\r
61     .EepCmdChannel      = SPI_EEP_CMD_CH,\r
62     .EepAdrChannel      = SPI_EEP_ADR_CH,\r
63     .EepDataChannel     = SPI_EEP_DATA_CH,\r
64 \r
65     // READ and WRITE sequences and ID's defined in Spi_Cfg.h\r
66     .EepReadSequence = SPI_EEP_SEQ_READ,\r
67     .EepWriteSequence = SPI_EEP_SEQ_WRITE,\r
68 \r
69     // number of bytes read within one job processing cycle in normal mode.\r
70     .EepInitConfiguration = 1,\r
71 #endif\r
72 \r
73     // call cycle of the job processing function during write/erase operations. Unit: [s]\r
74     .EepJobCallCycle = 0.2,\r
75 \r
76     // This parameter is the used size of EEPROM device in bytes.\r
77 //    .EepSize = 0x8000,\r
78     .EepSize = 0x2000,\r
79 \r
80     // This parameter is a reference to a callback function for positive job result\r
81     .Eep_JobEndNotification = &_JobEndNotify,\r
82 \r
83     // This parameter is the default EEPROM device mode after initialization.\r
84     .EepDefaultMode = MEMIF_MODE_FAST,\r
85 \r
86     // Number of bytes read within one job processing cycle in normal mode.
87     .EepNormalReadBlockSize = 4,
88
89     // This parameter is the number of bytes read within one job processing cycle in fast mode\r
90     .EepFastReadBlockSize = 64,\r
91 \r
92     // Number of bytes written within one job processing cycle in normal mode.\r
93     .EepNormalWriteBlockSize = 1,\r
94 \r
95     // This parameter is the number of bytes written within one job processing cycle in fast mode
96     .EepFastWriteBlockSize = 64,
97
98     // This parameter is a reference to a callback function for negative job result\r
99     .Eep_JobErrorNotification = &_JobErrorNotify,\r
100 \r
101     // This parameter is the EEPROM page size, i.e. number of bytes.
102     .EepPageSize = 64,
103 \r
104     // This parameter is the EEPROM device base address.\r
105     .EepBaseAddress =  0\r
106     }\r
107 };\r