-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathccppar.h
More file actions
164 lines (121 loc) · 4.83 KB
/
ccppar.h
File metadata and controls
164 lines (121 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*----------------------------------------------------------------------------
| File:
| ccppar.h
|
| Project:
| CCP driver example
| CANape CAN Calibration Tool
|
| Description:
| Customization header for ccp.c
| See CCP.DOC for a complete description of all options
|
----------------------------------------------------------------------------*/
#ifndef __CCPPAR_H__
#define __CCPPAR_H__
#define CCP_TESTMODE /* Turn on screen output via printf */
#define CCPPRINT printf
/*----------------------------------------------------------------------------*/
/* Platform independant types */
#define CCP_INTEL
#define CCP_BYTE unsigned char
#define CCP_WORD unsigned short
#define CCP_DWORD unsigned long
#define CCP_BYTEPTR unsigned char*
#define CCP_ROM
#define CCP_RAM
#define CCP_DAQBYTEPTR CCP_BYTEPTR
#define CCP_MTABYTEPTR CCP_BYTEPTR
/*----------------------------------------------------------------------------*/
/* Disable/Enable Interrupts */
/* Has to be defined if ccpSendCallBack may interrupt ccpDaq */
#define CCP_DISABLE_INTERRUPT
#define CCP_ENABLE_INTERRUPT
/*----------------------------------------------------------------------------*/
/* CCP parameters */
/* CCP Identifiers and Address */
#define CCP_STATION_ADDR 0 /* Define CCP_STATION_ADDR in Intel Format */
/* High/Low byte swapped on motorola machines !!! (0x3900) */
#define CCP_STATION_ID "ccp_test" /* Plug&Play station identification */
#define CCP_DTO_ID 1 /* CAN identifier ECU -> Master */
#define CCP_CRO_ID 2 /* CAN identifier Master -> ECU */
/*----------------------------------------------------------------------------*/
/* CCP Data Acuisition Parameters */
#define CCP_DAQ /* Enable synchronous data aquisition in ccpDaq() */
#define CCP_MAX_ODT 3 /* Number of ODTs in each DAQ lists */
#define CCP_MAX_DAQ 2 /* Number of DAQ lists */
/*----------------------------------------------------------------------------*/
/* CCP Options */
/* Use the transmit queue in CCP.C */
/* Complete sampling is done in ccpDaq(x) and the messages are written into the queue */
#define CCP_SEND_QUEUE
/* Indicate queue overruns in the msb of pid */
/* Will be displayed in CANape's status bar if CANAPE.INI: [asap1a] check_overflow=1 */
#define CCP_SEND_QUEUE_OVERRUN_INDICATION
/* Transmit only one message in one call to ccpDaq() */
/* #define CCP_SEND_SINGLE */
/* Allow an ODT entry size >1 */
/* Not recommended for CANape, this will only need additional RAM space */
/* #define CCP_ODT_ENTRY_SIZE */
/* Use GET_SEED and UNLOCK */
/* This is usually user dependant, just a skeleton here */
/* #define CCP_SEED_KEY*/
/* Implement the flash programming feature in the ECU*/
/* This is usually user dependant, just a skeleton here */
/* #define CCP_PROGRAM*/
/* Activate the flash programming kernel download feature */
/* This is a CCP extension for CANape */
/* #define CCP_BOOTLOADER_DOWNLOAD */
/* Implement the memory checksum feature */
/* The checksum will be calculated in ccpBackground() */
/* This may be implementation specific */
#define CCP_CHECKSUM
#define CCP_CHECKSUM_TYPE CCP_WORD
/* Use a 16 bit CRC algorithm */
/* Note:
This will need additional 512 byte of ROM
CCP_CHECKSUM_TYPE has to be WORD !
*/
/* #define CCP_CHECKSUM_CCITT*/
/* Check for pending CCP commands in ccpBackground() */
/* #ifdef CCP_CMD_NOT_IN_INTERRUPT */
/* Enable Memory Write Protection */
/* #define CCP_WRITE_PROTECTION*/
/* Enable EEPROM Read/Write Access */
/* #define CCP_WRITE_EEPROM */
/* #define CCP_READ_EEPROM */
/*----------------------------------------------------------------------------*/
/* Special values for the CCPsim WIN32 Application */
#if defined(__WIN32__) || defined(WIN32)
#define CCP_TESTMODE /* Turn on screen output via printf */
#define CCPPRINT printf
#define CCP_INTEL
extern unsigned long gDtoId;
extern unsigned long gCroId;
extern unsigned short gStationAddr;
#undef CCP_CRO_ID
#define CCP_CRO_ID gCroId
#undef CCP_DTO_ID
#define CCP_DTO_ID gDtoId
#undef CCP_STATION_ADDR
#define CCP_STATION_ADDR gStationAddr
#undef CCP_STATION_ID
#define CCP_STATION_ID "CCPSIM"
#undef CCP_MAX_ODT
#undef CCP_MAX_DAQ
#define CCP_MAX_ODT 10
#define CCP_MAX_DAQ 5
#define CCP_ODT_ENTRY_SIZE
#undef CCP_SEND_SINGLE
#undef CCP_SEND_QUEUE
#define CCP_SEND_QUEUE_OVERRUN_INDICATION
#define CCP_SEND_QUEUE_SIZE (CCP_MAX_ODT*CCP_MAX_DAQ)
#define CCP_SEED_KEY
#undef CCP_BOOTLOADER_DOWNLOAD
#define CCP_PROGRAM
#define CCP_WRITE_PROTECTION
#define CCP_CHECKSUM
#define CCP_CHECKSUM_TYPE CCP_WORD
#define CCP_CHECKSUM_CCITT
#endif
#endif