]> rtime.felk.cvut.cz Git - arc.git/blob - boards/mpc5516it/config/Eep_Lcfg.c
Renamed USE_DEBUG to USE_DEBUG_PRINT, for now. Updates to kernel testsystem and kernel.
[arc.git] / boards / mpc5516it / config / Eep_Lcfg.c
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16
17
18
19
20
21
22
23
24 #include "Eep.h"
25 #include "Spi.h"
26 #include "Spi_Cfg.h"
27
28 //#define USE_TRACE 1
29 //#define USE_DEBUG_PRINT       1
30 #undef DEBUG_LVL
31 #define DEBUG_LVL DEBUG_LOW
32 #include "Trace.h"
33
34 static void _JobEndNotify(){
35         DEBUG(DEBUG_LOW,"EEP JOB END NOTIFICATION\n");
36 }
37 static void _JobErrorNotify(){
38         DEBUG(DEBUG_LOW,"EEP JOB ERROR NOTIFICATION\n");
39 }
40
41 const Eep_ConfigType EepConfigData[] = {
42     {
43
44                 // READ and WRITE sequences and ID's defined in Spi_Cfg.h
45                 .EepCmdSequence = SPI_SEQ_EEP_CMD,
46                 .EepCmd2Sequence = SPI_SEQ_EEP_CMD2,
47                 .EepReadSequence = SPI_SEQ_EEP_READ,
48                 .EepWriteSequence = SPI_SEQ_EEP_WRITE,
49
50                 // Channels used
51                 .EepCmdChannel  = SPI_CH_EEP_CMD,
52                 .EepAddrChannel = SPI_CH_EEP_ADDR,
53                 .EepWrenChannel = SPI_CH_EEP_WREN,
54                 .EepDataChannel = SPI_CH_EEP_DATA,
55
56 #if 0
57     .EepCmdJob          = SPI_EEP_CMD_JOB,
58     .EepDataJob         = SPI_EEP_DATA_JOB,
59
60     // Channels used
61     .EepCmdChannel      = SPI_EEP_CMD_CH,
62     .EepAdrChannel      = SPI_EEP_ADR_CH,
63     .EepDataChannel     = SPI_EEP_DATA_CH,
64
65     // READ and WRITE sequences and ID's defined in Spi_Cfg.h
66     .EepReadSequence = SPI_EEP_SEQ_READ,
67     .EepWriteSequence = SPI_EEP_SEQ_WRITE,
68
69     // number of bytes read within one job processing cycle in normal mode.
70     .EepInitConfiguration = 1,
71 #endif
72
73     // call cycle of the job processing function during write/erase operations. Unit: [s]
74     .EepJobCallCycle = 0.2,
75
76     // This parameter is the used size of EEPROM device in bytes.
77     .EepSize = 0x8000,
78
79     // This parameter is a reference to a callback function for positive job result
80     .Eep_JobEndNotification = &_JobEndNotify,
81
82     // This parameter is the default EEPROM device mode after initialization.
83     .EepDefaultMode = MEMIF_MODE_FAST,
84
85     // This parameter is the number of bytes read within one job processing cycle in fast mode
86     .EepFastReadBlockSize = 64,
87
88     .EepNormalReadBlockSize = 4,
89
90     // Number of bytes written within one job processing cycle in normal mode.
91     .EepNormalWriteBlockSize = 1,
92
93     // This parameter is a reference to a callback function for negative job result
94     .Eep_JobErrorNotification = &_JobErrorNotify,
95
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 the EEPROM device base address.
100     .EepBaseAddress =  0
101     }
102 };