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