diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-12-19 20:09:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 16:52:37 -0500 |
commit | e0ca0595885e2e324eefe4f32cde6d65e61e6e28 (patch) | |
tree | c53676354254656be8d1f197f5d8f88526355b7b /drivers | |
parent | bd5cd82dc6148aa8f655620e6f3bf62e5e320078 (diff) |
Staging: epl: run Lindent on *.h files
It's a start, still a mess...
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
35 files changed, 3608 insertions, 4059 deletions
diff --git a/drivers/staging/epl/Benchmark.h b/drivers/staging/epl/Benchmark.h index 681c1d9e3232..62dee3b14373 100644 --- a/drivers/staging/epl/Benchmark.h +++ b/drivers/staging/epl/Benchmark.h | |||
@@ -73,31 +73,30 @@ | |||
73 | 73 | ||
74 | #include "global.h" | 74 | #include "global.h" |
75 | 75 | ||
76 | |||
77 | #if (TARGET_SYSTEM == _NO_OS_) && (DEV_SYSTEM == _DEV_GNU_CF548X_) | 76 | #if (TARGET_SYSTEM == _NO_OS_) && (DEV_SYSTEM == _DEV_GNU_CF548X_) |
78 | #include "common.h" | 77 | #include "common.h" |
79 | 78 | ||
80 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | 79 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
81 | 80 | ||
82 | // #include <linux/config.h> | 81 | // #include <linux/config.h> |
83 | #include <linux/kernel.h> | 82 | #include <linux/kernel.h> |
84 | 83 | ||
85 | #ifdef CONFIG_COLDFIRE | 84 | #ifdef CONFIG_COLDFIRE |
86 | #include <asm/coldfire.h> | 85 | #include <asm/coldfire.h> |
87 | #include <asm/m5485gpio.h> | 86 | #include <asm/m5485gpio.h> |
88 | 87 | ||
89 | #define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1) | 88 | #define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1) |
90 | #define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1) | 89 | #define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1) |
91 | #define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5)) | 90 | #define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5)) |
92 | #else | 91 | #else |
93 | #undef BENCHMARK_MODULES | 92 | #undef BENCHMARK_MODULES |
94 | #define BENCHMARK_MODULES 0x00000000 | 93 | #define BENCHMARK_MODULES 0x00000000 |
95 | #endif | 94 | #endif |
96 | 95 | ||
97 | #else | 96 | #else |
98 | // disable Benchmarking | 97 | // disable Benchmarking |
99 | #undef BENCHMARK_MODULES | 98 | #undef BENCHMARK_MODULES |
100 | #define BENCHMARK_MODULES 0x00000000 | 99 | #define BENCHMARK_MODULES 0x00000000 |
101 | #endif | 100 | #endif |
102 | 101 | ||
103 | /***************************************************************************/ | 102 | /***************************************************************************/ |
@@ -149,295 +148,290 @@ | |||
149 | #define BENCHMARK_MOD_31 0x40000000 | 148 | #define BENCHMARK_MOD_31 0x40000000 |
150 | #define BENCHMARK_MOD_32 0x80000000 | 149 | #define BENCHMARK_MOD_32 0x80000000 |
151 | 150 | ||
152 | |||
153 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_01) | 151 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_01) |
154 | #define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x) | 152 | #define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x) |
155 | #define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x) | 153 | #define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x) |
156 | #define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x) | 154 | #define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x) |
157 | #else | 155 | #else |
158 | #define BENCHMARK_MOD_01_SET(x) | 156 | #define BENCHMARK_MOD_01_SET(x) |
159 | #define BENCHMARK_MOD_01_RESET(x) | 157 | #define BENCHMARK_MOD_01_RESET(x) |
160 | #define BENCHMARK_MOD_01_TOGGLE(x) | 158 | #define BENCHMARK_MOD_01_TOGGLE(x) |
161 | #endif | 159 | #endif |
162 | 160 | ||
163 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_02) | 161 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_02) |
164 | #define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x) | 162 | #define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x) |
165 | #define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x) | 163 | #define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x) |
166 | #define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x) | 164 | #define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x) |
167 | #else | 165 | #else |
168 | #define BENCHMARK_MOD_02_SET(x) | 166 | #define BENCHMARK_MOD_02_SET(x) |
169 | #define BENCHMARK_MOD_02_RESET(x) | 167 | #define BENCHMARK_MOD_02_RESET(x) |
170 | #define BENCHMARK_MOD_02_TOGGLE(x) | 168 | #define BENCHMARK_MOD_02_TOGGLE(x) |
171 | #endif | 169 | #endif |
172 | 170 | ||
173 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_03) | 171 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_03) |
174 | #define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x) | 172 | #define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x) |
175 | #define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x) | 173 | #define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x) |
176 | #define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x) | 174 | #define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x) |
177 | #else | 175 | #else |
178 | #define BENCHMARK_MOD_03_SET(x) | 176 | #define BENCHMARK_MOD_03_SET(x) |
179 | #define BENCHMARK_MOD_03_RESET(x) | 177 | #define BENCHMARK_MOD_03_RESET(x) |
180 | #define BENCHMARK_MOD_03_TOGGLE(x) | 178 | #define BENCHMARK_MOD_03_TOGGLE(x) |
181 | #endif | 179 | #endif |
182 | 180 | ||
183 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_04) | 181 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_04) |
184 | #define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x) | 182 | #define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x) |
185 | #define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x) | 183 | #define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x) |
186 | #define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x) | 184 | #define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x) |
187 | #else | 185 | #else |
188 | #define BENCHMARK_MOD_04_SET(x) | 186 | #define BENCHMARK_MOD_04_SET(x) |
189 | #define BENCHMARK_MOD_04_RESET(x) | 187 | #define BENCHMARK_MOD_04_RESET(x) |
190 | #define BENCHMARK_MOD_04_TOGGLE(x) | 188 | #define BENCHMARK_MOD_04_TOGGLE(x) |
191 | #endif | 189 | #endif |
192 | 190 | ||
193 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_05) | 191 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_05) |
194 | #define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x) | 192 | #define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x) |
195 | #define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x) | 193 | #define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x) |
196 | #define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x) | 194 | #define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x) |
197 | #else | 195 | #else |
198 | #define BENCHMARK_MOD_05_SET(x) | 196 | #define BENCHMARK_MOD_05_SET(x) |
199 | #define BENCHMARK_MOD_05_RESET(x) | 197 | #define BENCHMARK_MOD_05_RESET(x) |
200 | #define BENCHMARK_MOD_05_TOGGLE(x) | 198 | #define BENCHMARK_MOD_05_TOGGLE(x) |
201 | #endif | 199 | #endif |
202 | 200 | ||
203 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_06) | 201 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_06) |
204 | #define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x) | 202 | #define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x) |
205 | #define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x) | 203 | #define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x) |
206 | #define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x) | 204 | #define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x) |
207 | #else | 205 | #else |
208 | #define BENCHMARK_MOD_06_SET(x) | 206 | #define BENCHMARK_MOD_06_SET(x) |
209 | #define BENCHMARK_MOD_06_RESET(x) | 207 | #define BENCHMARK_MOD_06_RESET(x) |
210 | #define BENCHMARK_MOD_06_TOGGLE(x) | 208 | #define BENCHMARK_MOD_06_TOGGLE(x) |
211 | #endif | 209 | #endif |
212 | 210 | ||
213 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_07) | 211 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_07) |
214 | #define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x) | 212 | #define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x) |
215 | #define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x) | 213 | #define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x) |
216 | #define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x) | 214 | #define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x) |
217 | #else | 215 | #else |
218 | #define BENCHMARK_MOD_07_SET(x) | 216 | #define BENCHMARK_MOD_07_SET(x) |
219 | #define BENCHMARK_MOD_07_RESET(x) | 217 | #define BENCHMARK_MOD_07_RESET(x) |
220 | #define BENCHMARK_MOD_07_TOGGLE(x) | 218 | #define BENCHMARK_MOD_07_TOGGLE(x) |
221 | #endif | 219 | #endif |
222 | 220 | ||
223 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_08) | 221 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_08) |
224 | #define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x) | 222 | #define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x) |
225 | #define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x) | 223 | #define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x) |
226 | #define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x) | 224 | #define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x) |
227 | #else | 225 | #else |
228 | #define BENCHMARK_MOD_08_SET(x) | 226 | #define BENCHMARK_MOD_08_SET(x) |
229 | #define BENCHMARK_MOD_08_RESET(x) | 227 | #define BENCHMARK_MOD_08_RESET(x) |
230 | #define BENCHMARK_MOD_08_TOGGLE(x) | 228 | #define BENCHMARK_MOD_08_TOGGLE(x) |
231 | #endif | 229 | #endif |
232 | 230 | ||
233 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_09) | 231 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_09) |
234 | #define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x) | 232 | #define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x) |
235 | #define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x) | 233 | #define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x) |
236 | #define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x) | 234 | #define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x) |
237 | #else | 235 | #else |
238 | #define BENCHMARK_MOD_09_SET(x) | 236 | #define BENCHMARK_MOD_09_SET(x) |
239 | #define BENCHMARK_MOD_09_RESET(x) | 237 | #define BENCHMARK_MOD_09_RESET(x) |
240 | #define BENCHMARK_MOD_09_TOGGLE(x) | 238 | #define BENCHMARK_MOD_09_TOGGLE(x) |
241 | #endif | 239 | #endif |
242 | 240 | ||
243 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_10) | 241 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_10) |
244 | #define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x) | 242 | #define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x) |
245 | #define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x) | 243 | #define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x) |
246 | #else | 244 | #else |
247 | #define BENCHMARK_MOD_10_SET(x) | 245 | #define BENCHMARK_MOD_10_SET(x) |
248 | #define BENCHMARK_MOD_10_RESET(x) | 246 | #define BENCHMARK_MOD_10_RESET(x) |
249 | #endif | 247 | #endif |
250 | 248 | ||
251 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_11) | 249 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_11) |
252 | #define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x) | 250 | #define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x) |
253 | #define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x) | 251 | #define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x) |
254 | #else | 252 | #else |
255 | #define BENCHMARK_MOD_11_SET(x) | 253 | #define BENCHMARK_MOD_11_SET(x) |
256 | #define BENCHMARK_MOD_11_RESET(x) | 254 | #define BENCHMARK_MOD_11_RESET(x) |
257 | #endif | 255 | #endif |
258 | 256 | ||
259 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_12) | 257 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_12) |
260 | #define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x) | 258 | #define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x) |
261 | #define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x) | 259 | #define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x) |
262 | #else | 260 | #else |
263 | #define BENCHMARK_MOD_12_SET(x) | 261 | #define BENCHMARK_MOD_12_SET(x) |
264 | #define BENCHMARK_MOD_12_RESET(x) | 262 | #define BENCHMARK_MOD_12_RESET(x) |
265 | #endif | 263 | #endif |
266 | 264 | ||
267 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_13) | 265 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_13) |
268 | #define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x) | 266 | #define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x) |
269 | #define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x) | 267 | #define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x) |
270 | #else | 268 | #else |
271 | #define BENCHMARK_MOD_13_SET(x) | 269 | #define BENCHMARK_MOD_13_SET(x) |
272 | #define BENCHMARK_MOD_13_RESET(x) | 270 | #define BENCHMARK_MOD_13_RESET(x) |
273 | #endif | 271 | #endif |
274 | 272 | ||
275 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_14) | 273 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_14) |
276 | #define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x) | 274 | #define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x) |
277 | #define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x) | 275 | #define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x) |
278 | #else | 276 | #else |
279 | #define BENCHMARK_MOD_14_SET(x) | 277 | #define BENCHMARK_MOD_14_SET(x) |
280 | #define BENCHMARK_MOD_14_RESET(x) | 278 | #define BENCHMARK_MOD_14_RESET(x) |
281 | #endif | 279 | #endif |
282 | 280 | ||
283 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_15) | 281 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_15) |
284 | #define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x) | 282 | #define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x) |
285 | #define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x) | 283 | #define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x) |
286 | #else | 284 | #else |
287 | #define BENCHMARK_MOD_15_SET(x) | 285 | #define BENCHMARK_MOD_15_SET(x) |
288 | #define BENCHMARK_MOD_15_RESET(x) | 286 | #define BENCHMARK_MOD_15_RESET(x) |
289 | #endif | 287 | #endif |
290 | 288 | ||
291 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_16) | 289 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_16) |
292 | #define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x) | 290 | #define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x) |
293 | #define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x) | 291 | #define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x) |
294 | #else | 292 | #else |
295 | #define BENCHMARK_MOD_16_SET(x) | 293 | #define BENCHMARK_MOD_16_SET(x) |
296 | #define BENCHMARK_MOD_16_RESET(x) | 294 | #define BENCHMARK_MOD_16_RESET(x) |
297 | #endif | 295 | #endif |
298 | 296 | ||
299 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_17) | 297 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_17) |
300 | #define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x) | 298 | #define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x) |
301 | #define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x) | 299 | #define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x) |
302 | #else | 300 | #else |
303 | #define BENCHMARK_MOD_17_SET(x) | 301 | #define BENCHMARK_MOD_17_SET(x) |
304 | #define BENCHMARK_MOD_17_RESET(x) | 302 | #define BENCHMARK_MOD_17_RESET(x) |
305 | #endif | 303 | #endif |
306 | 304 | ||
307 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_18) | 305 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_18) |
308 | #define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x) | 306 | #define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x) |
309 | #define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x) | 307 | #define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x) |
310 | #else | 308 | #else |
311 | #define BENCHMARK_MOD_18_SET(x) | 309 | #define BENCHMARK_MOD_18_SET(x) |
312 | #define BENCHMARK_MOD_18_RESET(x) | 310 | #define BENCHMARK_MOD_18_RESET(x) |
313 | #endif | 311 | #endif |
314 | 312 | ||
315 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_19) | 313 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_19) |
316 | #define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x) | 314 | #define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x) |
317 | #define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x) | 315 | #define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x) |
318 | #else | 316 | #else |
319 | #define BENCHMARK_MOD_19_SET(x) | 317 | #define BENCHMARK_MOD_19_SET(x) |
320 | #define BENCHMARK_MOD_19_RESET(x) | 318 | #define BENCHMARK_MOD_19_RESET(x) |
321 | #endif | 319 | #endif |
322 | 320 | ||
323 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_20) | 321 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_20) |
324 | #define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x) | 322 | #define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x) |
325 | #define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x) | 323 | #define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x) |
326 | #else | 324 | #else |
327 | #define BENCHMARK_MOD_20_SET(x) | 325 | #define BENCHMARK_MOD_20_SET(x) |
328 | #define BENCHMARK_MOD_20_RESET(x) | 326 | #define BENCHMARK_MOD_20_RESET(x) |
329 | #endif | 327 | #endif |
330 | 328 | ||
331 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_21) | 329 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_21) |
332 | #define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x) | 330 | #define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x) |
333 | #define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x) | 331 | #define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x) |
334 | #else | 332 | #else |
335 | #define BENCHMARK_MOD_21_SET(x) | 333 | #define BENCHMARK_MOD_21_SET(x) |
336 | #define BENCHMARK_MOD_21_RESET(x) | 334 | #define BENCHMARK_MOD_21_RESET(x) |
337 | #endif | 335 | #endif |
338 | 336 | ||
339 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_22) | 337 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_22) |
340 | #define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x) | 338 | #define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x) |
341 | #define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x) | 339 | #define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x) |
342 | #else | 340 | #else |
343 | #define BENCHMARK_MOD_22_SET(x) | 341 | #define BENCHMARK_MOD_22_SET(x) |
344 | #define BENCHMARK_MOD_22_RESET(x) | 342 | #define BENCHMARK_MOD_22_RESET(x) |
345 | #endif | 343 | #endif |
346 | 344 | ||
347 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_23) | 345 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_23) |
348 | #define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x) | 346 | #define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x) |
349 | #define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x) | 347 | #define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x) |
350 | #else | 348 | #else |
351 | #define BENCHMARK_MOD_23_SET(x) | 349 | #define BENCHMARK_MOD_23_SET(x) |
352 | #define BENCHMARK_MOD_23_RESET(x) | 350 | #define BENCHMARK_MOD_23_RESET(x) |
353 | #endif | 351 | #endif |
354 | 352 | ||
355 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_24) | 353 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_24) |
356 | #define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x) | 354 | #define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x) |
357 | #define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x) | 355 | #define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x) |
358 | #else | 356 | #else |
359 | #define BENCHMARK_MOD_24_SET(x) | 357 | #define BENCHMARK_MOD_24_SET(x) |
360 | #define BENCHMARK_MOD_24_RESET(x) | 358 | #define BENCHMARK_MOD_24_RESET(x) |
361 | #endif | 359 | #endif |
362 | 360 | ||
363 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_25) | 361 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_25) |
364 | #define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x) | 362 | #define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x) |
365 | #define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x) | 363 | #define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x) |
366 | #else | 364 | #else |
367 | #define BENCHMARK_MOD_25_SET(x) | 365 | #define BENCHMARK_MOD_25_SET(x) |
368 | #define BENCHMARK_MOD_25_RESET(x) | 366 | #define BENCHMARK_MOD_25_RESET(x) |
369 | #endif | 367 | #endif |
370 | 368 | ||
371 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_26) | 369 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_26) |
372 | #define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x) | 370 | #define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x) |
373 | #define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x) | 371 | #define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x) |
374 | #else | 372 | #else |
375 | #define BENCHMARK_MOD_26_SET(x) | 373 | #define BENCHMARK_MOD_26_SET(x) |
376 | #define BENCHMARK_MOD_26_RESET(x) | 374 | #define BENCHMARK_MOD_26_RESET(x) |
377 | #endif | 375 | #endif |
378 | 376 | ||
379 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_27) | 377 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_27) |
380 | #define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x) | 378 | #define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x) |
381 | #define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x) | 379 | #define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x) |
382 | #else | 380 | #else |
383 | #define BENCHMARK_MOD_27_SET(x) | 381 | #define BENCHMARK_MOD_27_SET(x) |
384 | #define BENCHMARK_MOD_27_RESET(x) | 382 | #define BENCHMARK_MOD_27_RESET(x) |
385 | #endif | 383 | #endif |
386 | 384 | ||
387 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_28) | 385 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_28) |
388 | #define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x) | 386 | #define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x) |
389 | #define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x) | 387 | #define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x) |
390 | #else | 388 | #else |
391 | #define BENCHMARK_MOD_28_SET(x) | 389 | #define BENCHMARK_MOD_28_SET(x) |
392 | #define BENCHMARK_MOD_28_RESET(x) | 390 | #define BENCHMARK_MOD_28_RESET(x) |
393 | #endif | 391 | #endif |
394 | 392 | ||
395 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_29) | 393 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_29) |
396 | #define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x) | 394 | #define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x) |
397 | #define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x) | 395 | #define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x) |
398 | #else | 396 | #else |
399 | #define BENCHMARK_MOD_29_SET(x) | 397 | #define BENCHMARK_MOD_29_SET(x) |
400 | #define BENCHMARK_MOD_29_RESET(x) | 398 | #define BENCHMARK_MOD_29_RESET(x) |
401 | #endif | 399 | #endif |
402 | 400 | ||
403 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_30) | 401 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_30) |
404 | #define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x) | 402 | #define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x) |
405 | #define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x) | 403 | #define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x) |
406 | #else | 404 | #else |
407 | #define BENCHMARK_MOD_30_SET(x) | 405 | #define BENCHMARK_MOD_30_SET(x) |
408 | #define BENCHMARK_MOD_30_RESET(x) | 406 | #define BENCHMARK_MOD_30_RESET(x) |
409 | #endif | 407 | #endif |
410 | 408 | ||
411 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_31) | 409 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_31) |
412 | #define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x) | 410 | #define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x) |
413 | #define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x) | 411 | #define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x) |
414 | #else | 412 | #else |
415 | #define BENCHMARK_MOD_31_SET(x) | 413 | #define BENCHMARK_MOD_31_SET(x) |
416 | #define BENCHMARK_MOD_31_RESET(x) | 414 | #define BENCHMARK_MOD_31_RESET(x) |
417 | #endif | 415 | #endif |
418 | 416 | ||
419 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_32) | 417 | #if (BENCHMARK_MODULES & BENCHMARK_MOD_32) |
420 | #define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x) | 418 | #define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x) |
421 | #define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x) | 419 | #define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x) |
422 | #else | 420 | #else |
423 | #define BENCHMARK_MOD_32_SET(x) | 421 | #define BENCHMARK_MOD_32_SET(x) |
424 | #define BENCHMARK_MOD_32_RESET(x) | 422 | #define BENCHMARK_MOD_32_RESET(x) |
425 | #endif | 423 | #endif |
426 | 424 | ||
427 | |||
428 | //--------------------------------------------------------------------------- | 425 | //--------------------------------------------------------------------------- |
429 | // modul global types | 426 | // modul global types |
430 | //--------------------------------------------------------------------------- | 427 | //--------------------------------------------------------------------------- |
431 | 428 | ||
432 | |||
433 | //--------------------------------------------------------------------------- | 429 | //--------------------------------------------------------------------------- |
434 | // local vars | 430 | // local vars |
435 | //--------------------------------------------------------------------------- | 431 | //--------------------------------------------------------------------------- |
436 | 432 | ||
437 | |||
438 | //--------------------------------------------------------------------------- | 433 | //--------------------------------------------------------------------------- |
439 | // local function prototypes | 434 | // local function prototypes |
440 | //--------------------------------------------------------------------------- | 435 | //--------------------------------------------------------------------------- |
441 | 436 | ||
442 | |||
443 | #endif // _BENCHMARK_H_ | 437 | #endif // _BENCHMARK_H_ |
diff --git a/drivers/staging/epl/Debug.h b/drivers/staging/epl/Debug.h index f804e2fda9e4..05de9d541fd6 100644 --- a/drivers/staging/epl/Debug.h +++ b/drivers/staging/epl/Debug.h | |||
@@ -71,7 +71,6 @@ | |||
71 | 71 | ||
72 | #include "global.h" | 72 | #include "global.h" |
73 | 73 | ||
74 | |||
75 | /***************************************************************************/ | 74 | /***************************************************************************/ |
76 | /* */ | 75 | /* */ |
77 | /* */ | 76 | /* */ |
@@ -122,30 +121,24 @@ | |||
122 | #define DEBUG_LVL_ERROR 0x40000000 | 121 | #define DEBUG_LVL_ERROR 0x40000000 |
123 | #define DEBUG_LVL_ALWAYS 0x80000000 | 122 | #define DEBUG_LVL_ALWAYS 0x80000000 |
124 | 123 | ||
125 | |||
126 | //--------------------------------------------------------------------------- | 124 | //--------------------------------------------------------------------------- |
127 | // global types | 125 | // global types |
128 | //--------------------------------------------------------------------------- | 126 | //--------------------------------------------------------------------------- |
129 | 127 | ||
130 | |||
131 | //--------------------------------------------------------------------------- | 128 | //--------------------------------------------------------------------------- |
132 | // global vars | 129 | // global vars |
133 | //--------------------------------------------------------------------------- | 130 | //--------------------------------------------------------------------------- |
134 | 131 | ||
135 | |||
136 | //--------------------------------------------------------------------------- | 132 | //--------------------------------------------------------------------------- |
137 | // global function prototypes | 133 | // global function prototypes |
138 | //--------------------------------------------------------------------------- | 134 | //--------------------------------------------------------------------------- |
139 | 135 | ||
140 | |||
141 | //--------------------------------------------------------------------------- | 136 | //--------------------------------------------------------------------------- |
142 | // global macros | 137 | // global macros |
143 | //--------------------------------------------------------------------------- | 138 | //--------------------------------------------------------------------------- |
144 | 139 | ||
145 | //--------------------------------------------------------------------------- | 140 | //--------------------------------------------------------------------------- |
146 | // this macro defines a version string | 141 | // this macro defines a version string |
147 | #define MAKE_VERSION_STRING(product,appname,verstr,author) \ | ||
148 | "§prd§:" product ",§app§:" appname ",§ver§:" verstr ",§dat§:" __DATE__ ",§aut§:" author | ||
149 | 142 | ||
150 | 143 | ||
151 | //--------------------------------------------------------------------------- | 144 | //--------------------------------------------------------------------------- |
@@ -159,18 +152,16 @@ | |||
159 | prefix "Version: " verstr "\n" \ | 152 | prefix "Version: " verstr "\n" \ |
160 | prefix "***************************************************\n\n" | 153 | prefix "***************************************************\n\n" |
161 | 154 | ||
162 | |||
163 | //--------------------------------------------------------------------------- | 155 | //--------------------------------------------------------------------------- |
164 | // The default debug-level is: ERROR and ALWAYS. | 156 | // The default debug-level is: ERROR and ALWAYS. |
165 | // You can define an other debug-level in project settings. | 157 | // You can define an other debug-level in project settings. |
166 | #ifndef DEF_DEBUG_LVL | 158 | #ifndef DEF_DEBUG_LVL |
167 | #define DEF_DEBUG_LVL (DEBUG_LVL_ALWAYS | DEBUG_LVL_ERROR) | 159 | #define DEF_DEBUG_LVL (DEBUG_LVL_ALWAYS | DEBUG_LVL_ERROR) |
168 | #endif | 160 | #endif |
169 | #ifndef DEBUG_GLB_LVL | 161 | #ifndef DEBUG_GLB_LVL |
170 | #define DEBUG_GLB_LVL() (DEF_DEBUG_LVL) | 162 | #define DEBUG_GLB_LVL() (DEF_DEBUG_LVL) |
171 | #endif | 163 | #endif |
172 | 164 | ||
173 | |||
174 | //--------------------------------------------------------------------------- | 165 | //--------------------------------------------------------------------------- |
175 | #if (DEV_SYSTEM == _DEV_WIN32_) && defined (TRACE_MSG) | 166 | #if (DEV_SYSTEM == _DEV_WIN32_) && defined (TRACE_MSG) |
176 | 167 | ||
@@ -182,12 +173,12 @@ | |||
182 | // | 173 | // |
183 | // Example: DEBUG_TRACE1(DEBUG_LVL_30 | DEBUG_LVL_02, "Hello %d", bCount); | 174 | // Example: DEBUG_TRACE1(DEBUG_LVL_30 | DEBUG_LVL_02, "Hello %d", bCount); |
184 | 175 | ||
185 | #define DEBUG_TRACE0(lvl,str) TraceLvl((lvl),str) | 176 | #define DEBUG_TRACE0(lvl,str) TraceLvl((lvl),str) |
186 | #define DEBUG_TRACE1(lvl,str,p1) TraceLvl((lvl),str,p1) | 177 | #define DEBUG_TRACE1(lvl,str,p1) TraceLvl((lvl),str,p1) |
187 | #define DEBUG_TRACE2(lvl,str,p1,p2) TraceLvl((lvl),str,p1,p2) | 178 | #define DEBUG_TRACE2(lvl,str,p1,p2) TraceLvl((lvl),str,p1,p2) |
188 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) TraceLvl((lvl),str,p1,p2,p3) | 179 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) TraceLvl((lvl),str,p1,p2,p3) |
189 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) TraceLvl((lvl),str,p1,p2,p3,p4) | 180 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) TraceLvl((lvl),str,p1,p2,p3,p4) |
190 | #define DEBUG_GLB_LVL() dwDebugLevel_g | 181 | #define DEBUG_GLB_LVL() dwDebugLevel_g |
191 | 182 | ||
192 | #else | 183 | #else |
193 | 184 | ||
@@ -198,462 +189,461 @@ | |||
198 | // | 189 | // |
199 | // Example: DEBUG_TRACE1(DEBUG_LVL_ERROR, "error code %d", dwRet); | 190 | // Example: DEBUG_TRACE1(DEBUG_LVL_ERROR, "error code %d", dwRet); |
200 | 191 | ||
201 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_ALWAYS) | 192 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_ALWAYS) |
202 | #define DEBUG_LVL_ALWAYS_TRACE0(str) TRACE0(str) | 193 | #define DEBUG_LVL_ALWAYS_TRACE0(str) TRACE0(str) |
203 | #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) TRACE1(str,p1) | 194 | #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) TRACE1(str,p1) |
204 | #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | 195 | #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) TRACE2(str,p1,p2) |
205 | #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | 196 | #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) |
206 | #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | 197 | #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) |
207 | #else | 198 | #else |
208 | #define DEBUG_LVL_ALWAYS_TRACE0(str) | 199 | #define DEBUG_LVL_ALWAYS_TRACE0(str) |
209 | #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) | 200 | #define DEBUG_LVL_ALWAYS_TRACE1(str,p1) |
210 | #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) | 201 | #define DEBUG_LVL_ALWAYS_TRACE2(str,p1,p2) |
211 | #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) | 202 | #define DEBUG_LVL_ALWAYS_TRACE3(str,p1,p2,p3) |
212 | #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) | 203 | #define DEBUG_LVL_ALWAYS_TRACE4(str,p1,p2,p3,p4) |
213 | #endif | 204 | #endif |
214 | |||
215 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_ERROR) | ||
216 | #define DEBUG_LVL_ERROR_TRACE0(str) TRACE0(str) | ||
217 | #define DEBUG_LVL_ERROR_TRACE1(str,p1) TRACE1(str,p1) | ||
218 | #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
219 | #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
220 | #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
221 | #else | ||
222 | #define DEBUG_LVL_ERROR_TRACE0(str) | ||
223 | #define DEBUG_LVL_ERROR_TRACE1(str,p1) | ||
224 | #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) | ||
225 | #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) | ||
226 | #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) | ||
227 | #endif | ||
228 | |||
229 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT) | ||
230 | #define DEBUG_LVL_ASSERT_TRACE0(str) TRACE0(str) | ||
231 | #define DEBUG_LVL_ASSERT_TRACE1(str,p1) TRACE1(str,p1) | ||
232 | #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
233 | #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
234 | #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
235 | #else | ||
236 | #define DEBUG_LVL_ASSERT_TRACE0(str) | ||
237 | #define DEBUG_LVL_ASSERT_TRACE1(str,p1) | ||
238 | #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) | ||
239 | #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) | ||
240 | #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) | ||
241 | #endif | ||
242 | |||
243 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_29) | ||
244 | #define DEBUG_LVL_29_TRACE0(str) TRACE0(str) | ||
245 | #define DEBUG_LVL_29_TRACE1(str,p1) TRACE1(str,p1) | ||
246 | #define DEBUG_LVL_29_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
247 | #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
248 | #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
249 | #else | ||
250 | #define DEBUG_LVL_29_TRACE0(str) | ||
251 | #define DEBUG_LVL_29_TRACE1(str,p1) | ||
252 | #define DEBUG_LVL_29_TRACE2(str,p1,p2) | ||
253 | #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) | ||
254 | #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) | ||
255 | #endif | ||
256 | |||
257 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_28) | ||
258 | #define DEBUG_LVL_28_TRACE0(str) TRACE0(str) | ||
259 | #define DEBUG_LVL_28_TRACE1(str,p1) TRACE1(str,p1) | ||
260 | #define DEBUG_LVL_28_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
261 | #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
262 | #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
263 | #else | ||
264 | #define DEBUG_LVL_28_TRACE0(str) | ||
265 | #define DEBUG_LVL_28_TRACE1(str,p1) | ||
266 | #define DEBUG_LVL_28_TRACE2(str,p1,p2) | ||
267 | #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) | ||
268 | #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) | ||
269 | #endif | ||
270 | |||
271 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_27) | ||
272 | #define DEBUG_LVL_27_TRACE0(str) TRACE0(str) | ||
273 | #define DEBUG_LVL_27_TRACE1(str,p1) TRACE1(str,p1) | ||
274 | #define DEBUG_LVL_27_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
275 | #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
276 | #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
277 | #else | ||
278 | #define DEBUG_LVL_27_TRACE0(str) | ||
279 | #define DEBUG_LVL_27_TRACE1(str,p1) | ||
280 | #define DEBUG_LVL_27_TRACE2(str,p1,p2) | ||
281 | #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) | ||
282 | #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) | ||
283 | #endif | ||
284 | |||
285 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_26) | ||
286 | #define DEBUG_LVL_26_TRACE0(str) TRACE0(str) | ||
287 | #define DEBUG_LVL_26_TRACE1(str,p1) TRACE1(str,p1) | ||
288 | #define DEBUG_LVL_26_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
289 | #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
290 | #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
291 | #else | ||
292 | #define DEBUG_LVL_26_TRACE0(str) | ||
293 | #define DEBUG_LVL_26_TRACE1(str,p1) | ||
294 | #define DEBUG_LVL_26_TRACE2(str,p1,p2) | ||
295 | #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) | ||
296 | #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) | ||
297 | #endif | ||
298 | |||
299 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_25) | ||
300 | #define DEBUG_LVL_25_TRACE0(str) TRACE0(str) | ||
301 | #define DEBUG_LVL_25_TRACE1(str,p1) TRACE1(str,p1) | ||
302 | #define DEBUG_LVL_25_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
303 | #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
304 | #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
305 | #else | ||
306 | #define DEBUG_LVL_25_TRACE0(str) | ||
307 | #define DEBUG_LVL_25_TRACE1(str,p1) | ||
308 | #define DEBUG_LVL_25_TRACE2(str,p1,p2) | ||
309 | #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) | ||
310 | #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) | ||
311 | #endif | ||
312 | |||
313 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_24) | ||
314 | #define DEBUG_LVL_24_TRACE0(str) TRACE0(str) | ||
315 | #define DEBUG_LVL_24_TRACE1(str,p1) TRACE1(str,p1) | ||
316 | #define DEBUG_LVL_24_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
317 | #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
318 | #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
319 | #else | ||
320 | #define DEBUG_LVL_24_TRACE0(str) | ||
321 | #define DEBUG_LVL_24_TRACE1(str,p1) | ||
322 | #define DEBUG_LVL_24_TRACE2(str,p1,p2) | ||
323 | #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) | ||
324 | #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) | ||
325 | #endif | ||
326 | |||
327 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_23) | ||
328 | #define DEBUG_LVL_23_TRACE0(str) TRACE0(str) | ||
329 | #define DEBUG_LVL_23_TRACE1(str,p1) TRACE1(str,p1) | ||
330 | #define DEBUG_LVL_23_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
331 | #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
332 | #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
333 | #else | ||
334 | #define DEBUG_LVL_23_TRACE0(str) | ||
335 | #define DEBUG_LVL_23_TRACE1(str,p1) | ||
336 | #define DEBUG_LVL_23_TRACE2(str,p1,p2) | ||
337 | #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) | ||
338 | #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) | ||
339 | #endif | ||
340 | |||
341 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_22) | ||
342 | #define DEBUG_LVL_22_TRACE0(str) TRACE0(str) | ||
343 | #define DEBUG_LVL_22_TRACE1(str,p1) TRACE1(str,p1) | ||
344 | #define DEBUG_LVL_22_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
345 | #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
346 | #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
347 | #else | ||
348 | #define DEBUG_LVL_22_TRACE0(str) | ||
349 | #define DEBUG_LVL_22_TRACE1(str,p1) | ||
350 | #define DEBUG_LVL_22_TRACE2(str,p1,p2) | ||
351 | #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) | ||
352 | #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) | ||
353 | #endif | ||
354 | |||
355 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_21) | ||
356 | #define DEBUG_LVL_21_TRACE0(str) TRACE0(str) | ||
357 | #define DEBUG_LVL_21_TRACE1(str,p1) TRACE1(str,p1) | ||
358 | #define DEBUG_LVL_21_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
359 | #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
360 | #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
361 | #else | ||
362 | #define DEBUG_LVL_21_TRACE0(str) | ||
363 | #define DEBUG_LVL_21_TRACE1(str,p1) | ||
364 | #define DEBUG_LVL_21_TRACE2(str,p1,p2) | ||
365 | #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) | ||
366 | #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) | ||
367 | #endif | ||
368 | |||
369 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_20) | ||
370 | #define DEBUG_LVL_20_TRACE0(str) TRACE0(str) | ||
371 | #define DEBUG_LVL_20_TRACE1(str,p1) TRACE1(str,p1) | ||
372 | #define DEBUG_LVL_20_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
373 | #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
374 | #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
375 | #else | ||
376 | #define DEBUG_LVL_20_TRACE0(str) | ||
377 | #define DEBUG_LVL_20_TRACE1(str,p1) | ||
378 | #define DEBUG_LVL_20_TRACE2(str,p1,p2) | ||
379 | #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) | ||
380 | #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) | ||
381 | #endif | ||
382 | |||
383 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_19) | ||
384 | #define DEBUG_LVL_19_TRACE0(str) TRACE0(str) | ||
385 | #define DEBUG_LVL_19_TRACE1(str,p1) TRACE1(str,p1) | ||
386 | #define DEBUG_LVL_19_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
387 | #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
388 | #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
389 | #else | ||
390 | #define DEBUG_LVL_19_TRACE0(str) | ||
391 | #define DEBUG_LVL_19_TRACE1(str,p1) | ||
392 | #define DEBUG_LVL_19_TRACE2(str,p1,p2) | ||
393 | #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) | ||
394 | #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) | ||
395 | #endif | ||
396 | |||
397 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_18) | ||
398 | #define DEBUG_LVL_18_TRACE0(str) TRACE0(str) | ||
399 | #define DEBUG_LVL_18_TRACE1(str,p1) TRACE1(str,p1) | ||
400 | #define DEBUG_LVL_18_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
401 | #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
402 | #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
403 | #else | ||
404 | #define DEBUG_LVL_18_TRACE0(str) | ||
405 | #define DEBUG_LVL_18_TRACE1(str,p1) | ||
406 | #define DEBUG_LVL_18_TRACE2(str,p1,p2) | ||
407 | #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) | ||
408 | #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) | ||
409 | #endif | ||
410 | |||
411 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_17) | ||
412 | #define DEBUG_LVL_17_TRACE0(str) TRACE0(str) | ||
413 | #define DEBUG_LVL_17_TRACE1(str,p1) TRACE1(str,p1) | ||
414 | #define DEBUG_LVL_17_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
415 | #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
416 | #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
417 | #else | ||
418 | #define DEBUG_LVL_17_TRACE0(str) | ||
419 | #define DEBUG_LVL_17_TRACE1(str,p1) | ||
420 | #define DEBUG_LVL_17_TRACE2(str,p1,p2) | ||
421 | #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) | ||
422 | #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) | ||
423 | #endif | ||
424 | |||
425 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_16) | ||
426 | #define DEBUG_LVL_16_TRACE0(str) TRACE0(str) | ||
427 | #define DEBUG_LVL_16_TRACE1(str,p1) TRACE1(str,p1) | ||
428 | #define DEBUG_LVL_16_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
429 | #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
430 | #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
431 | #else | ||
432 | #define DEBUG_LVL_16_TRACE0(str) | ||
433 | #define DEBUG_LVL_16_TRACE1(str,p1) | ||
434 | #define DEBUG_LVL_16_TRACE2(str,p1,p2) | ||
435 | #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) | ||
436 | #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) | ||
437 | #endif | ||
438 | |||
439 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_15) | ||
440 | #define DEBUG_LVL_15_TRACE0(str) TRACE0(str) | ||
441 | #define DEBUG_LVL_15_TRACE1(str,p1) TRACE1(str,p1) | ||
442 | #define DEBUG_LVL_15_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
443 | #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
444 | #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
445 | #else | ||
446 | #define DEBUG_LVL_15_TRACE0(str) | ||
447 | #define DEBUG_LVL_15_TRACE1(str,p1) | ||
448 | #define DEBUG_LVL_15_TRACE2(str,p1,p2) | ||
449 | #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) | ||
450 | #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) | ||
451 | #endif | ||
452 | |||
453 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_14) | ||
454 | #define DEBUG_LVL_14_TRACE0(str) TRACE0(str) | ||
455 | #define DEBUG_LVL_14_TRACE1(str,p1) TRACE1(str,p1) | ||
456 | #define DEBUG_LVL_14_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
457 | #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
458 | #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
459 | #else | ||
460 | #define DEBUG_LVL_14_TRACE0(str) | ||
461 | #define DEBUG_LVL_14_TRACE1(str,p1) | ||
462 | #define DEBUG_LVL_14_TRACE2(str,p1,p2) | ||
463 | #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) | ||
464 | #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) | ||
465 | #endif | ||
466 | |||
467 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_13) | ||
468 | #define DEBUG_LVL_13_TRACE0(str) TRACE0(str) | ||
469 | #define DEBUG_LVL_13_TRACE1(str,p1) TRACE1(str,p1) | ||
470 | #define DEBUG_LVL_13_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
471 | #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
472 | #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
473 | #else | ||
474 | #define DEBUG_LVL_13_TRACE0(str) | ||
475 | #define DEBUG_LVL_13_TRACE1(str,p1) | ||
476 | #define DEBUG_LVL_13_TRACE2(str,p1,p2) | ||
477 | #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) | ||
478 | #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) | ||
479 | #endif | ||
480 | |||
481 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_12) | ||
482 | #define DEBUG_LVL_12_TRACE0(str) TRACE0(str) | ||
483 | #define DEBUG_LVL_12_TRACE1(str,p1) TRACE1(str,p1) | ||
484 | #define DEBUG_LVL_12_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
485 | #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
486 | #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
487 | #else | ||
488 | #define DEBUG_LVL_12_TRACE0(str) | ||
489 | #define DEBUG_LVL_12_TRACE1(str,p1) | ||
490 | #define DEBUG_LVL_12_TRACE2(str,p1,p2) | ||
491 | #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) | ||
492 | #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) | ||
493 | #endif | ||
494 | |||
495 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_11) | ||
496 | #define DEBUG_LVL_11_TRACE0(str) TRACE0(str) | ||
497 | #define DEBUG_LVL_11_TRACE1(str,p1) TRACE1(str,p1) | ||
498 | #define DEBUG_LVL_11_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
499 | #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
500 | #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
501 | #else | ||
502 | #define DEBUG_LVL_11_TRACE0(str) | ||
503 | #define DEBUG_LVL_11_TRACE1(str,p1) | ||
504 | #define DEBUG_LVL_11_TRACE2(str,p1,p2) | ||
505 | #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) | ||
506 | #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) | ||
507 | #endif | ||
508 | |||
509 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_10) | ||
510 | #define DEBUG_LVL_10_TRACE0(str) TRACE0(str) | ||
511 | #define DEBUG_LVL_10_TRACE1(str,p1) TRACE1(str,p1) | ||
512 | #define DEBUG_LVL_10_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
513 | #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
514 | #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
515 | #else | ||
516 | #define DEBUG_LVL_10_TRACE0(str) | ||
517 | #define DEBUG_LVL_10_TRACE1(str,p1) | ||
518 | #define DEBUG_LVL_10_TRACE2(str,p1,p2) | ||
519 | #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) | ||
520 | #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) | ||
521 | #endif | ||
522 | |||
523 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_09) | ||
524 | #define DEBUG_LVL_09_TRACE0(str) TRACE0(str) | ||
525 | #define DEBUG_LVL_09_TRACE1(str,p1) TRACE1(str,p1) | ||
526 | #define DEBUG_LVL_09_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
527 | #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
528 | #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
529 | #else | ||
530 | #define DEBUG_LVL_09_TRACE0(str) | ||
531 | #define DEBUG_LVL_09_TRACE1(str,p1) | ||
532 | #define DEBUG_LVL_09_TRACE2(str,p1,p2) | ||
533 | #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) | ||
534 | #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) | ||
535 | #endif | ||
536 | |||
537 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_08) | ||
538 | #define DEBUG_LVL_08_TRACE0(str) TRACE0(str) | ||
539 | #define DEBUG_LVL_08_TRACE1(str,p1) TRACE1(str,p1) | ||
540 | #define DEBUG_LVL_08_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
541 | #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
542 | #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
543 | #else | ||
544 | #define DEBUG_LVL_08_TRACE0(str) | ||
545 | #define DEBUG_LVL_08_TRACE1(str,p1) | ||
546 | #define DEBUG_LVL_08_TRACE2(str,p1,p2) | ||
547 | #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) | ||
548 | #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) | ||
549 | #endif | ||
550 | |||
551 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_07) | ||
552 | #define DEBUG_LVL_07_TRACE0(str) TRACE0(str) | ||
553 | #define DEBUG_LVL_07_TRACE1(str,p1) TRACE1(str,p1) | ||
554 | #define DEBUG_LVL_07_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
555 | #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
556 | #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
557 | #else | ||
558 | #define DEBUG_LVL_07_TRACE0(str) | ||
559 | #define DEBUG_LVL_07_TRACE1(str,p1) | ||
560 | #define DEBUG_LVL_07_TRACE2(str,p1,p2) | ||
561 | #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) | ||
562 | #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) | ||
563 | #endif | ||
564 | |||
565 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_06) | ||
566 | #define DEBUG_LVL_06_TRACE0(str) TRACE0(str) | ||
567 | #define DEBUG_LVL_06_TRACE1(str,p1) TRACE1(str,p1) | ||
568 | #define DEBUG_LVL_06_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
569 | #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
570 | #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
571 | #else | ||
572 | #define DEBUG_LVL_06_TRACE0(str) | ||
573 | #define DEBUG_LVL_06_TRACE1(str,p1) | ||
574 | #define DEBUG_LVL_06_TRACE2(str,p1,p2) | ||
575 | #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) | ||
576 | #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) | ||
577 | #endif | ||
578 | |||
579 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_05) | ||
580 | #define DEBUG_LVL_05_TRACE0(str) TRACE0(str) | ||
581 | #define DEBUG_LVL_05_TRACE1(str,p1) TRACE1(str,p1) | ||
582 | #define DEBUG_LVL_05_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
583 | #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
584 | #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
585 | #else | ||
586 | #define DEBUG_LVL_05_TRACE0(str) | ||
587 | #define DEBUG_LVL_05_TRACE1(str,p1) | ||
588 | #define DEBUG_LVL_05_TRACE2(str,p1,p2) | ||
589 | #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) | ||
590 | #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) | ||
591 | #endif | ||
592 | |||
593 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_04) | ||
594 | #define DEBUG_LVL_04_TRACE0(str) TRACE0(str) | ||
595 | #define DEBUG_LVL_04_TRACE1(str,p1) TRACE1(str,p1) | ||
596 | #define DEBUG_LVL_04_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
597 | #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
598 | #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
599 | #else | ||
600 | #define DEBUG_LVL_04_TRACE0(str) | ||
601 | #define DEBUG_LVL_04_TRACE1(str,p1) | ||
602 | #define DEBUG_LVL_04_TRACE2(str,p1,p2) | ||
603 | #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) | ||
604 | #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) | ||
605 | #endif | ||
606 | |||
607 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_03) | ||
608 | #define DEBUG_LVL_03_TRACE0(str) TRACE0(str) | ||
609 | #define DEBUG_LVL_03_TRACE1(str,p1) TRACE1(str,p1) | ||
610 | #define DEBUG_LVL_03_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
611 | #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
612 | #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
613 | #else | ||
614 | #define DEBUG_LVL_03_TRACE0(str) | ||
615 | #define DEBUG_LVL_03_TRACE1(str,p1) | ||
616 | #define DEBUG_LVL_03_TRACE2(str,p1,p2) | ||
617 | #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) | ||
618 | #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) | ||
619 | #endif | ||
620 | |||
621 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_02) | ||
622 | #define DEBUG_LVL_02_TRACE0(str) TRACE0(str) | ||
623 | #define DEBUG_LVL_02_TRACE1(str,p1) TRACE1(str,p1) | ||
624 | #define DEBUG_LVL_02_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
625 | #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
626 | #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
627 | #else | ||
628 | #define DEBUG_LVL_02_TRACE0(str) | ||
629 | #define DEBUG_LVL_02_TRACE1(str,p1) | ||
630 | #define DEBUG_LVL_02_TRACE2(str,p1,p2) | ||
631 | #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) | ||
632 | #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) | ||
633 | #endif | ||
634 | |||
635 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_01) | ||
636 | #define DEBUG_LVL_01_TRACE0(str) TRACE0(str) | ||
637 | #define DEBUG_LVL_01_TRACE1(str,p1) TRACE1(str,p1) | ||
638 | #define DEBUG_LVL_01_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
639 | #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
640 | #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
641 | #else | ||
642 | #define DEBUG_LVL_01_TRACE0(str) | ||
643 | #define DEBUG_LVL_01_TRACE1(str,p1) | ||
644 | #define DEBUG_LVL_01_TRACE2(str,p1,p2) | ||
645 | #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) | ||
646 | #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) | ||
647 | #endif | ||
648 | |||
649 | #define DEBUG_TRACE0(lvl,str) lvl##_TRACE0(str) | ||
650 | #define DEBUG_TRACE1(lvl,str,p1) lvl##_TRACE1(str,p1) | ||
651 | #define DEBUG_TRACE2(lvl,str,p1,p2) lvl##_TRACE2(str,p1,p2) | ||
652 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) lvl##_TRACE3(str,p1,p2,p3) | ||
653 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) lvl##_TRACE4(str,p1,p2,p3,p4) | ||
654 | 205 | ||
206 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_ERROR) | ||
207 | #define DEBUG_LVL_ERROR_TRACE0(str) TRACE0(str) | ||
208 | #define DEBUG_LVL_ERROR_TRACE1(str,p1) TRACE1(str,p1) | ||
209 | #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
210 | #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
211 | #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
212 | #else | ||
213 | #define DEBUG_LVL_ERROR_TRACE0(str) | ||
214 | #define DEBUG_LVL_ERROR_TRACE1(str,p1) | ||
215 | #define DEBUG_LVL_ERROR_TRACE2(str,p1,p2) | ||
216 | #define DEBUG_LVL_ERROR_TRACE3(str,p1,p2,p3) | ||
217 | #define DEBUG_LVL_ERROR_TRACE4(str,p1,p2,p3,p4) | ||
655 | #endif | 218 | #endif |
656 | 219 | ||
220 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT) | ||
221 | #define DEBUG_LVL_ASSERT_TRACE0(str) TRACE0(str) | ||
222 | #define DEBUG_LVL_ASSERT_TRACE1(str,p1) TRACE1(str,p1) | ||
223 | #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
224 | #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
225 | #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
226 | #else | ||
227 | #define DEBUG_LVL_ASSERT_TRACE0(str) | ||
228 | #define DEBUG_LVL_ASSERT_TRACE1(str,p1) | ||
229 | #define DEBUG_LVL_ASSERT_TRACE2(str,p1,p2) | ||
230 | #define DEBUG_LVL_ASSERT_TRACE3(str,p1,p2,p3) | ||
231 | #define DEBUG_LVL_ASSERT_TRACE4(str,p1,p2,p3,p4) | ||
232 | #endif | ||
233 | |||
234 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_29) | ||
235 | #define DEBUG_LVL_29_TRACE0(str) TRACE0(str) | ||
236 | #define DEBUG_LVL_29_TRACE1(str,p1) TRACE1(str,p1) | ||
237 | #define DEBUG_LVL_29_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
238 | #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
239 | #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
240 | #else | ||
241 | #define DEBUG_LVL_29_TRACE0(str) | ||
242 | #define DEBUG_LVL_29_TRACE1(str,p1) | ||
243 | #define DEBUG_LVL_29_TRACE2(str,p1,p2) | ||
244 | #define DEBUG_LVL_29_TRACE3(str,p1,p2,p3) | ||
245 | #define DEBUG_LVL_29_TRACE4(str,p1,p2,p3,p4) | ||
246 | #endif | ||
247 | |||
248 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_28) | ||
249 | #define DEBUG_LVL_28_TRACE0(str) TRACE0(str) | ||
250 | #define DEBUG_LVL_28_TRACE1(str,p1) TRACE1(str,p1) | ||
251 | #define DEBUG_LVL_28_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
252 | #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
253 | #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
254 | #else | ||
255 | #define DEBUG_LVL_28_TRACE0(str) | ||
256 | #define DEBUG_LVL_28_TRACE1(str,p1) | ||
257 | #define DEBUG_LVL_28_TRACE2(str,p1,p2) | ||
258 | #define DEBUG_LVL_28_TRACE3(str,p1,p2,p3) | ||
259 | #define DEBUG_LVL_28_TRACE4(str,p1,p2,p3,p4) | ||
260 | #endif | ||
261 | |||
262 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_27) | ||
263 | #define DEBUG_LVL_27_TRACE0(str) TRACE0(str) | ||
264 | #define DEBUG_LVL_27_TRACE1(str,p1) TRACE1(str,p1) | ||
265 | #define DEBUG_LVL_27_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
266 | #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
267 | #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
268 | #else | ||
269 | #define DEBUG_LVL_27_TRACE0(str) | ||
270 | #define DEBUG_LVL_27_TRACE1(str,p1) | ||
271 | #define DEBUG_LVL_27_TRACE2(str,p1,p2) | ||
272 | #define DEBUG_LVL_27_TRACE3(str,p1,p2,p3) | ||
273 | #define DEBUG_LVL_27_TRACE4(str,p1,p2,p3,p4) | ||
274 | #endif | ||
275 | |||
276 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_26) | ||
277 | #define DEBUG_LVL_26_TRACE0(str) TRACE0(str) | ||
278 | #define DEBUG_LVL_26_TRACE1(str,p1) TRACE1(str,p1) | ||
279 | #define DEBUG_LVL_26_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
280 | #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
281 | #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
282 | #else | ||
283 | #define DEBUG_LVL_26_TRACE0(str) | ||
284 | #define DEBUG_LVL_26_TRACE1(str,p1) | ||
285 | #define DEBUG_LVL_26_TRACE2(str,p1,p2) | ||
286 | #define DEBUG_LVL_26_TRACE3(str,p1,p2,p3) | ||
287 | #define DEBUG_LVL_26_TRACE4(str,p1,p2,p3,p4) | ||
288 | #endif | ||
289 | |||
290 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_25) | ||
291 | #define DEBUG_LVL_25_TRACE0(str) TRACE0(str) | ||
292 | #define DEBUG_LVL_25_TRACE1(str,p1) TRACE1(str,p1) | ||
293 | #define DEBUG_LVL_25_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
294 | #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
295 | #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
296 | #else | ||
297 | #define DEBUG_LVL_25_TRACE0(str) | ||
298 | #define DEBUG_LVL_25_TRACE1(str,p1) | ||
299 | #define DEBUG_LVL_25_TRACE2(str,p1,p2) | ||
300 | #define DEBUG_LVL_25_TRACE3(str,p1,p2,p3) | ||
301 | #define DEBUG_LVL_25_TRACE4(str,p1,p2,p3,p4) | ||
302 | #endif | ||
303 | |||
304 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_24) | ||
305 | #define DEBUG_LVL_24_TRACE0(str) TRACE0(str) | ||
306 | #define DEBUG_LVL_24_TRACE1(str,p1) TRACE1(str,p1) | ||
307 | #define DEBUG_LVL_24_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
308 | #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
309 | #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
310 | #else | ||
311 | #define DEBUG_LVL_24_TRACE0(str) | ||
312 | #define DEBUG_LVL_24_TRACE1(str,p1) | ||
313 | #define DEBUG_LVL_24_TRACE2(str,p1,p2) | ||
314 | #define DEBUG_LVL_24_TRACE3(str,p1,p2,p3) | ||
315 | #define DEBUG_LVL_24_TRACE4(str,p1,p2,p3,p4) | ||
316 | #endif | ||
317 | |||
318 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_23) | ||
319 | #define DEBUG_LVL_23_TRACE0(str) TRACE0(str) | ||
320 | #define DEBUG_LVL_23_TRACE1(str,p1) TRACE1(str,p1) | ||
321 | #define DEBUG_LVL_23_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
322 | #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
323 | #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
324 | #else | ||
325 | #define DEBUG_LVL_23_TRACE0(str) | ||
326 | #define DEBUG_LVL_23_TRACE1(str,p1) | ||
327 | #define DEBUG_LVL_23_TRACE2(str,p1,p2) | ||
328 | #define DEBUG_LVL_23_TRACE3(str,p1,p2,p3) | ||
329 | #define DEBUG_LVL_23_TRACE4(str,p1,p2,p3,p4) | ||
330 | #endif | ||
331 | |||
332 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_22) | ||
333 | #define DEBUG_LVL_22_TRACE0(str) TRACE0(str) | ||
334 | #define DEBUG_LVL_22_TRACE1(str,p1) TRACE1(str,p1) | ||
335 | #define DEBUG_LVL_22_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
336 | #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
337 | #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
338 | #else | ||
339 | #define DEBUG_LVL_22_TRACE0(str) | ||
340 | #define DEBUG_LVL_22_TRACE1(str,p1) | ||
341 | #define DEBUG_LVL_22_TRACE2(str,p1,p2) | ||
342 | #define DEBUG_LVL_22_TRACE3(str,p1,p2,p3) | ||
343 | #define DEBUG_LVL_22_TRACE4(str,p1,p2,p3,p4) | ||
344 | #endif | ||
345 | |||
346 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_21) | ||
347 | #define DEBUG_LVL_21_TRACE0(str) TRACE0(str) | ||
348 | #define DEBUG_LVL_21_TRACE1(str,p1) TRACE1(str,p1) | ||
349 | #define DEBUG_LVL_21_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
350 | #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
351 | #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
352 | #else | ||
353 | #define DEBUG_LVL_21_TRACE0(str) | ||
354 | #define DEBUG_LVL_21_TRACE1(str,p1) | ||
355 | #define DEBUG_LVL_21_TRACE2(str,p1,p2) | ||
356 | #define DEBUG_LVL_21_TRACE3(str,p1,p2,p3) | ||
357 | #define DEBUG_LVL_21_TRACE4(str,p1,p2,p3,p4) | ||
358 | #endif | ||
359 | |||
360 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_20) | ||
361 | #define DEBUG_LVL_20_TRACE0(str) TRACE0(str) | ||
362 | #define DEBUG_LVL_20_TRACE1(str,p1) TRACE1(str,p1) | ||
363 | #define DEBUG_LVL_20_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
364 | #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
365 | #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
366 | #else | ||
367 | #define DEBUG_LVL_20_TRACE0(str) | ||
368 | #define DEBUG_LVL_20_TRACE1(str,p1) | ||
369 | #define DEBUG_LVL_20_TRACE2(str,p1,p2) | ||
370 | #define DEBUG_LVL_20_TRACE3(str,p1,p2,p3) | ||
371 | #define DEBUG_LVL_20_TRACE4(str,p1,p2,p3,p4) | ||
372 | #endif | ||
373 | |||
374 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_19) | ||
375 | #define DEBUG_LVL_19_TRACE0(str) TRACE0(str) | ||
376 | #define DEBUG_LVL_19_TRACE1(str,p1) TRACE1(str,p1) | ||
377 | #define DEBUG_LVL_19_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
378 | #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
379 | #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
380 | #else | ||
381 | #define DEBUG_LVL_19_TRACE0(str) | ||
382 | #define DEBUG_LVL_19_TRACE1(str,p1) | ||
383 | #define DEBUG_LVL_19_TRACE2(str,p1,p2) | ||
384 | #define DEBUG_LVL_19_TRACE3(str,p1,p2,p3) | ||
385 | #define DEBUG_LVL_19_TRACE4(str,p1,p2,p3,p4) | ||
386 | #endif | ||
387 | |||
388 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_18) | ||
389 | #define DEBUG_LVL_18_TRACE0(str) TRACE0(str) | ||
390 | #define DEBUG_LVL_18_TRACE1(str,p1) TRACE1(str,p1) | ||
391 | #define DEBUG_LVL_18_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
392 | #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
393 | #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
394 | #else | ||
395 | #define DEBUG_LVL_18_TRACE0(str) | ||
396 | #define DEBUG_LVL_18_TRACE1(str,p1) | ||
397 | #define DEBUG_LVL_18_TRACE2(str,p1,p2) | ||
398 | #define DEBUG_LVL_18_TRACE3(str,p1,p2,p3) | ||
399 | #define DEBUG_LVL_18_TRACE4(str,p1,p2,p3,p4) | ||
400 | #endif | ||
401 | |||
402 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_17) | ||
403 | #define DEBUG_LVL_17_TRACE0(str) TRACE0(str) | ||
404 | #define DEBUG_LVL_17_TRACE1(str,p1) TRACE1(str,p1) | ||
405 | #define DEBUG_LVL_17_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
406 | #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
407 | #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
408 | #else | ||
409 | #define DEBUG_LVL_17_TRACE0(str) | ||
410 | #define DEBUG_LVL_17_TRACE1(str,p1) | ||
411 | #define DEBUG_LVL_17_TRACE2(str,p1,p2) | ||
412 | #define DEBUG_LVL_17_TRACE3(str,p1,p2,p3) | ||
413 | #define DEBUG_LVL_17_TRACE4(str,p1,p2,p3,p4) | ||
414 | #endif | ||
415 | |||
416 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_16) | ||
417 | #define DEBUG_LVL_16_TRACE0(str) TRACE0(str) | ||
418 | #define DEBUG_LVL_16_TRACE1(str,p1) TRACE1(str,p1) | ||
419 | #define DEBUG_LVL_16_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
420 | #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
421 | #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
422 | #else | ||
423 | #define DEBUG_LVL_16_TRACE0(str) | ||
424 | #define DEBUG_LVL_16_TRACE1(str,p1) | ||
425 | #define DEBUG_LVL_16_TRACE2(str,p1,p2) | ||
426 | #define DEBUG_LVL_16_TRACE3(str,p1,p2,p3) | ||
427 | #define DEBUG_LVL_16_TRACE4(str,p1,p2,p3,p4) | ||
428 | #endif | ||
429 | |||
430 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_15) | ||
431 | #define DEBUG_LVL_15_TRACE0(str) TRACE0(str) | ||
432 | #define DEBUG_LVL_15_TRACE1(str,p1) TRACE1(str,p1) | ||
433 | #define DEBUG_LVL_15_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
434 | #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
435 | #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
436 | #else | ||
437 | #define DEBUG_LVL_15_TRACE0(str) | ||
438 | #define DEBUG_LVL_15_TRACE1(str,p1) | ||
439 | #define DEBUG_LVL_15_TRACE2(str,p1,p2) | ||
440 | #define DEBUG_LVL_15_TRACE3(str,p1,p2,p3) | ||
441 | #define DEBUG_LVL_15_TRACE4(str,p1,p2,p3,p4) | ||
442 | #endif | ||
443 | |||
444 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_14) | ||
445 | #define DEBUG_LVL_14_TRACE0(str) TRACE0(str) | ||
446 | #define DEBUG_LVL_14_TRACE1(str,p1) TRACE1(str,p1) | ||
447 | #define DEBUG_LVL_14_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
448 | #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
449 | #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
450 | #else | ||
451 | #define DEBUG_LVL_14_TRACE0(str) | ||
452 | #define DEBUG_LVL_14_TRACE1(str,p1) | ||
453 | #define DEBUG_LVL_14_TRACE2(str,p1,p2) | ||
454 | #define DEBUG_LVL_14_TRACE3(str,p1,p2,p3) | ||
455 | #define DEBUG_LVL_14_TRACE4(str,p1,p2,p3,p4) | ||
456 | #endif | ||
457 | |||
458 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_13) | ||
459 | #define DEBUG_LVL_13_TRACE0(str) TRACE0(str) | ||
460 | #define DEBUG_LVL_13_TRACE1(str,p1) TRACE1(str,p1) | ||
461 | #define DEBUG_LVL_13_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
462 | #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
463 | #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
464 | #else | ||
465 | #define DEBUG_LVL_13_TRACE0(str) | ||
466 | #define DEBUG_LVL_13_TRACE1(str,p1) | ||
467 | #define DEBUG_LVL_13_TRACE2(str,p1,p2) | ||
468 | #define DEBUG_LVL_13_TRACE3(str,p1,p2,p3) | ||
469 | #define DEBUG_LVL_13_TRACE4(str,p1,p2,p3,p4) | ||
470 | #endif | ||
471 | |||
472 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_12) | ||
473 | #define DEBUG_LVL_12_TRACE0(str) TRACE0(str) | ||
474 | #define DEBUG_LVL_12_TRACE1(str,p1) TRACE1(str,p1) | ||
475 | #define DEBUG_LVL_12_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
476 | #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
477 | #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
478 | #else | ||
479 | #define DEBUG_LVL_12_TRACE0(str) | ||
480 | #define DEBUG_LVL_12_TRACE1(str,p1) | ||
481 | #define DEBUG_LVL_12_TRACE2(str,p1,p2) | ||
482 | #define DEBUG_LVL_12_TRACE3(str,p1,p2,p3) | ||
483 | #define DEBUG_LVL_12_TRACE4(str,p1,p2,p3,p4) | ||
484 | #endif | ||
485 | |||
486 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_11) | ||
487 | #define DEBUG_LVL_11_TRACE0(str) TRACE0(str) | ||
488 | #define DEBUG_LVL_11_TRACE1(str,p1) TRACE1(str,p1) | ||
489 | #define DEBUG_LVL_11_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
490 | #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
491 | #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
492 | #else | ||
493 | #define DEBUG_LVL_11_TRACE0(str) | ||
494 | #define DEBUG_LVL_11_TRACE1(str,p1) | ||
495 | #define DEBUG_LVL_11_TRACE2(str,p1,p2) | ||
496 | #define DEBUG_LVL_11_TRACE3(str,p1,p2,p3) | ||
497 | #define DEBUG_LVL_11_TRACE4(str,p1,p2,p3,p4) | ||
498 | #endif | ||
499 | |||
500 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_10) | ||
501 | #define DEBUG_LVL_10_TRACE0(str) TRACE0(str) | ||
502 | #define DEBUG_LVL_10_TRACE1(str,p1) TRACE1(str,p1) | ||
503 | #define DEBUG_LVL_10_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
504 | #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
505 | #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
506 | #else | ||
507 | #define DEBUG_LVL_10_TRACE0(str) | ||
508 | #define DEBUG_LVL_10_TRACE1(str,p1) | ||
509 | #define DEBUG_LVL_10_TRACE2(str,p1,p2) | ||
510 | #define DEBUG_LVL_10_TRACE3(str,p1,p2,p3) | ||
511 | #define DEBUG_LVL_10_TRACE4(str,p1,p2,p3,p4) | ||
512 | #endif | ||
513 | |||
514 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_09) | ||
515 | #define DEBUG_LVL_09_TRACE0(str) TRACE0(str) | ||
516 | #define DEBUG_LVL_09_TRACE1(str,p1) TRACE1(str,p1) | ||
517 | #define DEBUG_LVL_09_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
518 | #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
519 | #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
520 | #else | ||
521 | #define DEBUG_LVL_09_TRACE0(str) | ||
522 | #define DEBUG_LVL_09_TRACE1(str,p1) | ||
523 | #define DEBUG_LVL_09_TRACE2(str,p1,p2) | ||
524 | #define DEBUG_LVL_09_TRACE3(str,p1,p2,p3) | ||
525 | #define DEBUG_LVL_09_TRACE4(str,p1,p2,p3,p4) | ||
526 | #endif | ||
527 | |||
528 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_08) | ||
529 | #define DEBUG_LVL_08_TRACE0(str) TRACE0(str) | ||
530 | #define DEBUG_LVL_08_TRACE1(str,p1) TRACE1(str,p1) | ||
531 | #define DEBUG_LVL_08_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
532 | #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
533 | #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
534 | #else | ||
535 | #define DEBUG_LVL_08_TRACE0(str) | ||
536 | #define DEBUG_LVL_08_TRACE1(str,p1) | ||
537 | #define DEBUG_LVL_08_TRACE2(str,p1,p2) | ||
538 | #define DEBUG_LVL_08_TRACE3(str,p1,p2,p3) | ||
539 | #define DEBUG_LVL_08_TRACE4(str,p1,p2,p3,p4) | ||
540 | #endif | ||
541 | |||
542 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_07) | ||
543 | #define DEBUG_LVL_07_TRACE0(str) TRACE0(str) | ||
544 | #define DEBUG_LVL_07_TRACE1(str,p1) TRACE1(str,p1) | ||
545 | #define DEBUG_LVL_07_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
546 | #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
547 | #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
548 | #else | ||
549 | #define DEBUG_LVL_07_TRACE0(str) | ||
550 | #define DEBUG_LVL_07_TRACE1(str,p1) | ||
551 | #define DEBUG_LVL_07_TRACE2(str,p1,p2) | ||
552 | #define DEBUG_LVL_07_TRACE3(str,p1,p2,p3) | ||
553 | #define DEBUG_LVL_07_TRACE4(str,p1,p2,p3,p4) | ||
554 | #endif | ||
555 | |||
556 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_06) | ||
557 | #define DEBUG_LVL_06_TRACE0(str) TRACE0(str) | ||
558 | #define DEBUG_LVL_06_TRACE1(str,p1) TRACE1(str,p1) | ||
559 | #define DEBUG_LVL_06_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
560 | #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
561 | #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
562 | #else | ||
563 | #define DEBUG_LVL_06_TRACE0(str) | ||
564 | #define DEBUG_LVL_06_TRACE1(str,p1) | ||
565 | #define DEBUG_LVL_06_TRACE2(str,p1,p2) | ||
566 | #define DEBUG_LVL_06_TRACE3(str,p1,p2,p3) | ||
567 | #define DEBUG_LVL_06_TRACE4(str,p1,p2,p3,p4) | ||
568 | #endif | ||
569 | |||
570 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_05) | ||
571 | #define DEBUG_LVL_05_TRACE0(str) TRACE0(str) | ||
572 | #define DEBUG_LVL_05_TRACE1(str,p1) TRACE1(str,p1) | ||
573 | #define DEBUG_LVL_05_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
574 | #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
575 | #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
576 | #else | ||
577 | #define DEBUG_LVL_05_TRACE0(str) | ||
578 | #define DEBUG_LVL_05_TRACE1(str,p1) | ||
579 | #define DEBUG_LVL_05_TRACE2(str,p1,p2) | ||
580 | #define DEBUG_LVL_05_TRACE3(str,p1,p2,p3) | ||
581 | #define DEBUG_LVL_05_TRACE4(str,p1,p2,p3,p4) | ||
582 | #endif | ||
583 | |||
584 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_04) | ||
585 | #define DEBUG_LVL_04_TRACE0(str) TRACE0(str) | ||
586 | #define DEBUG_LVL_04_TRACE1(str,p1) TRACE1(str,p1) | ||
587 | #define DEBUG_LVL_04_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
588 | #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
589 | #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
590 | #else | ||
591 | #define DEBUG_LVL_04_TRACE0(str) | ||
592 | #define DEBUG_LVL_04_TRACE1(str,p1) | ||
593 | #define DEBUG_LVL_04_TRACE2(str,p1,p2) | ||
594 | #define DEBUG_LVL_04_TRACE3(str,p1,p2,p3) | ||
595 | #define DEBUG_LVL_04_TRACE4(str,p1,p2,p3,p4) | ||
596 | #endif | ||
597 | |||
598 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_03) | ||
599 | #define DEBUG_LVL_03_TRACE0(str) TRACE0(str) | ||
600 | #define DEBUG_LVL_03_TRACE1(str,p1) TRACE1(str,p1) | ||
601 | #define DEBUG_LVL_03_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
602 | #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
603 | #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
604 | #else | ||
605 | #define DEBUG_LVL_03_TRACE0(str) | ||
606 | #define DEBUG_LVL_03_TRACE1(str,p1) | ||
607 | #define DEBUG_LVL_03_TRACE2(str,p1,p2) | ||
608 | #define DEBUG_LVL_03_TRACE3(str,p1,p2,p3) | ||
609 | #define DEBUG_LVL_03_TRACE4(str,p1,p2,p3,p4) | ||
610 | #endif | ||
611 | |||
612 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_02) | ||
613 | #define DEBUG_LVL_02_TRACE0(str) TRACE0(str) | ||
614 | #define DEBUG_LVL_02_TRACE1(str,p1) TRACE1(str,p1) | ||
615 | #define DEBUG_LVL_02_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
616 | #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
617 | #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
618 | #else | ||
619 | #define DEBUG_LVL_02_TRACE0(str) | ||
620 | #define DEBUG_LVL_02_TRACE1(str,p1) | ||
621 | #define DEBUG_LVL_02_TRACE2(str,p1,p2) | ||
622 | #define DEBUG_LVL_02_TRACE3(str,p1,p2,p3) | ||
623 | #define DEBUG_LVL_02_TRACE4(str,p1,p2,p3,p4) | ||
624 | #endif | ||
625 | |||
626 | #if (DEBUG_GLB_LVL() & DEBUG_LVL_01) | ||
627 | #define DEBUG_LVL_01_TRACE0(str) TRACE0(str) | ||
628 | #define DEBUG_LVL_01_TRACE1(str,p1) TRACE1(str,p1) | ||
629 | #define DEBUG_LVL_01_TRACE2(str,p1,p2) TRACE2(str,p1,p2) | ||
630 | #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) TRACE3(str,p1,p2,p3) | ||
631 | #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) TRACE4(str,p1,p2,p3,p4) | ||
632 | #else | ||
633 | #define DEBUG_LVL_01_TRACE0(str) | ||
634 | #define DEBUG_LVL_01_TRACE1(str,p1) | ||
635 | #define DEBUG_LVL_01_TRACE2(str,p1,p2) | ||
636 | #define DEBUG_LVL_01_TRACE3(str,p1,p2,p3) | ||
637 | #define DEBUG_LVL_01_TRACE4(str,p1,p2,p3,p4) | ||
638 | #endif | ||
639 | |||
640 | #define DEBUG_TRACE0(lvl,str) lvl##_TRACE0(str) | ||
641 | #define DEBUG_TRACE1(lvl,str,p1) lvl##_TRACE1(str,p1) | ||
642 | #define DEBUG_TRACE2(lvl,str,p1,p2) lvl##_TRACE2(str,p1,p2) | ||
643 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) lvl##_TRACE3(str,p1,p2,p3) | ||
644 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) lvl##_TRACE4(str,p1,p2,p3,p4) | ||
645 | |||
646 | #endif | ||
657 | 647 | ||
658 | //--------------------------------------------------------------------------- | 648 | //--------------------------------------------------------------------------- |
659 | // The macro DEBUG_DUMP_DATA() can be used with the same debug-levels to dump | 649 | // The macro DEBUG_DUMP_DATA() can be used with the same debug-levels to dump |
@@ -661,27 +651,23 @@ | |||
661 | // NOTE: DUMP_DATA has to be defined in project settings. | 651 | // NOTE: DUMP_DATA has to be defined in project settings. |
662 | #if (!defined (NDEBUG) && defined (DUMP_DATA)) || (DEV_SYSTEM == _DEV_WIN32_) | 652 | #if (!defined (NDEBUG) && defined (DUMP_DATA)) || (DEV_SYSTEM == _DEV_WIN32_) |
663 | 653 | ||
664 | #ifdef __cplusplus | 654 | #ifdef __cplusplus |
665 | extern "C" | 655 | extern "C" { |
666 | { | 656 | #endif |
667 | #endif | ||
668 | |||
669 | void DumpData (char* szStr_p, BYTE MEM* pbData_p, WORD wSize_p); | ||
670 | 657 | ||
671 | #ifdef __cplusplus | 658 | void DumpData(char *szStr_p, BYTE MEM * pbData_p, WORD wSize_p); |
672 | } // von extern "C" | ||
673 | #endif | ||
674 | 659 | ||
675 | #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \ | 660 | #ifdef __cplusplus |
661 | } // von extern "C" | ||
662 | #endif | ||
663 | #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \ | ||
676 | DumpData (str, (BYTE MEM*) (ptr), (WORD) (siz)); | 664 | DumpData (str, (BYTE MEM*) (ptr), (WORD) (siz)); |
677 | |||
678 | #else | 665 | #else |
679 | 666 | ||
680 | #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) | 667 | #define DEBUG_DUMP_DATA(lvl,str,ptr,siz) |
681 | 668 | ||
682 | #endif | 669 | #endif |
683 | 670 | ||
684 | |||
685 | //--------------------------------------------------------------------------- | 671 | //--------------------------------------------------------------------------- |
686 | // The macro DEBUG_ASSERT() can be used to print out an error string if the | 672 | // The macro DEBUG_ASSERT() can be used to print out an error string if the |
687 | // parametered expresion does not result TRUE. | 673 | // parametered expresion does not result TRUE. |
@@ -689,62 +675,60 @@ | |||
689 | // deleted from compiler (in release version too). | 675 | // deleted from compiler (in release version too). |
690 | #if !defined (NDEBUG) || defined (DEBUG_KEEP_ASSERT) | 676 | #if !defined (NDEBUG) || defined (DEBUG_KEEP_ASSERT) |
691 | 677 | ||
692 | #if (DEV_SYSTEM == _DEV_WIN32_) | 678 | #if (DEV_SYSTEM == _DEV_WIN32_) |
693 | 679 | ||
694 | // For WIN32 process will be killed after closing message box. | 680 | // For WIN32 process will be killed after closing message box. |
695 | 681 | ||
696 | #define DEBUG_ASSERT0(expr,str) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ | 682 | #define DEBUG_ASSERT0(expr,str) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ |
697 | MessageBox (NULL, \ | 683 | MessageBox (NULL, \ |
698 | "Assertion failed: line " __LINE__ " file " __FILE__ \ | 684 | "Assertion failed: line " __LINE__ " file " __FILE__ \ |
699 | "\n -> " str "\n"); \ | 685 | "\n -> " str "\n"); \ |
700 | ExitProcess (-1); } | 686 | ExitProcess (-1); } |
701 | 687 | ||
702 | #define DEBUG_ASSERT1(expr,str,p1) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ | 688 | #define DEBUG_ASSERT1(expr,str,p1) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ |
703 | MessageBox (NULL, \ | 689 | MessageBox (NULL, \ |
704 | "Assertion failed: line " __LINE__ " file " __FILE__ \ | 690 | "Assertion failed: line " __LINE__ " file " __FILE__ \ |
705 | "\n -> " str "\n"); \ | 691 | "\n -> " str "\n"); \ |
706 | ExitProcess (-1); } | 692 | ExitProcess (-1); } |
707 | 693 | ||
708 | #else | 694 | #else |
709 | 695 | ||
710 | // For microcontrollers process will be stopped using endless loop. | 696 | // For microcontrollers process will be stopped using endless loop. |
711 | 697 | ||
712 | #define DEBUG_ASSERT0(expr,str) if (!(expr )) { \ | 698 | #define DEBUG_ASSERT0(expr,str) if (!(expr )) { \ |
713 | DEBUG_LVL_ASSERT_TRACE3 ( \ | 699 | DEBUG_LVL_ASSERT_TRACE3 ( \ |
714 | "Assertion failed: line %d file '%s'\n" \ | 700 | "Assertion failed: line %d file '%s'\n" \ |
715 | " -> '%s'\n", __LINE__, __FILE__, str); \ | 701 | " -> '%s'\n", __LINE__, __FILE__, str); \ |
716 | while (1); } | 702 | while (1); } |
717 | 703 | ||
718 | #define DEBUG_ASSERT1(expr,str,p1) if (!(expr )) { \ | 704 | #define DEBUG_ASSERT1(expr,str,p1) if (!(expr )) { \ |
719 | DEBUG_LVL_ASSERT_TRACE4 ( \ | 705 | DEBUG_LVL_ASSERT_TRACE4 ( \ |
720 | "Assertion failed: line %d file '%s'\n" \ | 706 | "Assertion failed: line %d file '%s'\n" \ |
721 | " -> '%s'\n" \ | 707 | " -> '%s'\n" \ |
722 | " -> 0x%08lX\n", __LINE__, __FILE__, str, (DWORD) p1); \ | 708 | " -> 0x%08lX\n", __LINE__, __FILE__, str, (DWORD) p1); \ |
723 | while (1); } | 709 | while (1); } |
724 | 710 | ||
725 | #endif | 711 | #endif |
726 | 712 | ||
727 | #else | 713 | #else |
728 | 714 | ||
729 | #define DEBUG_ASSERT0(expr,str) | 715 | #define DEBUG_ASSERT0(expr,str) |
730 | #define DEBUG_ASSERT1(expr,str,p1) | 716 | #define DEBUG_ASSERT1(expr,str,p1) |
731 | 717 | ||
732 | #endif | 718 | #endif |
733 | 719 | ||
734 | |||
735 | //--------------------------------------------------------------------------- | 720 | //--------------------------------------------------------------------------- |
736 | // The macro DEBUG_ONLY() implements code, if NDEBUG is not defined. | 721 | // The macro DEBUG_ONLY() implements code, if NDEBUG is not defined. |
737 | #if !defined (DEBUG_ONLY) | 722 | #if !defined (DEBUG_ONLY) |
738 | #if !defined (NDEBUG) | 723 | #if !defined (NDEBUG) |
739 | 724 | ||
740 | #define DEBUG_ONLY(expr) expr | 725 | #define DEBUG_ONLY(expr) expr |
741 | 726 | ||
742 | #else | 727 | #else |
743 | 728 | ||
744 | #define DEBUG_ONLY(expr) | 729 | #define DEBUG_ONLY(expr) |
745 | 730 | ||
746 | #endif | ||
747 | #endif | 731 | #endif |
748 | 732 | #endif | |
749 | 733 | ||
750 | #endif // _DEBUG_H_ | 734 | #endif // _DEBUG_H_ |
diff --git a/drivers/staging/epl/EdrvFec.h b/drivers/staging/epl/EdrvFec.h index 2dd737e0de9b..5f252fbed744 100644 --- a/drivers/staging/epl/EdrvFec.h +++ b/drivers/staging/epl/EdrvFec.h | |||
@@ -73,40 +73,32 @@ | |||
73 | #ifndef _EDRVFEC_H_ | 73 | #ifndef _EDRVFEC_H_ |
74 | #define _EDRVFEC_H_ | 74 | #define _EDRVFEC_H_ |
75 | 75 | ||
76 | |||
77 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
78 | // const defines | 77 | // const defines |
79 | //--------------------------------------------------------------------------- | 78 | //--------------------------------------------------------------------------- |
80 | // do this in config header | 79 | // do this in config header |
81 | #define TARGET_HARDWARE TGTHW_SPLC_CF54 | 80 | #define TARGET_HARDWARE TGTHW_SPLC_CF54 |
82 | 81 | ||
83 | |||
84 | // base addresses | 82 | // base addresses |
85 | #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) | 83 | #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) |
86 | 84 | ||
87 | |||
88 | #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485) | 85 | #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485) |
89 | 86 | ||
90 | |||
91 | #else | 87 | #else |
92 | 88 | ||
93 | #error 'ERROR: Target was never implemented!' | 89 | #error 'ERROR: Target was never implemented!' |
94 | 90 | ||
95 | #endif | 91 | #endif |
96 | 92 | ||
97 | |||
98 | |||
99 | //--------------------------------------------------------------------------- | 93 | //--------------------------------------------------------------------------- |
100 | // types | 94 | // types |
101 | //--------------------------------------------------------------------------- | 95 | //--------------------------------------------------------------------------- |
102 | 96 | ||
103 | |||
104 | // Rx and Tx buffer descriptor format | 97 | // Rx and Tx buffer descriptor format |
105 | typedef struct | 98 | typedef struct { |
106 | { | 99 | WORD m_wStatus; // control / status --- used by edrv, do not change in application |
107 | WORD m_wStatus; // control / status --- used by edrv, do not change in application | 100 | WORD m_wLength; // transfer length |
108 | WORD m_wLength; // transfer length | 101 | BYTE *m_pbData; // buffer address |
109 | BYTE * m_pbData; // buffer address | ||
110 | } tBufferDescr; | 102 | } tBufferDescr; |
111 | 103 | ||
112 | #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) | 104 | #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) |
@@ -119,8 +111,4 @@ typedef struct | |||
119 | // function prototypes | 111 | // function prototypes |
120 | //--------------------------------------------------------------------------- | 112 | //--------------------------------------------------------------------------- |
121 | 113 | ||
122 | 114 | #endif // #ifndef _EDRV_FEC_H_ | |
123 | |||
124 | #endif // #ifndef _EDRV_FEC_H_ | ||
125 | |||
126 | |||
diff --git a/drivers/staging/epl/EdrvFec5282.h b/drivers/staging/epl/EdrvFec5282.h index 8213d0ade2b2..a16bb1d4da79 100644 --- a/drivers/staging/epl/EdrvFec5282.h +++ b/drivers/staging/epl/EdrvFec5282.h | |||
@@ -73,94 +73,93 @@ | |||
73 | #ifndef _EDRVFEC_H_ | 73 | #ifndef _EDRVFEC_H_ |
74 | #define _EDRVFEC_H_ | 74 | #define _EDRVFEC_H_ |
75 | 75 | ||
76 | |||
77 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
78 | // const defines | 77 | // const defines |
79 | //--------------------------------------------------------------------------- | 78 | //--------------------------------------------------------------------------- |
80 | // base addresses | 79 | // base addresses |
81 | #define FEC0_ADDR 0x0000 | 80 | #define FEC0_ADDR 0x0000 |
82 | #define FEC1_ADDR 0x0000 //tbd | 81 | #define FEC1_ADDR 0x0000 //tbd |
83 | 82 | ||
84 | // control / status registers | 83 | // control / status registers |
85 | #define FEC_EIR 0x1004 // interrupt event register | 84 | #define FEC_EIR 0x1004 // interrupt event register |
86 | #define FEC_EIMR 0x1008 // interrupt mask register | 85 | #define FEC_EIMR 0x1008 // interrupt mask register |
87 | #define FEC_RDAR 0x1010 // receive descriptor active register | 86 | #define FEC_RDAR 0x1010 // receive descriptor active register |
88 | #define FEC_TDAR 0x1014 // transmit descriptor active register | 87 | #define FEC_TDAR 0x1014 // transmit descriptor active register |
89 | #define FEC_ECR 0x1024 // ethernet control register | 88 | #define FEC_ECR 0x1024 // ethernet control register |
90 | #define FEC_MMFR 0x1040 // MII data register | 89 | #define FEC_MMFR 0x1040 // MII data register |
91 | #define FEC_MSCR 0x1044 // MII speed register | 90 | #define FEC_MSCR 0x1044 // MII speed register |
92 | #define FEC_MIBC 0x1064 // MIB control/status register | 91 | #define FEC_MIBC 0x1064 // MIB control/status register |
93 | #define FEC_RCR 0x1084 // receive control register | 92 | #define FEC_RCR 0x1084 // receive control register |
94 | #define FEC_TCR 0x10C4 // transmit control register | 93 | #define FEC_TCR 0x10C4 // transmit control register |
95 | #define FEC_PALR 0x10E4 // physical address low register | 94 | #define FEC_PALR 0x10E4 // physical address low register |
96 | #define FEC_PAUR 0x10E8 // physical address high + type register | 95 | #define FEC_PAUR 0x10E8 // physical address high + type register |
97 | #define FEC_OPD 0x10EC // opcode + pause register | 96 | #define FEC_OPD 0x10EC // opcode + pause register |
98 | #define FEC_IAUR 0x1118 // upper 32 bit of individual hash table | 97 | #define FEC_IAUR 0x1118 // upper 32 bit of individual hash table |
99 | #define FEC_IALR 0x111C // lower 32 bit of individual hash table | 98 | #define FEC_IALR 0x111C // lower 32 bit of individual hash table |
100 | #define FEC_GAUR 0x1120 // upper 32 bit of group hash table | 99 | #define FEC_GAUR 0x1120 // upper 32 bit of group hash table |
101 | #define FEC_GALR 0x1124 // lower 32 bit of group hash table | 100 | #define FEC_GALR 0x1124 // lower 32 bit of group hash table |
102 | #define FEC_TFWR 0x1144 // transmit FIFO watermark | 101 | #define FEC_TFWR 0x1144 // transmit FIFO watermark |
103 | #define FEC_FRBR 0x114C // FIFO receive bound register | 102 | #define FEC_FRBR 0x114C // FIFO receive bound register |
104 | #define FEC_FRSR 0x1150 // FIFO receive FIFO start register | 103 | #define FEC_FRSR 0x1150 // FIFO receive FIFO start register |
105 | #define FEC_ERDSR 0x1180 // pointer to receive descriptor ring | 104 | #define FEC_ERDSR 0x1180 // pointer to receive descriptor ring |
106 | #define FEC_ETDSR 0x1184 // pointer to transmit descriptor ring | 105 | #define FEC_ETDSR 0x1184 // pointer to transmit descriptor ring |
107 | #define FEC_EMRBR 0x1188 // maximum receive buffer size | 106 | #define FEC_EMRBR 0x1188 // maximum receive buffer size |
108 | 107 | ||
109 | // mib block counters memory map | 108 | // mib block counters memory map |
110 | #define FEC_RMON_T_DROP 0x1200 // count of frames not counted correctly | 109 | #define FEC_RMON_T_DROP 0x1200 // count of frames not counted correctly |
111 | #define FEC_RMON_T_PACKETS 0x1204 // RMON tx packet count | 110 | #define FEC_RMON_T_PACKETS 0x1204 // RMON tx packet count |
112 | #define FEC_RMON_T_BC_PKT 0x1208 // RMON tx broadcast packets | 111 | #define FEC_RMON_T_BC_PKT 0x1208 // RMON tx broadcast packets |
113 | #define FEC_RMON_T_MC_PKT 0x120C // RMON tx multicast packets | 112 | #define FEC_RMON_T_MC_PKT 0x120C // RMON tx multicast packets |
114 | #define FEC_RMON_T_CRC_ALIGN 0x1210 // RMON tx packets w CRC/align error | 113 | #define FEC_RMON_T_CRC_ALIGN 0x1210 // RMON tx packets w CRC/align error |
115 | #define FEC_RMON_T_UNDERSIZE 0x1214 // RMON tx packets < 64 bytes, good CRC | 114 | #define FEC_RMON_T_UNDERSIZE 0x1214 // RMON tx packets < 64 bytes, good CRC |
116 | #define FEC_RMON_T_OVERSIZE 0x1218 // RMON tx packets > MAX_FL bytes, good CRC | 115 | #define FEC_RMON_T_OVERSIZE 0x1218 // RMON tx packets > MAX_FL bytes, good CRC |
117 | #define FEC_RMON_T_FRAG 0x121C // RMON tx packets < 64 bytes, bad CRC | 116 | #define FEC_RMON_T_FRAG 0x121C // RMON tx packets < 64 bytes, bad CRC |
118 | #define FEC_RMON_T_JAB 0x1220 // RMON tx packets > MAX_FL bytes, bad CRC | 117 | #define FEC_RMON_T_JAB 0x1220 // RMON tx packets > MAX_FL bytes, bad CRC |
119 | #define FEC_RMON_T_COL 0x1224 // RMON tx collision count | 118 | #define FEC_RMON_T_COL 0x1224 // RMON tx collision count |
120 | #define FEC_RMON_T_P64 0x1228 // RMON tx 64 byte packets | 119 | #define FEC_RMON_T_P64 0x1228 // RMON tx 64 byte packets |
121 | #define FEC_RMON_T_P65TO127 0x122C // RMON tx 65 to 127 byte packets | 120 | #define FEC_RMON_T_P65TO127 0x122C // RMON tx 65 to 127 byte packets |
122 | #define FEC_RMON_T_P128TO255 0x1230 // RMON tx 128 to 255 byte packets | 121 | #define FEC_RMON_T_P128TO255 0x1230 // RMON tx 128 to 255 byte packets |
123 | #define FEC_RMON_T_P256TO511 0x1234 // RMON tx 256 to 511 byte packets | 122 | #define FEC_RMON_T_P256TO511 0x1234 // RMON tx 256 to 511 byte packets |
124 | #define FEC_RMON_T_P512TO1023 0x1238 // RMON tx 512 to 1023 byte packets | 123 | #define FEC_RMON_T_P512TO1023 0x1238 // RMON tx 512 to 1023 byte packets |
125 | #define FEC_RMON_T_P1024TO2047 0x123C // RMON tx 1024 to 2047 byte packets | 124 | #define FEC_RMON_T_P1024TO2047 0x123C // RMON tx 1024 to 2047 byte packets |
126 | #define FEC_RMON_T_P_GTE2048 0x1240 // RMON tx w > 2048 bytes | 125 | #define FEC_RMON_T_P_GTE2048 0x1240 // RMON tx w > 2048 bytes |
127 | #define FEC_RMON_T_OCTETS 0x1244 // RMON tx octets | 126 | #define FEC_RMON_T_OCTETS 0x1244 // RMON tx octets |
128 | #define FEC_IEEE_T_DROP 0x1248 // count of frames not counted correctly | 127 | #define FEC_IEEE_T_DROP 0x1248 // count of frames not counted correctly |
129 | #define FEC_IEEE_T_FRAME_OK 0x124C // frames transmitted OK | 128 | #define FEC_IEEE_T_FRAME_OK 0x124C // frames transmitted OK |
130 | #define FEC_IEEE_T_1COL 0x1250 // frames transmitted with single collision | 129 | #define FEC_IEEE_T_1COL 0x1250 // frames transmitted with single collision |
131 | #define FEC_IEEE_T_MCOL 0x1254 // frames transmitted with multiple collisions | 130 | #define FEC_IEEE_T_MCOL 0x1254 // frames transmitted with multiple collisions |
132 | #define FEC_IEEE_T_DEF 0x1258 // frames transmitted after deferral delay | 131 | #define FEC_IEEE_T_DEF 0x1258 // frames transmitted after deferral delay |
133 | #define FEC_IEEE_T_LCOL 0x125C // frames transmitted with late collisions | 132 | #define FEC_IEEE_T_LCOL 0x125C // frames transmitted with late collisions |
134 | #define FEC_IEEE_T_EXCOL 0x1260 // frames transmitted with excessive collisions | 133 | #define FEC_IEEE_T_EXCOL 0x1260 // frames transmitted with excessive collisions |
135 | #define FEC_IEEE_T_MACERR 0x1264 // frames transmitted with tx-FIFO underrun | 134 | #define FEC_IEEE_T_MACERR 0x1264 // frames transmitted with tx-FIFO underrun |
136 | #define FEC_IEEE_T_CSERR 0x1268 // frames transmitted with carrier sense error | 135 | #define FEC_IEEE_T_CSERR 0x1268 // frames transmitted with carrier sense error |
137 | #define FEC_IEEE_T_SQE 0x126C // frames transmitted with SQE error | 136 | #define FEC_IEEE_T_SQE 0x126C // frames transmitted with SQE error |
138 | #define FEC_IEEE_T_FDXFC 0x1270 // flow control pause frames transmitted | 137 | #define FEC_IEEE_T_FDXFC 0x1270 // flow control pause frames transmitted |
139 | #define FEC_IEEE_T_OCTETS_OK 0x1274 // octet count for frames transmitted w/o error | 138 | #define FEC_IEEE_T_OCTETS_OK 0x1274 // octet count for frames transmitted w/o error |
140 | #define FEC_RMON_R_PACKETS 0x1284 // RMON rx packet count | 139 | #define FEC_RMON_R_PACKETS 0x1284 // RMON rx packet count |
141 | #define FEC_RMON_R_BC_PKT 0x1288 // RMON rx broadcast packets | 140 | #define FEC_RMON_R_BC_PKT 0x1288 // RMON rx broadcast packets |
142 | #define FEC_RMON_R_MC_PKT 0x128C // RMON rx multicast packets | 141 | #define FEC_RMON_R_MC_PKT 0x128C // RMON rx multicast packets |
143 | #define FEC_RMON_R_CRC_ALIGN 0x1290 // RMON rx packets w CRC/align error | 142 | #define FEC_RMON_R_CRC_ALIGN 0x1290 // RMON rx packets w CRC/align error |
144 | #define FEC_RMON_R_UNDERSIZE 0x1294 // RMON rx packets < 64 bytes, good CRC | 143 | #define FEC_RMON_R_UNDERSIZE 0x1294 // RMON rx packets < 64 bytes, good CRC |
145 | #define FEC_RMON_R_OVERSIZE 0x1298 // RMON rx packets > MAX_FL bytes, good CRC | 144 | #define FEC_RMON_R_OVERSIZE 0x1298 // RMON rx packets > MAX_FL bytes, good CRC |
146 | #define FEC_RMON_R_FRAG 0x129C // RMON rx packets < 64 bytes, bad CRC | 145 | #define FEC_RMON_R_FRAG 0x129C // RMON rx packets < 64 bytes, bad CRC |
147 | #define FEC_RMON_R_JAB 0x12A0 // RMON rx packets > MAX_FL bytes, bad CRC | 146 | #define FEC_RMON_R_JAB 0x12A0 // RMON rx packets > MAX_FL bytes, bad CRC |
148 | #define FEC_RMON_R_RESVD_0 0x12A4 // | 147 | #define FEC_RMON_R_RESVD_0 0x12A4 // |
149 | #define FEC_RMON_R_P64 0x12A8 // RMON rx 64 byte packets | 148 | #define FEC_RMON_R_P64 0x12A8 // RMON rx 64 byte packets |
150 | #define FEC_RMON_R_P65T0127 0x12AC // RMON rx 65 to 127 byte packets | 149 | #define FEC_RMON_R_P65T0127 0x12AC // RMON rx 65 to 127 byte packets |
151 | #define FEC_RMON_R_P128TO255 0x12B0 // RMON rx 128 to 255 byte packets | 150 | #define FEC_RMON_R_P128TO255 0x12B0 // RMON rx 128 to 255 byte packets |
152 | #define FEC_RMON_R_P256TO511 0x12B4 // RMON rx 256 to 511 byte packets | 151 | #define FEC_RMON_R_P256TO511 0x12B4 // RMON rx 256 to 511 byte packets |
153 | #define FEC_RMON_R_P512TO1023 0x12B8 // RMON rx 512 to 1023 byte packets | 152 | #define FEC_RMON_R_P512TO1023 0x12B8 // RMON rx 512 to 1023 byte packets |
154 | #define FEC_RMON_R_P1024TO2047 0x12BC // RMON rx 1024 to 2047 byte packets | 153 | #define FEC_RMON_R_P1024TO2047 0x12BC // RMON rx 1024 to 2047 byte packets |
155 | #define FEC_RMON_R_GTE2048 0x12C0 // RMON rx w > 2048 bytes | 154 | #define FEC_RMON_R_GTE2048 0x12C0 // RMON rx w > 2048 bytes |
156 | #define FEC_RMON_R_OCTETS 0x12C4 // RMON rx octets | 155 | #define FEC_RMON_R_OCTETS 0x12C4 // RMON rx octets |
157 | #define FEC_IEEE_R_DROP 0x12C8 // count of frames not counted correctly | 156 | #define FEC_IEEE_R_DROP 0x12C8 // count of frames not counted correctly |
158 | #define FEC_IEEE_R_FRAME_OK 0x12CC // frames received OK | 157 | #define FEC_IEEE_R_FRAME_OK 0x12CC // frames received OK |
159 | #define FEC_IEEE_R_CRC 0x12D0 // frames received with CRC error | 158 | #define FEC_IEEE_R_CRC 0x12D0 // frames received with CRC error |
160 | #define FEC_IEEE_R_ALIGN 0x12D4 // frames received with alignment error | 159 | #define FEC_IEEE_R_ALIGN 0x12D4 // frames received with alignment error |
161 | #define FEC_IEEE_R_MACERR 0x12D8 // receive FIFO overflow count | 160 | #define FEC_IEEE_R_MACERR 0x12D8 // receive FIFO overflow count |
162 | #define FEC_IEEE_R_FDXFC 0x12DC // flow control pause frames received | 161 | #define FEC_IEEE_R_FDXFC 0x12DC // flow control pause frames received |
163 | #define FEC_IEEE_R_OCTETS_OK 0x12E0 // octet count for frames rcvd w/o error | 162 | #define FEC_IEEE_R_OCTETS_OK 0x12E0 // octet count for frames rcvd w/o error |
164 | 163 | ||
165 | // register bit definitions and macros | 164 | // register bit definitions and macros |
166 | #define FEC_EIR_UN (0x00080000) | 165 | #define FEC_EIR_UN (0x00080000) |
@@ -315,11 +314,10 @@ | |||
315 | //--------------------------------------------------------------------------- | 314 | //--------------------------------------------------------------------------- |
316 | 315 | ||
317 | // Rx and Tx buffer descriptor format | 316 | // Rx and Tx buffer descriptor format |
318 | typedef struct | 317 | typedef struct { |
319 | { | 318 | WORD m_wStatus; // control / status --- used by edrv, do not change in application |
320 | WORD m_wStatus; // control / status --- used by edrv, do not change in application | 319 | WORD m_wLength; // transfer length |
321 | WORD m_wLength; // transfer length | 320 | BYTE *m_pbData; // buffer address |
322 | BYTE * m_pbData; // buffer address | ||
323 | } tBufferDescr; | 321 | } tBufferDescr; |
324 | 322 | ||
325 | //--------------------------------------------------------------------------- | 323 | //--------------------------------------------------------------------------- |
@@ -327,21 +325,16 @@ typedef struct | |||
327 | //--------------------------------------------------------------------------- | 325 | //--------------------------------------------------------------------------- |
328 | 326 | ||
329 | #if (NO_OF_INSTANCES > 1) | 327 | #if (NO_OF_INSTANCES > 1) |
330 | #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val) | 328 | #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val) |
331 | #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off])) | 329 | #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off])) |
330 | #else | ||
331 | #if (EDRV_USED_ETH_CTRL == 0) | ||
332 | #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val) | ||
333 | #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off])) | ||
332 | #else | 334 | #else |
333 | #if (EDRV_USED_ETH_CTRL == 0) | 335 | #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val) |
334 | #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val) | 336 | #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off])) |
335 | #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off])) | 337 | #endif |
336 | #else | ||
337 | #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val) | ||
338 | #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off])) | ||
339 | #endif | ||
340 | #endif | 338 | #endif |
341 | 339 | ||
342 | 340 | #endif // #ifndef _EDRV_FEC_H_ | |
343 | |||
344 | |||
345 | #endif // #ifndef _EDRV_FEC_H_ | ||
346 | |||
347 | |||
diff --git a/drivers/staging/epl/EdrvSim.h b/drivers/staging/epl/EdrvSim.h index eb3ef8362550..39300e321d6c 100644 --- a/drivers/staging/epl/EdrvSim.h +++ b/drivers/staging/epl/EdrvSim.h | |||
@@ -71,7 +71,6 @@ | |||
71 | #ifndef _EDRVSIM_H_ | 71 | #ifndef _EDRVSIM_H_ |
72 | #define _EDRVSIM_H_ | 72 | #define _EDRVSIM_H_ |
73 | 73 | ||
74 | |||
75 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
76 | // const defines | 75 | // const defines |
77 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
@@ -80,15 +79,11 @@ | |||
80 | // types | 79 | // types |
81 | //--------------------------------------------------------------------------- | 80 | //--------------------------------------------------------------------------- |
82 | 81 | ||
83 | |||
84 | //--------------------------------------------------------------------------- | 82 | //--------------------------------------------------------------------------- |
85 | // function prototypes | 83 | // function prototypes |
86 | //--------------------------------------------------------------------------- | 84 | //--------------------------------------------------------------------------- |
87 | 85 | ||
88 | void EdrvRxInterruptHandler (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); | 86 | void EdrvRxInterruptHandler(BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, |
89 | 87 | WORD wDataLen_p); | |
90 | |||
91 | |||
92 | #endif // #ifndef _EDRVSIM_H_ | ||
93 | |||
94 | 88 | ||
89 | #endif // #ifndef _EDRVSIM_H_ | ||
diff --git a/drivers/staging/epl/Epl.h b/drivers/staging/epl/Epl.h index 986995e0292b..be60f771b63a 100644 --- a/drivers/staging/epl/Epl.h +++ b/drivers/staging/epl/Epl.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/05/22 d.k.: start of the implementation, version 1.00 | 67 | 2006/05/22 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_API_H_ | 71 | #ifndef _EPL_API_H_ |
@@ -82,223 +81,193 @@ | |||
82 | // const defines | 81 | // const defines |
83 | //--------------------------------------------------------------------------- | 82 | //--------------------------------------------------------------------------- |
84 | 83 | ||
85 | |||
86 | //--------------------------------------------------------------------------- | 84 | //--------------------------------------------------------------------------- |
87 | // typedef | 85 | // typedef |
88 | //--------------------------------------------------------------------------- | 86 | //--------------------------------------------------------------------------- |
89 | 87 | ||
90 | 88 | typedef struct { | |
91 | typedef struct | 89 | unsigned int m_uiNodeId; |
92 | { | 90 | tEplNmtState m_NmtState; |
93 | unsigned int m_uiNodeId; | 91 | tEplNmtNodeEvent m_NodeEvent; |
94 | tEplNmtState m_NmtState; | 92 | WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError |
95 | tEplNmtNodeEvent m_NodeEvent; | 93 | BOOL m_fMandatory; |
96 | WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError | ||
97 | BOOL m_fMandatory; | ||
98 | 94 | ||
99 | } tEplApiEventNode; | 95 | } tEplApiEventNode; |
100 | 96 | ||
101 | 97 | typedef struct { | |
102 | typedef struct | 98 | tEplNmtState m_NmtState; // local NMT state |
103 | { | 99 | tEplNmtBootEvent m_BootEvent; |
104 | tEplNmtState m_NmtState; // local NMT state | 100 | WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError |
105 | tEplNmtBootEvent m_BootEvent; | ||
106 | WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError | ||
107 | 101 | ||
108 | } tEplApiEventBoot; | 102 | } tEplApiEventBoot; |
109 | 103 | ||
110 | 104 | typedef struct { | |
111 | typedef struct | 105 | tEplLedType m_LedType; // type of the LED (e.g. Status or Error) |
112 | { | 106 | BOOL m_fOn; // state of the LED (e.g. on or off) |
113 | tEplLedType m_LedType; // type of the LED (e.g. Status or Error) | ||
114 | BOOL m_fOn; // state of the LED (e.g. on or off) | ||
115 | 107 | ||
116 | } tEplApiEventLed; | 108 | } tEplApiEventLed; |
117 | 109 | ||
118 | 110 | typedef enum { | |
119 | typedef enum | 111 | kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange |
120 | { | ||
121 | kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange | ||
122 | // kEplApiEventRequestNmt = 0x11, // m_bNmtCmd | 112 | // kEplApiEventRequestNmt = 0x11, // m_bNmtCmd |
123 | kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted | 113 | kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted |
124 | kEplApiEventWarning = 0x13, // m_InternalError, Stack running | 114 | kEplApiEventWarning = 0x13, // m_InternalError, Stack running |
125 | kEplApiEventNode = 0x20, // m_Node | 115 | kEplApiEventNode = 0x20, // m_Node |
126 | kEplApiEventBoot = 0x21, // m_Boot | 116 | kEplApiEventBoot = 0x21, // m_Boot |
127 | kEplApiEventSdo = 0x62, // m_Sdo | 117 | kEplApiEventSdo = 0x62, // m_Sdo |
128 | kEplApiEventObdAccess = 0x69, // m_ObdCbParam | 118 | kEplApiEventObdAccess = 0x69, // m_ObdCbParam |
129 | kEplApiEventLed = 0x70, // m_Led | 119 | kEplApiEventLed = 0x70, // m_Led |
130 | 120 | ||
131 | } tEplApiEventType; | 121 | } tEplApiEventType; |
132 | 122 | ||
133 | 123 | typedef union { | |
134 | typedef union | 124 | tEplEventNmtStateChange m_NmtStateChange; |
135 | { | 125 | tEplEventError m_InternalError; |
136 | tEplEventNmtStateChange m_NmtStateChange; | 126 | tEplSdoComFinished m_Sdo; |
137 | tEplEventError m_InternalError; | 127 | tEplObdCbParam m_ObdCbParam; |
138 | tEplSdoComFinished m_Sdo; | 128 | tEplApiEventNode m_Node; |
139 | tEplObdCbParam m_ObdCbParam; | 129 | tEplApiEventBoot m_Boot; |
140 | tEplApiEventNode m_Node; | 130 | tEplApiEventLed m_Led; |
141 | tEplApiEventBoot m_Boot; | ||
142 | tEplApiEventLed m_Led; | ||
143 | 131 | ||
144 | } tEplApiEventArg; | 132 | } tEplApiEventArg; |
145 | 133 | ||
146 | 134 | typedef tEplKernel(PUBLIC ROM * tEplApiCbEvent) (tEplApiEventType EventType_p, // IN: event type (enum) | |
147 | typedef tEplKernel (PUBLIC ROM* tEplApiCbEvent) ( | 135 | tEplApiEventArg * pEventArg_p, // IN: event argument (union) |
148 | tEplApiEventType EventType_p, // IN: event type (enum) | 136 | void GENERIC * pUserArg_p); |
149 | tEplApiEventArg* pEventArg_p, // IN: event argument (union) | 137 | |
150 | void GENERIC* pUserArg_p); | 138 | typedef struct { |
151 | 139 | unsigned int m_uiSizeOfStruct; | |
152 | 140 | BOOL m_fAsyncOnly; // do not need to register PRes | |
153 | typedef struct | 141 | unsigned int m_uiNodeId; // local node ID |
154 | { | 142 | BYTE m_abMacAddress[6]; // local MAC address |
155 | unsigned int m_uiSizeOfStruct; | 143 | |
156 | BOOL m_fAsyncOnly; // do not need to register PRes | 144 | // 0x1F82: NMT_FeatureFlags_U32 |
157 | unsigned int m_uiNodeId; // local node ID | 145 | DWORD m_dwFeatureFlags; |
158 | BYTE m_abMacAddress[6]; // local MAC address | 146 | // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] |
159 | 147 | DWORD m_dwCycleLen; // required for error detection | |
160 | // 0x1F82: NMT_FeatureFlags_U32 | 148 | // 0x1F98: NMT_CycleTiming_REC |
161 | DWORD m_dwFeatureFlags; | 149 | // 0x1F98.1: IsochrTxMaxPayload_U16 |
162 | // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] | 150 | unsigned int m_uiIsochrTxMaxPayload; // const |
163 | DWORD m_dwCycleLen; // required for error detection | 151 | // 0x1F98.2: IsochrRxMaxPayload_U16 |
164 | // 0x1F98: NMT_CycleTiming_REC | 152 | unsigned int m_uiIsochrRxMaxPayload; // const |
165 | // 0x1F98.1: IsochrTxMaxPayload_U16 | 153 | // 0x1F98.3: PResMaxLatency_U32 |
166 | unsigned int m_uiIsochrTxMaxPayload; // const | 154 | DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes |
167 | // 0x1F98.2: IsochrRxMaxPayload_U16 | 155 | // 0x1F98.4: PReqActPayloadLimit_U16 |
168 | unsigned int m_uiIsochrRxMaxPayload; // const | 156 | unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes) |
169 | // 0x1F98.3: PResMaxLatency_U32 | 157 | // 0x1F98.5: PResActPayloadLimit_U16 |
170 | DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes | 158 | unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes) |
171 | // 0x1F98.4: PReqActPayloadLimit_U16 | 159 | // 0x1F98.6: ASndMaxLatency_U32 |
172 | unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes) | 160 | DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes |
173 | // 0x1F98.5: PResActPayloadLimit_U16 | 161 | // 0x1F98.7: MultiplCycleCnt_U8 |
174 | unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes) | 162 | unsigned int m_uiMultiplCycleCnt; // required for error detection |
175 | // 0x1F98.6: ASndMaxLatency_U32 | 163 | // 0x1F98.8: AsyncMTU_U16 |
176 | DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes | 164 | unsigned int m_uiAsyncMtu; // required to set up max frame size |
177 | // 0x1F98.7: MultiplCycleCnt_U8 | 165 | // 0x1F98.9: Prescaler_U16 |
178 | unsigned int m_uiMultiplCycleCnt; // required for error detection | 166 | unsigned int m_uiPrescaler; // required for sync |
179 | // 0x1F98.8: AsyncMTU_U16 | 167 | // $$$ Multiplexed Slot |
180 | unsigned int m_uiAsyncMtu; // required to set up max frame size | 168 | |
181 | // 0x1F98.9: Prescaler_U16 | 169 | // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] |
182 | unsigned int m_uiPrescaler; // required for sync | 170 | DWORD m_dwLossOfFrameTolerance; |
183 | // $$$ Multiplexed Slot | 171 | |
184 | 172 | // 0x1F8A: NMT_MNCycleTiming_REC | |
185 | // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] | 173 | // 0x1F8A.1: WaitSoCPReq_U32 in [ns] |
186 | DWORD m_dwLossOfFrameTolerance; | 174 | DWORD m_dwWaitSocPreq; |
187 | 175 | ||
188 | // 0x1F8A: NMT_MNCycleTiming_REC | 176 | // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] |
189 | // 0x1F8A.1: WaitSoCPReq_U32 in [ns] | 177 | DWORD m_dwAsyncSlotTimeout; |
190 | DWORD m_dwWaitSocPreq; | 178 | |
191 | 179 | DWORD m_dwDeviceType; // NMT_DeviceType_U32 | |
192 | // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] | 180 | DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 |
193 | DWORD m_dwAsyncSlotTimeout; | 181 | DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 |
194 | 182 | DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 | |
195 | DWORD m_dwDeviceType; // NMT_DeviceType_U32 | 183 | DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 |
196 | DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 | 184 | QWORD m_qwVendorSpecificExt1; |
197 | DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 | 185 | DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 |
198 | DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 | 186 | DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 |
199 | DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 | 187 | DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device |
200 | QWORD m_qwVendorSpecificExt1; | 188 | DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device |
201 | DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 | 189 | DWORD m_dwIpAddress; |
202 | DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 | 190 | DWORD m_dwSubnetMask; |
203 | DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device | 191 | DWORD m_dwDefaultGateway; |
204 | DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device | 192 | BYTE m_sHostname[32]; |
205 | DWORD m_dwIpAddress; | 193 | BYTE m_abVendorSpecificExt2[48]; |
206 | DWORD m_dwSubnetMask; | 194 | |
207 | DWORD m_dwDefaultGateway; | 195 | char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD) |
208 | BYTE m_sHostname[32]; | 196 | char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD) |
209 | BYTE m_abVendorSpecificExt2[48]; | 197 | char *m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD) |
210 | 198 | ||
211 | char* m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD) | 199 | tEplApiCbEvent m_pfnCbEvent; |
212 | char* m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD) | 200 | void *m_pEventUserArg; |
213 | char* m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD) | 201 | tEplSyncCb m_pfnCbSync; |
214 | |||
215 | tEplApiCbEvent m_pfnCbEvent; | ||
216 | void* m_pEventUserArg; | ||
217 | tEplSyncCb m_pfnCbSync; | ||
218 | 202 | ||
219 | } tEplApiInitParam; | 203 | } tEplApiInitParam; |
220 | 204 | ||
221 | 205 | typedef struct { | |
222 | typedef struct | 206 | void *m_pImage; |
223 | { | 207 | unsigned int m_uiSize; |
224 | void* m_pImage; | ||
225 | unsigned int m_uiSize; | ||
226 | 208 | ||
227 | } tEplApiProcessImage; | 209 | } tEplApiProcessImage; |
228 | 210 | ||
229 | |||
230 | //--------------------------------------------------------------------------- | 211 | //--------------------------------------------------------------------------- |
231 | // function prototypes | 212 | // function prototypes |
232 | //--------------------------------------------------------------------------- | 213 | //--------------------------------------------------------------------------- |
233 | 214 | ||
234 | tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam* pInitParam_p); | 215 | tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam * pInitParam_p); |
235 | 216 | ||
236 | tEplKernel PUBLIC EplApiShutdown(void); | 217 | tEplKernel PUBLIC EplApiShutdown(void); |
237 | 218 | ||
238 | tEplKernel PUBLIC EplApiReadObject( | 219 | tEplKernel PUBLIC EplApiReadObject(tEplSdoComConHdl * pSdoComConHdl_p, |
239 | tEplSdoComConHdl* pSdoComConHdl_p, | 220 | unsigned int uiNodeId_p, |
240 | unsigned int uiNodeId_p, | 221 | unsigned int uiIndex_p, |
241 | unsigned int uiIndex_p, | 222 | unsigned int uiSubindex_p, |
242 | unsigned int uiSubindex_p, | 223 | void *pDstData_le_p, |
243 | void* pDstData_le_p, | 224 | unsigned int *puiSize_p, |
244 | unsigned int* puiSize_p, | 225 | tEplSdoType SdoType_p, void *pUserArg_p); |
245 | tEplSdoType SdoType_p, | 226 | |
246 | void* pUserArg_p); | 227 | tEplKernel PUBLIC EplApiWriteObject(tEplSdoComConHdl * pSdoComConHdl_p, |
247 | 228 | unsigned int uiNodeId_p, | |
248 | tEplKernel PUBLIC EplApiWriteObject( | 229 | unsigned int uiIndex_p, |
249 | tEplSdoComConHdl* pSdoComConHdl_p, | 230 | unsigned int uiSubindex_p, |
250 | unsigned int uiNodeId_p, | 231 | void *pSrcData_le_p, |
251 | unsigned int uiIndex_p, | 232 | unsigned int uiSize_p, |
252 | unsigned int uiSubindex_p, | 233 | tEplSdoType SdoType_p, void *pUserArg_p); |
253 | void* pSrcData_le_p, | 234 | |
254 | unsigned int uiSize_p, | 235 | tEplKernel PUBLIC EplApiFreeSdoChannel(tEplSdoComConHdl SdoComConHdl_p); |
255 | tEplSdoType SdoType_p, | 236 | |
256 | void* pUserArg_p); | 237 | tEplKernel PUBLIC EplApiReadLocalObject(unsigned int uiIndex_p, |
257 | 238 | unsigned int uiSubindex_p, | |
258 | tEplKernel PUBLIC EplApiFreeSdoChannel( | 239 | void *pDstData_p, |
259 | tEplSdoComConHdl SdoComConHdl_p); | 240 | unsigned int *puiSize_p); |
260 | 241 | ||
261 | tEplKernel PUBLIC EplApiReadLocalObject( | 242 | tEplKernel PUBLIC EplApiWriteLocalObject(unsigned int uiIndex_p, |
262 | unsigned int uiIndex_p, | 243 | unsigned int uiSubindex_p, |
263 | unsigned int uiSubindex_p, | 244 | void *pSrcData_p, |
264 | void* pDstData_p, | 245 | unsigned int uiSize_p); |
265 | unsigned int* puiSize_p); | 246 | |
266 | 247 | tEplKernel PUBLIC EplApiCbObdAccess(tEplObdCbParam MEM * pParam_p); | |
267 | tEplKernel PUBLIC EplApiWriteLocalObject( | 248 | |
268 | unsigned int uiIndex_p, | 249 | tEplKernel PUBLIC EplApiLinkObject(unsigned int uiObjIndex_p, |
269 | unsigned int uiSubindex_p, | 250 | void *pVar_p, |
270 | void* pSrcData_p, | 251 | unsigned int *puiVarEntries_p, |
271 | unsigned int uiSize_p); | 252 | tEplObdSize * pEntrySize_p, |
272 | 253 | unsigned int uiFirstSubindex_p); | |
273 | tEplKernel PUBLIC EplApiCbObdAccess(tEplObdCbParam MEM* pParam_p); | ||
274 | |||
275 | tEplKernel PUBLIC EplApiLinkObject( unsigned int uiObjIndex_p, | ||
276 | void* pVar_p, | ||
277 | unsigned int* puiVarEntries_p, | ||
278 | tEplObdSize* pEntrySize_p, | ||
279 | unsigned int uiFirstSubindex_p); | ||
280 | 254 | ||
281 | tEplKernel PUBLIC EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p); | 255 | tEplKernel PUBLIC EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p); |
282 | 256 | ||
283 | tEplKernel PUBLIC EplApiProcess(void); | 257 | tEplKernel PUBLIC EplApiProcess(void); |
284 | 258 | ||
285 | |||
286 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0) | 259 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0) |
287 | tEplKernel PUBLIC EplApiMnTriggerStateChange(unsigned int uiNodeId_p, | 260 | tEplKernel PUBLIC EplApiMnTriggerStateChange(unsigned int uiNodeId_p, |
288 | tEplNmtNodeCommand NodeCommand_p); | 261 | tEplNmtNodeCommand NodeCommand_p); |
289 | #endif | 262 | #endif |
290 | 263 | ||
291 | tEplKernel PUBLIC EplApiGetIdentResponse( | 264 | tEplKernel PUBLIC EplApiGetIdentResponse(unsigned int uiNodeId_p, |
292 | unsigned int uiNodeId_p, | 265 | tEplIdentResponse ** |
293 | tEplIdentResponse** ppIdentResponse_p); | 266 | ppIdentResponse_p); |
294 | |||
295 | 267 | ||
296 | // functions for process image will be implemented in separate file | 268 | // functions for process image will be implemented in separate file |
297 | tEplKernel PUBLIC EplApiProcessImageSetup(void); | 269 | tEplKernel PUBLIC EplApiProcessImageSetup(void); |
298 | tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage* pPI_p); | 270 | tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage * pPI_p); |
299 | tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage* pPI_p); | 271 | tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage * pPI_p); |
300 | |||
301 | |||
302 | #endif // #ifndef _EPL_API_H_ | ||
303 | |||
304 | 272 | ||
273 | #endif // #ifndef _EPL_API_H_ | ||
diff --git a/drivers/staging/epl/EplAmi.h b/drivers/staging/epl/EplAmi.h index 17cb62a90fc1..6fa04a4f0a13 100644 --- a/drivers/staging/epl/EplAmi.h +++ b/drivers/staging/epl/EplAmi.h | |||
@@ -86,46 +86,43 @@ | |||
86 | #ifndef _EPLAMI_H_ | 86 | #ifndef _EPLAMI_H_ |
87 | #define _EPLAMI_H_ | 87 | #define _EPLAMI_H_ |
88 | 88 | ||
89 | |||
90 | #if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0) | 89 | #if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0) |
91 | // #ifdef USE_VAR64 | 90 | // #ifdef USE_VAR64 |
92 | #error 'ERROR: development system does not support 64 bit operations!' | 91 | #error 'ERROR: development system does not support 64 bit operations!' |
93 | // #endif | 92 | // #endif |
94 | #endif | 93 | #endif |
95 | 94 | ||
96 | |||
97 | //--------------------------------------------------------------------------- | 95 | //--------------------------------------------------------------------------- |
98 | // types | 96 | // types |
99 | //--------------------------------------------------------------------------- | 97 | //--------------------------------------------------------------------------- |
100 | 98 | ||
101 | |||
102 | //--------------------------------------------------------------------------- | 99 | //--------------------------------------------------------------------------- |
103 | // Prototypen | 100 | // Prototypen |
104 | //--------------------------------------------------------------------------- | 101 | //--------------------------------------------------------------------------- |
105 | 102 | ||
106 | #ifdef __cplusplus | 103 | #ifdef __cplusplus |
107 | extern "C" { | 104 | extern "C" { |
108 | #endif | 105 | #endif |
109 | 106 | ||
110 | #if (TARGET_SYSTEM == _WIN32_) | 107 | #if (TARGET_SYSTEM == _WIN32_) |
111 | #if defined(INLINE_FUNCTION_DEF) | 108 | #if defined(INLINE_FUNCTION_DEF) |
112 | #undef INLINE_FUNCTION | 109 | #undef INLINE_FUNCTION |
113 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | 110 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF |
114 | #define INLINE_ENABLED TRUE | 111 | #define INLINE_ENABLED TRUE |
115 | #define EPL_AMI_INLINED | 112 | #define EPL_AMI_INLINED |
116 | #include "../EplStack/amix86.c" | 113 | #include "../EplStack/amix86.c" |
117 | #endif | 114 | #endif |
118 | 115 | ||
119 | #elif (TARGET_SYSTEM == _LINUX_) | 116 | #elif (TARGET_SYSTEM == _LINUX_) |
120 | #if defined(__m68k__) // it is an big endian machine | 117 | #if defined(__m68k__) // it is an big endian machine |
121 | #if defined(INLINE_FUNCTION_DEF) | 118 | #if defined(INLINE_FUNCTION_DEF) |
122 | #undef INLINE_FUNCTION | 119 | #undef INLINE_FUNCTION |
123 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | 120 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF |
124 | #define INLINE_ENABLED TRUE | 121 | #define INLINE_ENABLED TRUE |
125 | #define EPL_AMI_INLINED | 122 | #define EPL_AMI_INLINED |
126 | #include "../EplStack/amibe.c" | 123 | #include "../EplStack/amibe.c" |
127 | #endif | 124 | #endif |
128 | #endif | 125 | #endif |
129 | #endif | 126 | #endif |
130 | 127 | ||
131 | //--------------------------------------------------------------------------- | 128 | //--------------------------------------------------------------------------- |
@@ -140,13 +137,12 @@ | |||
140 | #define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);} | 137 | #define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);} |
141 | 138 | ||
142 | #if !defined(INLINE_ENABLED) | 139 | #if !defined(INLINE_ENABLED) |
143 | void PUBLIC AmiSetWordToBe (void FAR* pAddr_p, WORD wWordVal_p); | 140 | void PUBLIC AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p); |
144 | void PUBLIC AmiSetDwordToBe (void FAR* pAddr_p, DWORD dwDwordVal_p); | 141 | void PUBLIC AmiSetDwordToBe(void FAR * pAddr_p, DWORD dwDwordVal_p); |
145 | void PUBLIC AmiSetWordToLe (void FAR* pAddr_p, WORD wWordVal_p); | 142 | void PUBLIC AmiSetWordToLe(void FAR * pAddr_p, WORD wWordVal_p); |
146 | void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); | 143 | void PUBLIC AmiSetDwordToLe(void FAR * pAddr_p, DWORD dwDwordVal_p); |
147 | #endif | 144 | #endif |
148 | 145 | ||
149 | |||
150 | //--------------------------------------------------------------------------- | 146 | //--------------------------------------------------------------------------- |
151 | // | 147 | // |
152 | // read functions | 148 | // read functions |
@@ -160,10 +156,10 @@ void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); | |||
160 | 156 | ||
161 | #if !defined(INLINE_ENABLED) | 157 | #if !defined(INLINE_ENABLED) |
162 | 158 | ||
163 | WORD PUBLIC AmiGetWordFromBe (void FAR* pAddr_p); | 159 | WORD PUBLIC AmiGetWordFromBe(void FAR * pAddr_p); |
164 | DWORD PUBLIC AmiGetDwordFromBe (void FAR* pAddr_p); | 160 | DWORD PUBLIC AmiGetDwordFromBe(void FAR * pAddr_p); |
165 | WORD PUBLIC AmiGetWordFromLe (void FAR* pAddr_p); | 161 | WORD PUBLIC AmiGetWordFromLe(void FAR * pAddr_p); |
166 | DWORD PUBLIC AmiGetDwordFromLe (void FAR* pAddr_p); | 162 | DWORD PUBLIC AmiGetDwordFromLe(void FAR * pAddr_p); |
167 | 163 | ||
168 | //--------------------------------------------------------------------------- | 164 | //--------------------------------------------------------------------------- |
169 | // | 165 | // |
@@ -178,9 +174,8 @@ DWORD PUBLIC AmiGetDwordFromLe (void FAR* pAddr_p); | |||
178 | // | 174 | // |
179 | //--------------------------------------------------------------------------- | 175 | //--------------------------------------------------------------------------- |
180 | 176 | ||
181 | void PUBLIC AmiSetDword24ToBe (void FAR* pAddr_p, DWORD dwDwordVal_p); | 177 | void PUBLIC AmiSetDword24ToBe(void FAR * pAddr_p, DWORD dwDwordVal_p); |
182 | void PUBLIC AmiSetDword24ToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); | 178 | void PUBLIC AmiSetDword24ToLe(void FAR * pAddr_p, DWORD dwDwordVal_p); |
183 | |||
184 | 179 | ||
185 | //--------------------------------------------------------------------------- | 180 | //--------------------------------------------------------------------------- |
186 | // | 181 | // |
@@ -194,9 +189,8 @@ void PUBLIC AmiSetDword24ToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); | |||
194 | // | 189 | // |
195 | //--------------------------------------------------------------------------- | 190 | //--------------------------------------------------------------------------- |
196 | 191 | ||
197 | DWORD PUBLIC AmiGetDword24FromBe (void FAR* pAddr_p); | 192 | DWORD PUBLIC AmiGetDword24FromBe(void FAR * pAddr_p); |
198 | DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p); | 193 | DWORD PUBLIC AmiGetDword24FromLe(void FAR * pAddr_p); |
199 | |||
200 | 194 | ||
201 | //#ifdef USE_VAR64 | 195 | //#ifdef USE_VAR64 |
202 | 196 | ||
@@ -213,9 +207,8 @@ DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p); | |||
213 | // | 207 | // |
214 | //--------------------------------------------------------------------------- | 208 | //--------------------------------------------------------------------------- |
215 | 209 | ||
216 | void PUBLIC AmiSetQword40ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 210 | void PUBLIC AmiSetQword40ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
217 | void PUBLIC AmiSetQword40ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 211 | void PUBLIC AmiSetQword40ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
218 | |||
219 | 212 | ||
220 | //--------------------------------------------------------------------------- | 213 | //--------------------------------------------------------------------------- |
221 | // | 214 | // |
@@ -229,9 +222,8 @@ void PUBLIC AmiSetQword40ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | |||
229 | // | 222 | // |
230 | //--------------------------------------------------------------------------- | 223 | //--------------------------------------------------------------------------- |
231 | 224 | ||
232 | QWORD PUBLIC AmiGetQword40FromBe (void FAR* pAddr_p); | 225 | QWORD PUBLIC AmiGetQword40FromBe(void FAR * pAddr_p); |
233 | QWORD PUBLIC AmiGetQword40FromLe (void FAR* pAddr_p); | 226 | QWORD PUBLIC AmiGetQword40FromLe(void FAR * pAddr_p); |
234 | |||
235 | 227 | ||
236 | //--------------------------------------------------------------------------- | 228 | //--------------------------------------------------------------------------- |
237 | // | 229 | // |
@@ -246,9 +238,8 @@ QWORD PUBLIC AmiGetQword40FromLe (void FAR* pAddr_p); | |||
246 | // | 238 | // |
247 | //--------------------------------------------------------------------------- | 239 | //--------------------------------------------------------------------------- |
248 | 240 | ||
249 | void PUBLIC AmiSetQword48ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 241 | void PUBLIC AmiSetQword48ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
250 | void PUBLIC AmiSetQword48ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 242 | void PUBLIC AmiSetQword48ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
251 | |||
252 | 243 | ||
253 | //--------------------------------------------------------------------------- | 244 | //--------------------------------------------------------------------------- |
254 | // | 245 | // |
@@ -262,9 +253,8 @@ void PUBLIC AmiSetQword48ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | |||
262 | // | 253 | // |
263 | //--------------------------------------------------------------------------- | 254 | //--------------------------------------------------------------------------- |
264 | 255 | ||
265 | QWORD PUBLIC AmiGetQword48FromBe (void FAR* pAddr_p); | 256 | QWORD PUBLIC AmiGetQword48FromBe(void FAR * pAddr_p); |
266 | QWORD PUBLIC AmiGetQword48FromLe (void FAR* pAddr_p); | 257 | QWORD PUBLIC AmiGetQword48FromLe(void FAR * pAddr_p); |
267 | |||
268 | 258 | ||
269 | //--------------------------------------------------------------------------- | 259 | //--------------------------------------------------------------------------- |
270 | // | 260 | // |
@@ -279,9 +269,8 @@ QWORD PUBLIC AmiGetQword48FromLe (void FAR* pAddr_p); | |||
279 | // | 269 | // |
280 | //--------------------------------------------------------------------------- | 270 | //--------------------------------------------------------------------------- |
281 | 271 | ||
282 | void PUBLIC AmiSetQword56ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 272 | void PUBLIC AmiSetQword56ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
283 | void PUBLIC AmiSetQword56ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 273 | void PUBLIC AmiSetQword56ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
284 | |||
285 | 274 | ||
286 | //--------------------------------------------------------------------------- | 275 | //--------------------------------------------------------------------------- |
287 | // | 276 | // |
@@ -295,9 +284,8 @@ void PUBLIC AmiSetQword56ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | |||
295 | // | 284 | // |
296 | //--------------------------------------------------------------------------- | 285 | //--------------------------------------------------------------------------- |
297 | 286 | ||
298 | QWORD PUBLIC AmiGetQword56FromBe (void FAR* pAddr_p); | 287 | QWORD PUBLIC AmiGetQword56FromBe(void FAR * pAddr_p); |
299 | QWORD PUBLIC AmiGetQword56FromLe (void FAR* pAddr_p); | 288 | QWORD PUBLIC AmiGetQword56FromLe(void FAR * pAddr_p); |
300 | |||
301 | 289 | ||
302 | //--------------------------------------------------------------------------- | 290 | //--------------------------------------------------------------------------- |
303 | // | 291 | // |
@@ -312,9 +300,8 @@ QWORD PUBLIC AmiGetQword56FromLe (void FAR* pAddr_p); | |||
312 | // | 300 | // |
313 | //--------------------------------------------------------------------------- | 301 | //--------------------------------------------------------------------------- |
314 | 302 | ||
315 | void PUBLIC AmiSetQword64ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 303 | void PUBLIC AmiSetQword64ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
316 | void PUBLIC AmiSetQword64ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | 304 | void PUBLIC AmiSetQword64ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p); |
317 | |||
318 | 305 | ||
319 | //--------------------------------------------------------------------------- | 306 | //--------------------------------------------------------------------------- |
320 | // | 307 | // |
@@ -328,9 +315,8 @@ void PUBLIC AmiSetQword64ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p); | |||
328 | // | 315 | // |
329 | //--------------------------------------------------------------------------- | 316 | //--------------------------------------------------------------------------- |
330 | 317 | ||
331 | QWORD PUBLIC AmiGetQword64FromBe (void FAR* pAddr_p); | 318 | QWORD PUBLIC AmiGetQword64FromBe(void FAR * pAddr_p); |
332 | QWORD PUBLIC AmiGetQword64FromLe (void FAR* pAddr_p); | 319 | QWORD PUBLIC AmiGetQword64FromLe(void FAR * pAddr_p); |
333 | |||
334 | 320 | ||
335 | //--------------------------------------------------------------------------- | 321 | //--------------------------------------------------------------------------- |
336 | // | 322 | // |
@@ -345,8 +331,8 @@ QWORD PUBLIC AmiGetQword64FromLe (void FAR* pAddr_p); | |||
345 | // | 331 | // |
346 | //--------------------------------------------------------------------------- | 332 | //--------------------------------------------------------------------------- |
347 | 333 | ||
348 | void PUBLIC AmiSetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p); | 334 | void PUBLIC AmiSetTimeOfDay(void FAR * pAddr_p, |
349 | 335 | tTimeOfDay FAR * pTimeOfDay_p); | |
350 | 336 | ||
351 | //--------------------------------------------------------------------------- | 337 | //--------------------------------------------------------------------------- |
352 | // | 338 | // |
@@ -361,20 +347,16 @@ void PUBLIC AmiSetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p); | |||
361 | // | 347 | // |
362 | //--------------------------------------------------------------------------- | 348 | //--------------------------------------------------------------------------- |
363 | 349 | ||
364 | void PUBLIC AmiGetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p); | 350 | void PUBLIC AmiGetTimeOfDay(void FAR * pAddr_p, |
351 | tTimeOfDay FAR * pTimeOfDay_p); | ||
365 | 352 | ||
366 | #endif | 353 | #endif |
367 | 354 | ||
368 | 355 | #undef INLINE_ENABLED // disable actual inlining of functions | |
369 | #undef INLINE_ENABLED // disable actual inlining of functions | ||
370 | #define EPL_AMI_INCLUDED | 356 | #define EPL_AMI_INCLUDED |
371 | 357 | ||
372 | #ifdef __cplusplus | 358 | #ifdef __cplusplus |
373 | } | 359 | } |
374 | #endif | 360 | #endif |
375 | 361 | #endif // ifndef _EPLAMI_H_ | |
376 | 362 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). | |
377 | #endif // ifndef _EPLAMI_H_ | ||
378 | |||
379 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler | ||
380 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). | ||
diff --git a/drivers/staging/epl/EplApiLinux.h b/drivers/staging/epl/EplApiLinux.h index 02714e73b178..92cd12532a62 100644 --- a/drivers/staging/epl/EplApiLinux.h +++ b/drivers/staging/epl/EplApiLinux.h | |||
@@ -66,79 +66,71 @@ | |||
66 | 66 | ||
67 | 2006/10/11 d.k.: start of the implementation, version 1.00 | 67 | 2006/10/11 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_API_LINUX_H_ | 71 | #ifndef _EPL_API_LINUX_H_ |
73 | #define _EPL_API_LINUX_H_ | 72 | #define _EPL_API_LINUX_H_ |
74 | 73 | ||
75 | |||
76 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
77 | // const defines | 75 | // const defines |
78 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
79 | 77 | ||
80 | #define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry | 78 | #define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry |
81 | |||
82 | 79 | ||
83 | //--------------------------------------------------------------------------- | 80 | //--------------------------------------------------------------------------- |
84 | // Commands for <ioctl> | 81 | // Commands for <ioctl> |
85 | //--------------------------------------------------------------------------- | 82 | //--------------------------------------------------------------------------- |
86 | 83 | ||
87 | #define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam* | 84 | #define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam* |
88 | #define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage* | 85 | #define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage* |
89 | #define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage* | 86 | #define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage* |
90 | #define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject* | 87 | #define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject* |
91 | #define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject* | 88 | #define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject* |
92 | #define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject* | 89 | #define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject* |
93 | #define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject* | 90 | #define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject* |
94 | #define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl | 91 | #define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl |
95 | #define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent | 92 | #define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent |
96 | #define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent* | 93 | #define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent* |
97 | #define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject* | 94 | #define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject* |
98 | #define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0 | 95 | #define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0 |
99 | #define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0 | 96 | #define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0 |
100 | |||
101 | 97 | ||
102 | //--------------------------------------------------------------------------- | 98 | //--------------------------------------------------------------------------- |
103 | // typedef | 99 | // typedef |
104 | //--------------------------------------------------------------------------- | 100 | //--------------------------------------------------------------------------- |
105 | 101 | ||
106 | typedef struct | 102 | typedef struct { |
107 | { | 103 | unsigned int m_uiEventArgSize; |
108 | unsigned int m_uiEventArgSize; | 104 | tEplApiEventArg *m_pEventArg; |
109 | tEplApiEventArg* m_pEventArg; | 105 | tEplApiEventType *m_pEventType; |
110 | tEplApiEventType* m_pEventType; | 106 | tEplKernel m_RetCbEvent; |
111 | tEplKernel m_RetCbEvent; | ||
112 | 107 | ||
113 | } tEplLinEvent; | 108 | } tEplLinEvent; |
114 | 109 | ||
115 | typedef struct | 110 | typedef struct { |
116 | { | 111 | tEplSdoComConHdl m_SdoComConHdl; |
117 | tEplSdoComConHdl m_SdoComConHdl; | 112 | BOOL m_fValidSdoComConHdl; |
118 | BOOL m_fValidSdoComConHdl; | 113 | unsigned int m_uiNodeId; |
119 | unsigned int m_uiNodeId; | 114 | unsigned int m_uiIndex; |
120 | unsigned int m_uiIndex; | 115 | unsigned int m_uiSubindex; |
121 | unsigned int m_uiSubindex; | 116 | void *m_le_pData; |
122 | void* m_le_pData; | 117 | unsigned int m_uiSize; |
123 | unsigned int m_uiSize; | 118 | tEplSdoType m_SdoType; |
124 | tEplSdoType m_SdoType; | 119 | void *m_pUserArg; |
125 | void* m_pUserArg; | ||
126 | 120 | ||
127 | } tEplLinSdoObject; | 121 | } tEplLinSdoObject; |
128 | 122 | ||
129 | typedef struct | 123 | typedef struct { |
130 | { | 124 | unsigned int m_uiIndex; |
131 | unsigned int m_uiIndex; | 125 | unsigned int m_uiSubindex; |
132 | unsigned int m_uiSubindex; | 126 | void *m_pData; |
133 | void* m_pData; | 127 | unsigned int m_uiSize; |
134 | unsigned int m_uiSize; | ||
135 | 128 | ||
136 | } tEplLinLocalObject; | 129 | } tEplLinLocalObject; |
137 | 130 | ||
138 | typedef struct | 131 | typedef struct { |
139 | { | 132 | unsigned int m_uiNodeId; |
140 | unsigned int m_uiNodeId; | 133 | tEplNmtNodeCommand m_NodeCommand; |
141 | tEplNmtNodeCommand m_NodeCommand; | ||
142 | 134 | ||
143 | } tEplLinNodeCmdObject; | 135 | } tEplLinNodeCmdObject; |
144 | 136 | ||
@@ -146,8 +138,4 @@ typedef struct | |||
146 | // function prototypes | 138 | // function prototypes |
147 | //--------------------------------------------------------------------------- | 139 | //--------------------------------------------------------------------------- |
148 | 140 | ||
149 | 141 | #endif // #ifndef _EPL_API_LINUX_H_ | |
150 | |||
151 | #endif // #ifndef _EPL_API_LINUX_H_ | ||
152 | |||
153 | |||
diff --git a/drivers/staging/epl/EplCfg.h b/drivers/staging/epl/EplCfg.h index 068458369ae9..38e958a042a8 100644 --- a/drivers/staging/epl/EplCfg.h +++ b/drivers/staging/epl/EplCfg.h | |||
@@ -71,9 +71,6 @@ | |||
71 | #ifndef _EPLCFG_H_ | 71 | #ifndef _EPLCFG_H_ |
72 | #define _EPLCFG_H_ | 72 | #define _EPLCFG_H_ |
73 | 73 | ||
74 | |||
75 | |||
76 | |||
77 | // ========================================================================= | 74 | // ========================================================================= |
78 | // generic defines which for whole EPL Stack | 75 | // generic defines which for whole EPL Stack |
79 | // ========================================================================= | 76 | // ========================================================================= |
@@ -100,7 +97,7 @@ | |||
100 | #define EPL_NO_USER_KERNEL | 97 | #define EPL_NO_USER_KERNEL |
101 | 98 | ||
102 | #ifndef BENCHMARK_MODULES | 99 | #ifndef BENCHMARK_MODULES |
103 | #define BENCHMARK_MODULES 0 //0xEE800042L | 100 | #define BENCHMARK_MODULES 0 //0xEE800042L |
104 | #endif | 101 | #endif |
105 | 102 | ||
106 | // Default defug level: | 103 | // Default defug level: |
@@ -113,7 +110,6 @@ | |||
113 | // * EPL_DBGLVL_ERROR = 0x40000000L | 110 | // * EPL_DBGLVL_ERROR = 0x40000000L |
114 | // * EPL_DBGLVL_ALWAYS = 0x80000000L | 111 | // * EPL_DBGLVL_ALWAYS = 0x80000000L |
115 | 112 | ||
116 | |||
117 | // EPL_MODULE_INTEGRATION defines all modules which are included in | 113 | // EPL_MODULE_INTEGRATION defines all modules which are included in |
118 | // EPL application. Please add or delete modules for your application. | 114 | // EPL application. Please add or delete modules for your application. |
119 | #define EPL_MODULE_INTEGRATION EPL_MODULE_OBDK \ | 115 | #define EPL_MODULE_INTEGRATION EPL_MODULE_OBDK \ |
@@ -155,7 +151,6 @@ | |||
155 | // number of used ethernet controller | 151 | // number of used ethernet controller |
156 | //#define EDRV_USED_ETH_CTRL 1 | 152 | //#define EDRV_USED_ETH_CTRL 1 |
157 | 153 | ||
158 | |||
159 | // ========================================================================= | 154 | // ========================================================================= |
160 | // Data Link Layer (DLL) specific defines | 155 | // Data Link Layer (DLL) specific defines |
161 | // ========================================================================= | 156 | // ========================================================================= |
@@ -170,7 +165,6 @@ | |||
170 | #define EPL_DLL_PRES_READY_AFTER_SOA FALSE | 165 | #define EPL_DLL_PRES_READY_AFTER_SOA FALSE |
171 | //#define EPL_DLL_PRES_READY_AFTER_SOA TRUE | 166 | //#define EPL_DLL_PRES_READY_AFTER_SOA TRUE |
172 | 167 | ||
173 | |||
174 | // ========================================================================= | 168 | // ========================================================================= |
175 | // OBD specific defines | 169 | // OBD specific defines |
176 | // ========================================================================= | 170 | // ========================================================================= |
@@ -188,7 +182,6 @@ | |||
188 | 182 | ||
189 | #define EPL_OBD_USE_VARIABLE_SUBINDEX_TAB TRUE | 183 | #define EPL_OBD_USE_VARIABLE_SUBINDEX_TAB TRUE |
190 | 184 | ||
191 | |||
192 | // ========================================================================= | 185 | // ========================================================================= |
193 | // Timer module specific defines | 186 | // Timer module specific defines |
194 | // ========================================================================= | 187 | // ========================================================================= |
@@ -200,8 +193,4 @@ | |||
200 | #define EPL_TIMER_USE_HIGHRES TRUE | 193 | #define EPL_TIMER_USE_HIGHRES TRUE |
201 | //#define EPL_TIMER_USE_HIGHRES FALSE | 194 | //#define EPL_TIMER_USE_HIGHRES FALSE |
202 | 195 | ||
203 | |||
204 | #endif //_EPLCFG_H_ | 196 | #endif //_EPLCFG_H_ |
205 | |||
206 | |||
207 | |||
diff --git a/drivers/staging/epl/EplDef.h b/drivers/staging/epl/EplDef.h index ff704d65ba50..1dc8108449c5 100644 --- a/drivers/staging/epl/EplDef.h +++ b/drivers/staging/epl/EplDef.h | |||
@@ -66,81 +66,77 @@ | |||
66 | 66 | ||
67 | 2006/05/22 d.k.: start of the implementation, version 1.00 | 67 | 2006/05/22 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_DEF_H_ | 71 | #ifndef _EPL_DEF_H_ |
73 | #define _EPL_DEF_H_ | 72 | #define _EPL_DEF_H_ |
74 | 73 | ||
75 | |||
76 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
77 | // const defines | 75 | // const defines |
78 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
79 | 77 | ||
80 | #define EPL_C_ADR_BROADCAST 0xFF // EPL broadcast address | 78 | #define EPL_C_ADR_BROADCAST 0xFF // EPL broadcast address |
81 | #define EPL_C_ADR_DIAG_DEF_NODE_ID 0xFD // EPL default address of dignostic device | 79 | #define EPL_C_ADR_DIAG_DEF_NODE_ID 0xFD // EPL default address of dignostic device |
82 | #define EPL_C_ADR_DUMMY_NODE_ID 0xFC // EPL dummy node address | 80 | #define EPL_C_ADR_DUMMY_NODE_ID 0xFC // EPL dummy node address |
83 | #define EPL_C_ADR_INVALID 0x00 // invalid EPL address | 81 | #define EPL_C_ADR_INVALID 0x00 // invalid EPL address |
84 | #define EPL_C_ADR_MN_DEF_NODE_ID 0xF0 // EPL default address of MN | 82 | #define EPL_C_ADR_MN_DEF_NODE_ID 0xF0 // EPL default address of MN |
85 | #define EPL_C_ADR_RT1_DEF_NODE_ID 0xFE // EPL default address of router type 1 | 83 | #define EPL_C_ADR_RT1_DEF_NODE_ID 0xFE // EPL default address of router type 1 |
86 | #define EPL_C_DLL_ASND_PRIO_NMTRQST 7 // increased ASnd request priority to be used by NMT Requests | 84 | #define EPL_C_DLL_ASND_PRIO_NMTRQST 7 // increased ASnd request priority to be used by NMT Requests |
87 | #define EPL_C_DLL_ASND_PRIO_STD 0 // standard ASnd request priority | 85 | #define EPL_C_DLL_ASND_PRIO_STD 0 // standard ASnd request priority |
88 | #define EPL_C_DLL_ETHERTYPE_EPL 0x88AB | 86 | #define EPL_C_DLL_ETHERTYPE_EPL 0x88AB |
89 | #define EPL_C_DLL_ISOCHR_MAX_PAYL 1490 // Byte: maximum size of PReq and PRes payload data, requires C_IP_MAX_MTU | 87 | #define EPL_C_DLL_ISOCHR_MAX_PAYL 1490 // Byte: maximum size of PReq and PRes payload data, requires C_IP_MAX_MTU |
90 | #define EPL_C_DLL_MAX_ASYNC_MTU 1500 // Byte: maximum asynchronous payload in bytes | 88 | #define EPL_C_DLL_MAX_ASYNC_MTU 1500 // Byte: maximum asynchronous payload in bytes |
91 | #define EPL_C_DLL_MAX_PAYL_OFFSET 1499 // Byte: maximum offset of Ethernet frame payload, requires C_IP_MAX_MTU | 89 | #define EPL_C_DLL_MAX_PAYL_OFFSET 1499 // Byte: maximum offset of Ethernet frame payload, requires C_IP_MAX_MTU |
92 | #define EPL_C_DLL_MAX_RS 7 | 90 | #define EPL_C_DLL_MAX_RS 7 |
93 | #define EPL_C_DLL_MIN_ASYNC_MTU 282 // Byte: minimum asynchronous payload in bytes. | 91 | #define EPL_C_DLL_MIN_ASYNC_MTU 282 // Byte: minimum asynchronous payload in bytes. |
94 | #define EPL_C_DLL_MIN_PAYL_OFFSET 45 // Byte: minimum offset of Ethernet frame payload | 92 | #define EPL_C_DLL_MIN_PAYL_OFFSET 45 // Byte: minimum offset of Ethernet frame payload |
95 | #define EPL_C_DLL_MULTICAST_ASND 0x01111E000004LL // EPL ASnd multicast MAC address, canonical form | 93 | #define EPL_C_DLL_MULTICAST_ASND 0x01111E000004LL // EPL ASnd multicast MAC address, canonical form |
96 | #define EPL_C_DLL_MULTICAST_PRES 0x01111E000002LL // EPL PRes multicast MAC address, canonical form | 94 | #define EPL_C_DLL_MULTICAST_PRES 0x01111E000002LL // EPL PRes multicast MAC address, canonical form |
97 | #define EPL_C_DLL_MULTICAST_SOA 0x01111E000003LL // EPL SoA multicast MAC address, canonical form | 95 | #define EPL_C_DLL_MULTICAST_SOA 0x01111E000003LL // EPL SoA multicast MAC address, canonical form |
98 | #define EPL_C_DLL_MULTICAST_SOC 0x01111E000001LL // EPL Soc multicast MAC address, canonical form | 96 | #define EPL_C_DLL_MULTICAST_SOC 0x01111E000001LL // EPL Soc multicast MAC address, canonical form |
99 | #define EPL_C_DLL_PREOP1_START_CYCLES 10 // number of unassigning SoA frames at start of NMT_MS_PRE_OPERATIONAL_1 | 97 | #define EPL_C_DLL_PREOP1_START_CYCLES 10 // number of unassigning SoA frames at start of NMT_MS_PRE_OPERATIONAL_1 |
100 | #define EPL_C_DLL_T_BITTIME 10 // ns: Transmission time per bit on 100 Mbit/s network | 98 | #define EPL_C_DLL_T_BITTIME 10 // ns: Transmission time per bit on 100 Mbit/s network |
101 | #define EPL_C_DLL_T_EPL_PDO_HEADER 10 // Byte: size of PReq and PRes EPL PDO message header | 99 | #define EPL_C_DLL_T_EPL_PDO_HEADER 10 // Byte: size of PReq and PRes EPL PDO message header |
102 | #define EPL_C_DLL_T_ETH2_WRAPPER 18 // Byte: size of Ethernet type II wrapper consisting of header and checksum | 100 | #define EPL_C_DLL_T_ETH2_WRAPPER 18 // Byte: size of Ethernet type II wrapper consisting of header and checksum |
103 | #define EPL_C_DLL_T_IFG 640 // ns: Ethernet Interframe Gap | 101 | #define EPL_C_DLL_T_IFG 640 // ns: Ethernet Interframe Gap |
104 | #define EPL_C_DLL_T_MIN_FRAME 5120 // ns: Size of minimum Ethernet frame (without preamble) | 102 | #define EPL_C_DLL_T_MIN_FRAME 5120 // ns: Size of minimum Ethernet frame (without preamble) |
105 | #define EPL_C_DLL_T_PREAMBLE 960 // ns: Size of Ethernet frame preamble | 103 | #define EPL_C_DLL_T_PREAMBLE 960 // ns: Size of Ethernet frame preamble |
106 | 104 | ||
107 | #define EPL_C_DLL_MINSIZE_SOC 36 // minimum size of SoC without padding and CRC | 105 | #define EPL_C_DLL_MINSIZE_SOC 36 // minimum size of SoC without padding and CRC |
108 | #define EPL_C_DLL_MINSIZE_PREQ 60 // minimum size of PRec without CRC | 106 | #define EPL_C_DLL_MINSIZE_PREQ 60 // minimum size of PRec without CRC |
109 | #define EPL_C_DLL_MINSIZE_PRES 60 // minimum size of PRes without CRC | 107 | #define EPL_C_DLL_MINSIZE_PRES 60 // minimum size of PRes without CRC |
110 | #define EPL_C_DLL_MINSIZE_SOA 24 // minimum size of SoA without padding and CRC | 108 | #define EPL_C_DLL_MINSIZE_SOA 24 // minimum size of SoA without padding and CRC |
111 | #define EPL_C_DLL_MINSIZE_IDENTRES 176 // minimum size of IdentResponse without CRC | 109 | #define EPL_C_DLL_MINSIZE_IDENTRES 176 // minimum size of IdentResponse without CRC |
112 | #define EPL_C_DLL_MINSIZE_STATUSRES 72 // minimum size of StatusResponse without CRC | 110 | #define EPL_C_DLL_MINSIZE_STATUSRES 72 // minimum size of StatusResponse without CRC |
113 | #define EPL_C_DLL_MINSIZE_NMTCMD 20 // minimum size of NmtCommand without CommandData, padding and CRC | 111 | #define EPL_C_DLL_MINSIZE_NMTCMD 20 // minimum size of NmtCommand without CommandData, padding and CRC |
114 | #define EPL_C_DLL_MINSIZE_NMTCMDEXT 52 // minimum size of NmtCommand without padding and CRC | 112 | #define EPL_C_DLL_MINSIZE_NMTCMDEXT 52 // minimum size of NmtCommand without padding and CRC |
115 | #define EPL_C_DLL_MINSIZE_NMTREQ 20 // minimum size of NmtRequest without CommandData, padding and CRC | 113 | #define EPL_C_DLL_MINSIZE_NMTREQ 20 // minimum size of NmtRequest without CommandData, padding and CRC |
116 | #define EPL_C_DLL_MINSIZE_NMTREQEXT 52 // minimum size of NmtRequest without padding and CRC | 114 | #define EPL_C_DLL_MINSIZE_NMTREQEXT 52 // minimum size of NmtRequest without padding and CRC |
117 | 115 | ||
118 | #define EPL_C_ERR_MONITOR_DELAY 10 // Error monitoring start delay (not used in DS 1.0.0) | 116 | #define EPL_C_ERR_MONITOR_DELAY 10 // Error monitoring start delay (not used in DS 1.0.0) |
119 | #define EPL_C_IP_ADR_INVALID 0x00000000L // invalid IP address (0.0.0.0) used to indicate no change | 117 | #define EPL_C_IP_ADR_INVALID 0x00000000L // invalid IP address (0.0.0.0) used to indicate no change |
120 | #define EPL_C_IP_INVALID_MTU 0 // Byte: invalid MTU size used to indicate no change | 118 | #define EPL_C_IP_INVALID_MTU 0 // Byte: invalid MTU size used to indicate no change |
121 | #define EPL_C_IP_MAX_MTU 1518 // Byte: maximum size in bytes of the IP stack which must be processed. | 119 | #define EPL_C_IP_MAX_MTU 1518 // Byte: maximum size in bytes of the IP stack which must be processed. |
122 | #define EPL_C_IP_MIN_MTU 300 // Byte: minimum size in bytes of the IP stack which must be processed. | 120 | #define EPL_C_IP_MIN_MTU 300 // Byte: minimum size in bytes of the IP stack which must be processed. |
123 | #define EPL_C_NMT_STATE_TOLERANCE 5 // Cycles: maximum reaction time to NMT state commands | 121 | #define EPL_C_NMT_STATE_TOLERANCE 5 // Cycles: maximum reaction time to NMT state commands |
124 | #define EPL_C_NMT_STATREQ_CYCLE 5 // sec: StatusRequest cycle time to be applied to AsyncOnly CNs | 122 | #define EPL_C_NMT_STATREQ_CYCLE 5 // sec: StatusRequest cycle time to be applied to AsyncOnly CNs |
125 | #define EPL_C_SDO_EPL_PORT 3819 | 123 | #define EPL_C_SDO_EPL_PORT 3819 |
126 | 124 | ||
127 | #define EPL_C_DLL_MAX_ASND_SERVICE_IDS 5 // see tEplDllAsndServiceId in EplDll.h | 125 | #define EPL_C_DLL_MAX_ASND_SERVICE_IDS 5 // see tEplDllAsndServiceId in EplDll.h |
128 | |||
129 | |||
130 | 126 | ||
131 | // Default configuration | 127 | // Default configuration |
132 | // ====================== | 128 | // ====================== |
133 | 129 | ||
134 | #ifndef EPL_D_PDO_Granularity_U8 | 130 | #ifndef EPL_D_PDO_Granularity_U8 |
135 | #define EPL_D_PDO_Granularity_U8 8 // minimum size of objects to be mapped in bits UNSIGNED8 O O 1 1 | 131 | #define EPL_D_PDO_Granularity_U8 8 // minimum size of objects to be mapped in bits UNSIGNED8 O O 1 1 |
136 | #endif | 132 | #endif |
137 | 133 | ||
138 | #ifndef EPL_NMT_MAX_NODE_ID | 134 | #ifndef EPL_NMT_MAX_NODE_ID |
139 | #define EPL_NMT_MAX_NODE_ID 254 // maximum node-ID | 135 | #define EPL_NMT_MAX_NODE_ID 254 // maximum node-ID |
140 | #endif | 136 | #endif |
141 | 137 | ||
142 | #ifndef EPL_D_NMT_MaxCNNumber_U8 | 138 | #ifndef EPL_D_NMT_MaxCNNumber_U8 |
143 | #define EPL_D_NMT_MaxCNNumber_U8 239 // maximum number of supported regular CNs in the Node ID range 1 .. 239 UNSIGNED8 O O 239 239 | 139 | #define EPL_D_NMT_MaxCNNumber_U8 239 // maximum number of supported regular CNs in the Node ID range 1 .. 239 UNSIGNED8 O O 239 239 |
144 | #endif | 140 | #endif |
145 | 141 | ||
146 | // defines for EPL API layer static process image | 142 | // defines for EPL API layer static process image |
@@ -162,7 +158,7 @@ | |||
162 | #endif | 158 | #endif |
163 | 159 | ||
164 | #ifndef EPL_OBD_MAX_STRING_SIZE | 160 | #ifndef EPL_OBD_MAX_STRING_SIZE |
165 | #define EPL_OBD_MAX_STRING_SIZE 32 // is used for objects 0x1008/0x1009/0x100A | 161 | #define EPL_OBD_MAX_STRING_SIZE 32 // is used for objects 0x1008/0x1009/0x100A |
166 | #endif | 162 | #endif |
167 | 163 | ||
168 | #ifndef EPL_OBD_USE_STORE_RESTORE | 164 | #ifndef EPL_OBD_USE_STORE_RESTORE |
@@ -194,7 +190,7 @@ | |||
194 | #endif | 190 | #endif |
195 | 191 | ||
196 | #ifndef EPL_VETH_NAME | 192 | #ifndef EPL_VETH_NAME |
197 | #define EPL_VETH_NAME "epl" // name of net device in Linux | 193 | #define EPL_VETH_NAME "epl" // name of net device in Linux |
198 | #endif | 194 | #endif |
199 | 195 | ||
200 | /* | 196 | /* |
@@ -303,60 +299,57 @@ | |||
303 | #define EPL_E_DLL_LOSS_SOA_TH 0x8244 | 299 | #define EPL_E_DLL_LOSS_SOA_TH 0x8244 |
304 | #define EPL_E_DLL_LOSS_SOC_TH 0x8245 | 300 | #define EPL_E_DLL_LOSS_SOC_TH 0x8245 |
305 | // 0x84xx BootUp Errors | 301 | // 0x84xx BootUp Errors |
306 | #define EPL_E_NMT_BA1 0x8410 // other MN in MsNotActive active | 302 | #define EPL_E_NMT_BA1 0x8410 // other MN in MsNotActive active |
307 | #define EPL_E_NMT_BA1_NO_MN_SUPPORT 0x8411 // MN is not supported | 303 | #define EPL_E_NMT_BA1_NO_MN_SUPPORT 0x8411 // MN is not supported |
308 | #define EPL_E_NMT_BPO1 0x8420 // mandatory CN was not found or failed in BootStep1 | 304 | #define EPL_E_NMT_BPO1 0x8420 // mandatory CN was not found or failed in BootStep1 |
309 | #define EPL_E_NMT_BPO1_GET_IDENT 0x8421 // IdentRes was not received | 305 | #define EPL_E_NMT_BPO1_GET_IDENT 0x8421 // IdentRes was not received |
310 | #define EPL_E_NMT_BPO1_DEVICE_TYPE 0x8422 // wrong device type | 306 | #define EPL_E_NMT_BPO1_DEVICE_TYPE 0x8422 // wrong device type |
311 | #define EPL_E_NMT_BPO1_VENDOR_ID 0x8423 // wrong vendor ID | 307 | #define EPL_E_NMT_BPO1_VENDOR_ID 0x8423 // wrong vendor ID |
312 | #define EPL_E_NMT_BPO1_PRODUCT_CODE 0x8424 // wrong product code | 308 | #define EPL_E_NMT_BPO1_PRODUCT_CODE 0x8424 // wrong product code |
313 | #define EPL_E_NMT_BPO1_REVISION_NO 0x8425 // wrong revision number | 309 | #define EPL_E_NMT_BPO1_REVISION_NO 0x8425 // wrong revision number |
314 | #define EPL_E_NMT_BPO1_SERIAL_NO 0x8426 // wrong serial number | 310 | #define EPL_E_NMT_BPO1_SERIAL_NO 0x8426 // wrong serial number |
315 | #define EPL_E_NMT_BPO1_CF_VERIFY 0x8428 // verification of configuration failed | 311 | #define EPL_E_NMT_BPO1_CF_VERIFY 0x8428 // verification of configuration failed |
316 | #define EPL_E_NMT_BPO2 0x8430 // mandatory CN failed in BootStep2 | 312 | #define EPL_E_NMT_BPO2 0x8430 // mandatory CN failed in BootStep2 |
317 | #define EPL_E_NMT_BRO 0x8440 // CheckCommunication failed for mandatory CN | 313 | #define EPL_E_NMT_BRO 0x8440 // CheckCommunication failed for mandatory CN |
318 | #define EPL_E_NMT_WRONG_STATE 0x8480 // mandatory CN has wrong NMT state | 314 | #define EPL_E_NMT_WRONG_STATE 0x8480 // mandatory CN has wrong NMT state |
319 | 315 | ||
320 | // Defines for object 0x1F80 NMT_StartUp_U32 | 316 | // Defines for object 0x1F80 NMT_StartUp_U32 |
321 | // ========================================== | 317 | // ========================================== |
322 | #define EPL_NMTST_STARTALLNODES 0x00000002L // Bit 1 | 318 | #define EPL_NMTST_STARTALLNODES 0x00000002L // Bit 1 |
323 | #define EPL_NMTST_NO_AUTOSTART 0x00000004L // Bit 2 | 319 | #define EPL_NMTST_NO_AUTOSTART 0x00000004L // Bit 2 |
324 | #define EPL_NMTST_NO_STARTNODE 0x00000008L // Bit 3 | 320 | #define EPL_NMTST_NO_STARTNODE 0x00000008L // Bit 3 |
325 | #define EPL_NMTST_RESETALL_MAND_CN 0x00000010L // Bit 4 | 321 | #define EPL_NMTST_RESETALL_MAND_CN 0x00000010L // Bit 4 |
326 | #define EPL_NMTST_STOPALL_MAND_CN 0x00000040L // Bit 6 | 322 | #define EPL_NMTST_STOPALL_MAND_CN 0x00000040L // Bit 6 |
327 | #define EPL_NMTST_NO_AUTOPREOP2 0x00000080L // Bit 7 | 323 | #define EPL_NMTST_NO_AUTOPREOP2 0x00000080L // Bit 7 |
328 | #define EPL_NMTST_NO_AUTOREADYTOOP 0x00000100L // Bit 8 | 324 | #define EPL_NMTST_NO_AUTOREADYTOOP 0x00000100L // Bit 8 |
329 | #define EPL_NMTST_EXT_CNIDENTCHECK 0x00000200L // Bit 9 | 325 | #define EPL_NMTST_EXT_CNIDENTCHECK 0x00000200L // Bit 9 |
330 | #define EPL_NMTST_SWVERSIONCHECK 0x00000400L // Bit 10 | 326 | #define EPL_NMTST_SWVERSIONCHECK 0x00000400L // Bit 10 |
331 | #define EPL_NMTST_CONFCHECK 0x00000800L // Bit 11 | 327 | #define EPL_NMTST_CONFCHECK 0x00000800L // Bit 11 |
332 | #define EPL_NMTST_NO_RETURN_PREOP1 0x00001000L // Bit 12 | 328 | #define EPL_NMTST_NO_RETURN_PREOP1 0x00001000L // Bit 12 |
333 | #define EPL_NMTST_BASICETHERNET 0x00002000L // Bit 13 | 329 | #define EPL_NMTST_BASICETHERNET 0x00002000L // Bit 13 |
334 | 330 | ||
335 | // Defines for object 0x1F81 NMT_NodeAssignment_AU32 | 331 | // Defines for object 0x1F81 NMT_NodeAssignment_AU32 |
336 | // ================================================== | 332 | // ================================================== |
337 | #define EPL_NODEASSIGN_NODE_EXISTS 0x00000001L // Bit 0 | 333 | #define EPL_NODEASSIGN_NODE_EXISTS 0x00000001L // Bit 0 |
338 | #define EPL_NODEASSIGN_NODE_IS_CN 0x00000002L // Bit 1 | 334 | #define EPL_NODEASSIGN_NODE_IS_CN 0x00000002L // Bit 1 |
339 | #define EPL_NODEASSIGN_START_CN 0x00000004L // Bit 2 | 335 | #define EPL_NODEASSIGN_START_CN 0x00000004L // Bit 2 |
340 | #define EPL_NODEASSIGN_MANDATORY_CN 0x00000008L // Bit 3 | 336 | #define EPL_NODEASSIGN_MANDATORY_CN 0x00000008L // Bit 3 |
341 | #define EPL_NODEASSIGN_KEEPALIVE 0x00000010L //currently not used in EPL V2 standard | 337 | #define EPL_NODEASSIGN_KEEPALIVE 0x00000010L //currently not used in EPL V2 standard |
342 | #define EPL_NODEASSIGN_SWVERSIONCHECK 0x00000020L // Bit 5 | 338 | #define EPL_NODEASSIGN_SWVERSIONCHECK 0x00000020L // Bit 5 |
343 | #define EPL_NODEASSIGN_SWUPDATE 0x00000040L // Bit 6 | 339 | #define EPL_NODEASSIGN_SWUPDATE 0x00000040L // Bit 6 |
344 | #define EPL_NODEASSIGN_ASYNCONLY_NODE 0x00000100L // Bit 8 | 340 | #define EPL_NODEASSIGN_ASYNCONLY_NODE 0x00000100L // Bit 8 |
345 | #define EPL_NODEASSIGN_MULTIPLEXED_CN 0x00000200L // Bit 9 | 341 | #define EPL_NODEASSIGN_MULTIPLEXED_CN 0x00000200L // Bit 9 |
346 | #define EPL_NODEASSIGN_RT1 0x00000400L // Bit 10 | 342 | #define EPL_NODEASSIGN_RT1 0x00000400L // Bit 10 |
347 | #define EPL_NODEASSIGN_RT2 0x00000800L // Bit 11 | 343 | #define EPL_NODEASSIGN_RT2 0x00000800L // Bit 11 |
348 | #define EPL_NODEASSIGN_MN_PRES 0x00001000L // Bit 12 | 344 | #define EPL_NODEASSIGN_MN_PRES 0x00001000L // Bit 12 |
349 | #define EPL_NODEASSIGN_VALID 0x80000000L // Bit 31 | 345 | #define EPL_NODEASSIGN_VALID 0x80000000L // Bit 31 |
350 | 346 | ||
351 | //--------------------------------------------------------------------------- | 347 | //--------------------------------------------------------------------------- |
352 | // typedef | 348 | // typedef |
353 | //--------------------------------------------------------------------------- | 349 | //--------------------------------------------------------------------------- |
354 | 350 | ||
355 | |||
356 | |||
357 | //--------------------------------------------------------------------------- | 351 | //--------------------------------------------------------------------------- |
358 | // function prototypes | 352 | // function prototypes |
359 | //--------------------------------------------------------------------------- | 353 | //--------------------------------------------------------------------------- |
360 | 354 | ||
361 | 355 | #endif // #ifndef _EPL_DEF_H_ | |
362 | #endif // #ifndef _EPL_DEF_H_ | ||
diff --git a/drivers/staging/epl/EplDll.h b/drivers/staging/epl/EplDll.h index 941ccef8ea4d..36657f2daf8b 100644 --- a/drivers/staging/epl/EplDll.h +++ b/drivers/staging/epl/EplDll.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/06/08 d.k.: start of the implementation, version 1.00 | 67 | 2006/06/08 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_DLL_H_ | 71 | #ifndef _EPL_DLL_H_ |
@@ -79,133 +78,123 @@ | |||
79 | // const defines | 78 | // const defines |
80 | //--------------------------------------------------------------------------- | 79 | //--------------------------------------------------------------------------- |
81 | 80 | ||
82 | |||
83 | #ifndef EPL_DLL_MAX_ASND_SERVICE_ID | 81 | #ifndef EPL_DLL_MAX_ASND_SERVICE_ID |
84 | #define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5 | 82 | #define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5 |
85 | #endif | 83 | #endif |
86 | 84 | ||
87 | //--------------------------------------------------------------------------- | 85 | //--------------------------------------------------------------------------- |
88 | // typedef | 86 | // typedef |
89 | //--------------------------------------------------------------------------- | 87 | //--------------------------------------------------------------------------- |
90 | 88 | ||
91 | typedef enum | 89 | typedef enum { |
92 | { | 90 | kEplDllAsndNotDefined = 0x00, |
93 | kEplDllAsndNotDefined = 0x00, | 91 | kEplDllAsndIdentResponse = 0x01, |
94 | kEplDllAsndIdentResponse = 0x01, | 92 | kEplDllAsndStatusResponse = 0x02, |
95 | kEplDllAsndStatusResponse = 0x02, | 93 | kEplDllAsndNmtRequest = 0x03, |
96 | kEplDllAsndNmtRequest = 0x03, | 94 | kEplDllAsndNmtCommand = 0x04, |
97 | kEplDllAsndNmtCommand = 0x04, | 95 | kEplDllAsndSdo = 0x05 |
98 | kEplDllAsndSdo = 0x05 | ||
99 | |||
100 | } tEplDllAsndServiceId; | 96 | } tEplDllAsndServiceId; |
101 | 97 | ||
102 | typedef enum | 98 | typedef enum { |
103 | { | 99 | kEplDllAsndFilterNone = 0x00, |
104 | kEplDllAsndFilterNone = 0x00, | 100 | kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID |
105 | kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID | 101 | kEplDllAsndFilterAny = 0x02, // receive any ASnd frame |
106 | kEplDllAsndFilterAny = 0x02, // receive any ASnd frame | ||
107 | } tEplDllAsndFilter; | 102 | } tEplDllAsndFilter; |
108 | 103 | ||
109 | typedef enum | 104 | typedef enum { |
110 | { | 105 | kEplDllReqServiceNo = 0x00, |
111 | kEplDllReqServiceNo = 0x00, | 106 | kEplDllReqServiceIdent = 0x01, |
112 | kEplDllReqServiceIdent = 0x01, | 107 | kEplDllReqServiceStatus = 0x02, |
113 | kEplDllReqServiceStatus = 0x02, | 108 | kEplDllReqServiceNmtRequest = 0x03, |
114 | kEplDllReqServiceNmtRequest = 0x03, | 109 | kEplDllReqServiceUnspecified = 0xFF, |
115 | kEplDllReqServiceUnspecified= 0xFF, | ||
116 | 110 | ||
117 | } tEplDllReqServiceId; | 111 | } tEplDllReqServiceId; |
118 | 112 | ||
119 | typedef enum | 113 | typedef enum { |
120 | { | 114 | kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST |
121 | kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST | 115 | kEplDllAsyncReqPrio6 = 0x06, |
122 | kEplDllAsyncReqPrio6 = 0x06, | 116 | kEplDllAsyncReqPrio5 = 0x05, |
123 | kEplDllAsyncReqPrio5 = 0x05, | 117 | kEplDllAsyncReqPrio4 = 0x04, |
124 | kEplDllAsyncReqPrio4 = 0x04, | 118 | kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST |
125 | kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST | 119 | kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC |
126 | kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC | 120 | kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC |
127 | kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC | 121 | kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST |
128 | kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST | ||
129 | 122 | ||
130 | } tEplDllAsyncReqPriority; | 123 | } tEplDllAsyncReqPriority; |
131 | 124 | ||
132 | typedef struct | 125 | typedef struct { |
133 | { | 126 | unsigned int m_uiFrameSize; |
134 | unsigned int m_uiFrameSize; | 127 | tEplFrame *m_pFrame; |
135 | tEplFrame * m_pFrame; | 128 | tEplNetTime m_NetTime; |
136 | tEplNetTime m_NetTime; | ||
137 | 129 | ||
138 | } tEplFrameInfo; | 130 | } tEplFrameInfo; |
139 | 131 | ||
140 | typedef struct | 132 | typedef struct { |
141 | { | 133 | unsigned int m_uiSizeOfStruct; |
142 | unsigned int m_uiSizeOfStruct; | 134 | BOOL m_fAsyncOnly; // do not need to register PRes-Frame |
143 | BOOL m_fAsyncOnly; // do not need to register PRes-Frame | 135 | unsigned int m_uiNodeId; // local node ID |
144 | unsigned int m_uiNodeId; // local node ID | 136 | |
145 | 137 | // 0x1F82: NMT_FeatureFlags_U32 | |
146 | // 0x1F82: NMT_FeatureFlags_U32 | 138 | DWORD m_dwFeatureFlags; |
147 | DWORD m_dwFeatureFlags; | 139 | // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] |
148 | // Cycle Length (0x1006: NMT_CycleLen_U32) in [us] | 140 | DWORD m_dwCycleLen; // required for error detection |
149 | DWORD m_dwCycleLen; // required for error detection | 141 | // 0x1F98: NMT_CycleTiming_REC |
150 | // 0x1F98: NMT_CycleTiming_REC | 142 | // 0x1F98.1: IsochrTxMaxPayload_U16 |
151 | // 0x1F98.1: IsochrTxMaxPayload_U16 | 143 | unsigned int m_uiIsochrTxMaxPayload; // const |
152 | unsigned int m_uiIsochrTxMaxPayload; // const | 144 | // 0x1F98.2: IsochrRxMaxPayload_U16 |
153 | // 0x1F98.2: IsochrRxMaxPayload_U16 | 145 | unsigned int m_uiIsochrRxMaxPayload; // const |
154 | unsigned int m_uiIsochrRxMaxPayload; // const | 146 | // 0x1F98.3: PResMaxLatency_U32 |
155 | // 0x1F98.3: PResMaxLatency_U32 | 147 | DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes |
156 | DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes | 148 | // 0x1F98.4: PReqActPayloadLimit_U16 |
157 | // 0x1F98.4: PReqActPayloadLimit_U16 | 149 | unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes) |
158 | unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes) | 150 | // 0x1F98.5: PResActPayloadLimit_U16 |
159 | // 0x1F98.5: PResActPayloadLimit_U16 | 151 | unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes) |
160 | unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes) | 152 | // 0x1F98.6: ASndMaxLatency_U32 |
161 | // 0x1F98.6: ASndMaxLatency_U32 | 153 | DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes |
162 | DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes | 154 | // 0x1F98.7: MultiplCycleCnt_U8 |
163 | // 0x1F98.7: MultiplCycleCnt_U8 | 155 | unsigned int m_uiMultiplCycleCnt; // required for error detection |
164 | unsigned int m_uiMultiplCycleCnt; // required for error detection | 156 | // 0x1F98.8: AsyncMTU_U16 |
165 | // 0x1F98.8: AsyncMTU_U16 | 157 | unsigned int m_uiAsyncMtu; // required to set up max frame size |
166 | unsigned int m_uiAsyncMtu; // required to set up max frame size | 158 | // $$$ 0x1F98.9: Prescaler_U16 |
167 | // $$$ 0x1F98.9: Prescaler_U16 | 159 | // $$$ Multiplexed Slot |
168 | // $$$ Multiplexed Slot | 160 | |
169 | 161 | // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] | |
170 | // 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns] | 162 | DWORD m_dwLossOfFrameTolerance; |
171 | DWORD m_dwLossOfFrameTolerance; | 163 | |
172 | 164 | // 0x1F8A: NMT_MNCycleTiming_REC | |
173 | // 0x1F8A: NMT_MNCycleTiming_REC | 165 | // 0x1F8A.1: WaitSoCPReq_U32 in [ns] |
174 | // 0x1F8A.1: WaitSoCPReq_U32 in [ns] | 166 | DWORD m_dwWaitSocPreq; |
175 | DWORD m_dwWaitSocPreq; | 167 | |
176 | 168 | // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] | |
177 | // 0x1F8A.2: AsyncSlotTimeout_U32 in [ns] | 169 | DWORD m_dwAsyncSlotTimeout; |
178 | DWORD m_dwAsyncSlotTimeout; | ||
179 | 170 | ||
180 | } tEplDllConfigParam; | 171 | } tEplDllConfigParam; |
181 | 172 | ||
182 | typedef struct | 173 | typedef struct { |
183 | { | 174 | unsigned int m_uiSizeOfStruct; |
184 | unsigned int m_uiSizeOfStruct; | 175 | DWORD m_dwDeviceType; // NMT_DeviceType_U32 |
185 | DWORD m_dwDeviceType; // NMT_DeviceType_U32 | 176 | DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 |
186 | DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 | 177 | DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 |
187 | DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 | 178 | DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 |
188 | DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 | 179 | DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 |
189 | DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 | 180 | QWORD m_qwVendorSpecificExt1; |
190 | QWORD m_qwVendorSpecificExt1; | 181 | DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 |
191 | DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 | 182 | DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 |
192 | DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 | 183 | DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device |
193 | DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device | 184 | DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device |
194 | DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device | 185 | DWORD m_dwIpAddress; |
195 | DWORD m_dwIpAddress; | 186 | DWORD m_dwSubnetMask; |
196 | DWORD m_dwSubnetMask; | 187 | DWORD m_dwDefaultGateway; |
197 | DWORD m_dwDefaultGateway; | 188 | BYTE m_sHostname[32]; |
198 | BYTE m_sHostname[32]; | 189 | BYTE m_abVendorSpecificExt2[48]; |
199 | BYTE m_abVendorSpecificExt2[48]; | ||
200 | 190 | ||
201 | } tEplDllIdentParam; | 191 | } tEplDllIdentParam; |
202 | 192 | ||
203 | typedef struct | 193 | typedef struct { |
204 | { | 194 | unsigned int m_uiNodeId; |
205 | unsigned int m_uiNodeId; | 195 | WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16 |
206 | WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16 | 196 | WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16 |
207 | WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16 | 197 | DWORD m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32 |
208 | DWORD m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32 | ||
209 | 198 | ||
210 | } tEplDllNodeInfo; | 199 | } tEplDllNodeInfo; |
211 | 200 | ||
@@ -213,8 +202,4 @@ typedef struct | |||
213 | // function prototypes | 202 | // function prototypes |
214 | //--------------------------------------------------------------------------- | 203 | //--------------------------------------------------------------------------- |
215 | 204 | ||
216 | 205 | #endif // #ifndef _EPL_DLL_H_ | |
217 | |||
218 | #endif // #ifndef _EPL_DLL_H_ | ||
219 | |||
220 | |||
diff --git a/drivers/staging/epl/EplDllCal.h b/drivers/staging/epl/EplDllCal.h index d8bf7311bfdf..24460087e987 100644 --- a/drivers/staging/epl/EplDllCal.h +++ b/drivers/staging/epl/EplDllCal.h | |||
@@ -66,13 +66,11 @@ | |||
66 | 66 | ||
67 | 2006/06/20 d.k.: start of the implementation, version 1.00 | 67 | 2006/06/20 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_DLLCAL_H_ | 71 | #ifndef _EPL_DLLCAL_H_ |
73 | #define _EPL_DLLCAL_H_ | 72 | #define _EPL_DLLCAL_H_ |
74 | 73 | ||
75 | |||
76 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
77 | // const defines | 75 | // const defines |
78 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
@@ -105,18 +103,16 @@ | |||
105 | // typedef | 103 | // typedef |
106 | //--------------------------------------------------------------------------- | 104 | //--------------------------------------------------------------------------- |
107 | 105 | ||
108 | typedef struct | 106 | typedef struct { |
109 | { | 107 | tEplDllAsndServiceId m_ServiceId; |
110 | tEplDllAsndServiceId m_ServiceId; | 108 | tEplDllAsndFilter m_Filter; |
111 | tEplDllAsndFilter m_Filter; | ||
112 | 109 | ||
113 | } tEplDllCalAsndServiceIdFilter; | 110 | } tEplDllCalAsndServiceIdFilter; |
114 | 111 | ||
115 | typedef struct | 112 | typedef struct { |
116 | { | 113 | tEplDllReqServiceId m_Service; |
117 | tEplDllReqServiceId m_Service; | 114 | unsigned int m_uiNodeId; |
118 | unsigned int m_uiNodeId; | 115 | BYTE m_bSoaFlag1; |
119 | BYTE m_bSoaFlag1; | ||
120 | 116 | ||
121 | } tEplDllCalIssueRequest; | 117 | } tEplDllCalIssueRequest; |
122 | 118 | ||
@@ -124,8 +120,4 @@ typedef struct | |||
124 | // function prototypes | 120 | // function prototypes |
125 | //--------------------------------------------------------------------------- | 121 | //--------------------------------------------------------------------------- |
126 | 122 | ||
127 | 123 | #endif // #ifndef _EPL_DLLKCAL_H_ | |
128 | |||
129 | #endif // #ifndef _EPL_DLLKCAL_H_ | ||
130 | |||
131 | |||
diff --git a/drivers/staging/epl/EplErrDef.h b/drivers/staging/epl/EplErrDef.h index 526169270d99..2aee12cfd28c 100644 --- a/drivers/staging/epl/EplErrDef.h +++ b/drivers/staging/epl/EplErrDef.h | |||
@@ -71,185 +71,179 @@ | |||
71 | #ifndef _EPL_ERRORDEF_H_ | 71 | #ifndef _EPL_ERRORDEF_H_ |
72 | #define _EPL_ERRORDEF_H_ | 72 | #define _EPL_ERRORDEF_H_ |
73 | 73 | ||
74 | |||
75 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
76 | // return codes | 75 | // return codes |
77 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
78 | 77 | ||
79 | typedef enum | 78 | typedef enum { |
80 | { | 79 | // area for generic errors 0x0000 - 0x000F |
81 | // area for generic errors 0x0000 - 0x000F | 80 | kEplSuccessful = 0x0000, // no error/successful run |
82 | kEplSuccessful = 0x0000, // no error/successful run | 81 | kEplIllegalInstance = 0x0001, // the called Instanz does not exist |
83 | kEplIllegalInstance = 0x0001, // the called Instanz does not exist | 82 | kEplInvalidInstanceParam = 0x0002, // |
84 | kEplInvalidInstanceParam = 0x0002, // | 83 | kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available |
85 | kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available | 84 | kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011 |
86 | kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011 | 85 | kEplInvalidOperation = 0x0005, // operation not allowed in this situation |
87 | kEplInvalidOperation = 0x0005, // operation not allowed in this situation | 86 | kEplInvalidNodeId = 0x0007, // invalid NodeId was specified |
88 | kEplInvalidNodeId = 0x0007, // invalid NodeId was specified | 87 | kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...) |
89 | kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...) | 88 | kEplShutdown = 0x0009, // stack is shutting down |
90 | kEplShutdown = 0x0009, // stack is shutting down | 89 | kEplReject = 0x000A, // reject the subsequent command |
91 | kEplReject = 0x000A, // reject the subsequent command | 90 | |
92 | 91 | // area for EDRV module 0x0010 - 0x001F | |
93 | // area for EDRV module 0x0010 - 0x001F | ||
94 | // kEplEdrvNoFrame = 0x0010, // no CAN message was received | 92 | // kEplEdrvNoFrame = 0x0010, // no CAN message was received |
95 | // kEplEdrvMsgHigh = 0x0011, // CAN message with high priority was received | 93 | // kEplEdrvMsgHigh = 0x0011, // CAN message with high priority was received |
96 | // kEplEdrvMsgLow = 0x0012, // CAN message with low priority was received | 94 | // kEplEdrvMsgLow = 0x0012, // CAN message with low priority was received |
97 | kEplEdrvInitError = 0x0013, // initialisation error | 95 | kEplEdrvInitError = 0x0013, // initialisation error |
98 | kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames | 96 | kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames |
99 | kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist | 97 | kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist |
100 | // kEplEdrvNoFreeChannel = 0x0014, // CAN controller has not a free channel | 98 | // kEplEdrvNoFreeChannel = 0x0014, // CAN controller has not a free channel |
101 | // kEplEdrvTxBuffHighOverrun = 0x0015, // buffer for high priority CAN transmit messages has overrun | 99 | // kEplEdrvTxBuffHighOverrun = 0x0015, // buffer for high priority CAN transmit messages has overrun |
102 | // kEplEdrvTxBuffLowOverrun = 0x0016, // buffer for low priority CAN transmit messages has overrun | 100 | // kEplEdrvTxBuffLowOverrun = 0x0016, // buffer for low priority CAN transmit messages has overrun |
103 | // kEplEdrvIllegalBdi = 0x0017, // unsupported baudrate within baudrate table | 101 | // kEplEdrvIllegalBdi = 0x0017, // unsupported baudrate within baudrate table |
104 | // kEplEdrvBusy = 0x0018, // remote frame can not be updated because no bus contact or CAN | 102 | // kEplEdrvBusy = 0x0018, // remote frame can not be updated because no bus contact or CAN |
105 | // transmission is activ | 103 | // transmission is activ |
106 | // kEplEdrvInvalidDriverType = 0x0019, // (PC: Windows or Linux) invalid driver type | 104 | // kEplEdrvInvalidDriverType = 0x0019, // (PC: Windows or Linux) invalid driver type |
107 | // kEplEdrvDriverNotFound = 0x001A, // (PC: Windows or Linux) driver (DLL) could not be found | 105 | // kEplEdrvDriverNotFound = 0x001A, // (PC: Windows or Linux) driver (DLL) could not be found |
108 | // kEplEdrvInvalidBaseAddress = 0x001B, // (PC: Windows or Linux) driver could not found the CAN controller | 106 | // kEplEdrvInvalidBaseAddress = 0x001B, // (PC: Windows or Linux) driver could not found the CAN controller |
109 | // kEplEdrvInvalidParam = 0x001C, // invalid param in function call | 107 | // kEplEdrvInvalidParam = 0x001C, // invalid param in function call |
110 | 108 | ||
111 | // area for COB module 0x0020 - 0x002F | 109 | // area for COB module 0x0020 - 0x002F |
112 | /* kEplCobNoFreeEntry = 0x0020, // no free entry in RX- or TX-COB table | 110 | /* kEplCobNoFreeEntry = 0x0020, // no free entry in RX- or TX-COB table |
113 | kEplCobAlreadyExist = 0x0021, // COB-ID already exists in RX- resp. TX-COB table | 111 | kEplCobAlreadyExist = 0x0021, // COB-ID already exists in RX- resp. TX-COB table |
114 | */ | 112 | */ |
115 | kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed | 113 | kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed |
116 | kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before | 114 | kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before |
117 | // kEplDllAsyncRxBufferFull = 0x0024, // receive buffer for asynchronous frames is full | 115 | // kEplDllAsyncRxBufferFull = 0x0024, // receive buffer for asynchronous frames is full |
118 | kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty | 116 | kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty |
119 | kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full | 117 | kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full |
120 | kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure | 118 | kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure |
121 | kEplDllInvalidParam = 0x0028, // invalid parameters passed to function | 119 | kEplDllInvalidParam = 0x0028, // invalid parameters passed to function |
122 | kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet | 120 | kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet |
123 | kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist | 121 | kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist |
124 | /* kEplCobIllegalCanId = 0x0023, // COB-ID is not allowed (like 0x000 is reserved for NMT, ...) | 122 | /* kEplCobIllegalCanId = 0x0023, // COB-ID is not allowed (like 0x000 is reserved for NMT, ...) |
125 | kEplCobInvalidCanId = 0x0024, // COB-ID is switched off | 123 | kEplCobInvalidCanId = 0x0024, // COB-ID is switched off |
126 | kEplCobCdrvStateSet = 0x0025, // at least one bit of CAN driver state is set | 124 | kEplCobCdrvStateSet = 0x0025, // at least one bit of CAN driver state is set |
127 | kEplCobNoFreeEntryHighBuf = 0x0026, // no free entry in high priotity RX- or TX-COB table | 125 | kEplCobNoFreeEntryHighBuf = 0x0026, // no free entry in high priotity RX- or TX-COB table |
128 | kEplCobOwnId = 0x0027, // COB-ID already exists in own module which calls CobDefine() or CobCheck() | 126 | kEplCobOwnId = 0x0027, // COB-ID already exists in own module which calls CobDefine() or CobCheck() |
129 | */ | 127 | */ |
130 | // area for OBD module 0x0030 - 0x003F | 128 | // area for OBD module 0x0030 - 0x003F |
131 | kEplObdIllegalPart = 0x0030, // unknown OD part | 129 | kEplObdIllegalPart = 0x0030, // unknown OD part |
132 | kEplObdIndexNotExist = 0x0031, // object index does not exist in OD | 130 | kEplObdIndexNotExist = 0x0031, // object index does not exist in OD |
133 | kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index | 131 | kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index |
134 | kEplObdReadViolation = 0x0033, // read access to a write-only object | 132 | kEplObdReadViolation = 0x0033, // read access to a write-only object |
135 | kEplObdWriteViolation = 0x0034, // write access to a read-only object | 133 | kEplObdWriteViolation = 0x0034, // write access to a read-only object |
136 | kEplObdAccessViolation = 0x0035, // access not allowed | 134 | kEplObdAccessViolation = 0x0035, // access not allowed |
137 | kEplObdUnknownObjectType = 0x0036, // object type not defined/known | 135 | kEplObdUnknownObjectType = 0x0036, // object type not defined/known |
138 | kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure | 136 | kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure |
139 | kEplObdValueTooLow = 0x0038, // value to write to an object is too low | 137 | kEplObdValueTooLow = 0x0038, // value to write to an object is too low |
140 | kEplObdValueTooHigh = 0x0039, // value to write to an object is too high | 138 | kEplObdValueTooHigh = 0x0039, // value to write to an object is too high |
141 | kEplObdValueLengthError = 0x003A, // value to write is to long or to short | 139 | kEplObdValueLengthError = 0x003A, // value to write is to long or to short |
142 | // kEplObdIllegalFloat = 0x003B, // illegal float variable | 140 | // kEplObdIllegalFloat = 0x003B, // illegal float variable |
143 | // kEplObdWrongOdBuilderKey = 0x003F, // OD was generated with demo version of tool ODBuilder | 141 | // kEplObdWrongOdBuilderKey = 0x003F, // OD was generated with demo version of tool ODBuilder |
144 | 142 | ||
145 | // area for NMT module 0x0040 - 0x004F | 143 | // area for NMT module 0x0040 - 0x004F |
146 | kEplNmtUnknownCommand = 0x0040, // unknown NMT command | 144 | kEplNmtUnknownCommand = 0x0040, // unknown NMT command |
147 | kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid | 145 | kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid |
148 | kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul | 146 | kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul |
149 | kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine | 147 | kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine |
150 | kEplNmtInvalidParam = 0x0044, // invalid parameters specified | 148 | kEplNmtInvalidParam = 0x0044, // invalid parameters specified |
151 | 149 | ||
152 | // area for SDO/UDP module 0x0050 - 0x005F | 150 | // area for SDO/UDP module 0x0050 - 0x005F |
153 | kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of | 151 | kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of |
154 | // module | 152 | // module |
155 | kEplSdoUdpNoSocket = 0x0051, // error during init of socket | 153 | kEplSdoUdpNoSocket = 0x0051, // error during init of socket |
156 | kEplSdoUdpSocketError = 0x0052, // error during usage of socket | 154 | kEplSdoUdpSocketError = 0x0052, // error during usage of socket |
157 | kEplSdoUdpThreadError = 0x0053, // error during start of listen thread | 155 | kEplSdoUdpThreadError = 0x0053, // error during start of listen thread |
158 | kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp | 156 | kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp |
159 | kEplSdoUdpSendError = 0x0055, // Error during send of frame | 157 | kEplSdoUdpSendError = 0x0055, // Error during send of frame |
160 | kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid | 158 | kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid |
161 | 159 | ||
162 | // area for SDO Sequence layer module 0x0060 - 0x006F | 160 | // area for SDO Sequence layer module 0x0060 - 0x006F |
163 | kEplSdoSeqMissCb = 0x0060, // no callback-function assign | 161 | kEplSdoSeqMissCb = 0x0060, // no callback-function assign |
164 | kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection | 162 | kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection |
165 | kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer | 163 | kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer |
166 | kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected | 164 | kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected |
167 | kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history | 165 | kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history |
168 | kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct | 166 | kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct |
169 | kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full | 167 | kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full |
170 | // and a ack request is needed | 168 | // and a ack request is needed |
171 | kEplSdoSeqInvalidFrame = 0x0067, // frame not valid | 169 | kEplSdoSeqInvalidFrame = 0x0067, // frame not valid |
172 | kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later | 170 | kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later |
173 | kEplSdoSeqInvalidEvent = 0x0069, // invalid event received | 171 | kEplSdoSeqInvalidEvent = 0x0069, // invalid event received |
174 | 172 | ||
175 | // area for SDO Command Layer Module 0x0070 - 0x007F | 173 | // area for SDO Command Layer Module 0x0070 - 0x007F |
176 | kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected | 174 | kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected |
177 | kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection | 175 | kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection |
178 | kEplSdoComInvalidServiceType= 0x0072, // invalid SDO service type specified | 176 | kEplSdoComInvalidServiceType = 0x0072, // invalid SDO service type specified |
179 | kEplSdoComInvalidHandle = 0x0073, // handle invalid | 177 | kEplSdoComInvalidHandle = 0x0073, // handle invalid |
180 | kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is | 178 | kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is |
181 | // not possible | 179 | // not possible |
182 | kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is | 180 | kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is |
183 | // not responsible for this event from sequence layer | 181 | // not responsible for this event from sequence layer |
184 | kEplSdoComHandleExists = 0x0076, // handle to same node already exists | 182 | kEplSdoComHandleExists = 0x0076, // handle to same node already exists |
185 | kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running | 183 | kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running |
186 | kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function | 184 | kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function |
187 | 185 | ||
188 | // area for EPL Event-Modul 0x0080 - 0x008F | 186 | // area for EPL Event-Modul 0x0080 - 0x008F |
189 | kEplEventUnknownSink = 0x0080, // unknown sink for event | 187 | kEplEventUnknownSink = 0x0080, // unknown sink for event |
190 | kEplEventPostError = 0x0081, // error during post of event | 188 | kEplEventPostError = 0x0081, // error during post of event |
191 | 189 | ||
192 | 190 | // area for EPL Timer Modul 0x0090 - 0x009F | |
193 | 191 | kEplTimerInvalidHandle = 0x0090, // invalid handle for timer | |
194 | // area for EPL Timer Modul 0x0090 - 0x009F | 192 | kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by |
195 | kEplTimerInvalidHandle = 0x0090, // invalid handle for timer | 193 | // an error |
196 | kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by | 194 | |
197 | // an error | 195 | // area for EPL SDO/Asnd Module 0x00A0 - 0x0AF |
198 | 196 | kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid | |
199 | // area for EPL SDO/Asnd Module 0x00A0 - 0x0AF | 197 | kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection |
200 | kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid | 198 | kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid |
201 | kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection | 199 | |
202 | kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid | 200 | // area for PDO module 0x00B0 - 0x00BF |
203 | 201 | kEplPdoNotExist = 0x00B0, // selected PDO does not exist | |
204 | 202 | kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis | |
205 | // area for PDO module 0x00B0 - 0x00BF | 203 | kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity |
206 | kEplPdoNotExist = 0x00B0, // selected PDO does not exist | 204 | kEplPdoInitError = 0x00B3, // error during initialisation of PDO module |
207 | kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis | 205 | kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO |
208 | kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity | 206 | kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO |
209 | kEplPdoInitError = 0x00B3, // error during initialisation of PDO module | 207 | kEplPdoErrorSend = 0x00B6, // error during sending a PDO |
210 | kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO | 208 | kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs |
211 | kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO | 209 | kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping |
212 | kEplPdoErrorSend = 0x00B6, // error during sending a PDO | 210 | kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar() |
213 | kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs | 211 | kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value |
214 | kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping | 212 | kEplPdoWriteConstObject = 0x00BB, // constant object can not be written |
215 | kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar() | 213 | // (only TxType, Inhibit-, Event Time for CANopen Kit) |
216 | kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value | 214 | |
217 | kEplPdoWriteConstObject = 0x00BB, // constant object can not be written | 215 | // area for LSS slave module |
218 | // (only TxType, Inhibit-, Event Time for CANopen Kit) | ||
219 | |||
220 | // area for LSS slave module | ||
221 | /* kEplLsssResetNode = 0x0080, // NMT command "reset node" has to be processed after LSS configuration | 216 | /* kEplLsssResetNode = 0x0080, // NMT command "reset node" has to be processed after LSS configuration |
222 | // new of NodeId | 217 | // new of NodeId |
223 | kEplLsssInvalidNodeId = 0x0081, // no valid NodeId is configured -> wait until it is configured with | 218 | kEplLsssInvalidNodeId = 0x0081, // no valid NodeId is configured -> wait until it is configured with |
224 | // LSS service before calling CcmConnectToNet() | 219 | // LSS service before calling CcmConnectToNet() |
225 | */ | 220 | */ |
226 | // area for emergency consumer module 0x0090 - 0x009F | 221 | // area for emergency consumer module 0x0090 - 0x009F |
227 | /* kEplEmccNoFreeProducerEntry = 0x0090, // no free entry to add a Emergency Producer | 222 | /* kEplEmccNoFreeProducerEntry = 0x0090, // no free entry to add a Emergency Producer |
228 | kEplEmccNodeIdNotExist = 0x0091, // selected NodeId was never added | 223 | kEplEmccNodeIdNotExist = 0x0091, // selected NodeId was never added |
229 | kEplEmccNodeIdInvalid = 0x0092, // selected NodeId is outside of range (0x01 until 0x7F) | 224 | kEplEmccNodeIdInvalid = 0x0092, // selected NodeId is outside of range (0x01 until 0x7F) |
230 | kEplEmccNodeIdExist = 0x0093, // selected NodeId already exist | 225 | kEplEmccNodeIdExist = 0x0093, // selected NodeId already exist |
231 | */ | 226 | */ |
232 | // area for dynamic OD 0x00A0 - 0x00AF | 227 | // area for dynamic OD 0x00A0 - 0x00AF |
233 | /* kEplDynNoMemory = 0x00A0, // no memory available | 228 | /* kEplDynNoMemory = 0x00A0, // no memory available |
234 | kEplDynInvalidConfig = 0x00A1, // invalid configuration in segment container | 229 | kEplDynInvalidConfig = 0x00A1, // invalid configuration in segment container |
235 | */ | 230 | */ |
236 | // area for hertbeat consumer module 0x00B0 - 0x00BF | 231 | // area for hertbeat consumer module 0x00B0 - 0x00BF |
237 | /* kEplHbcEntryNotExist = 0x00B0, // Heartbeat Producer node not configured | 232 | /* kEplHbcEntryNotExist = 0x00B0, // Heartbeat Producer node not configured |
238 | kEplHbcEntryAlreadyExist = 0x00B1, // NodeId was already defined in heartbeat consumer table (object 0x1016) | 233 | kEplHbcEntryAlreadyExist = 0x00B1, // NodeId was already defined in heartbeat consumer table (object 0x1016) |
239 | */ | 234 | */ |
240 | // Configuration manager module 0x00C0 - 0x00CF | 235 | // Configuration manager module 0x00C0 - 0x00CF |
241 | kEplCfgMaConfigError = 0x00C0, // error in configuration manager | 236 | kEplCfgMaConfigError = 0x00C0, // error in configuration manager |
242 | kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout | 237 | kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout |
243 | kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid | 238 | kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid |
244 | kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format | 239 | kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format |
245 | kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors | 240 | kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors |
246 | kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry | 241 | kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry |
247 | kEplCfgMaNoConfigData = 0x00C6, // no configuration data present | 242 | kEplCfgMaNoConfigData = 0x00C6, // no configuration data present |
248 | kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf | 243 | kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf |
249 | // -> this entry was not configured | 244 | // -> this entry was not configured |
250 | 245 | ||
251 | 246 | // area for LSS master module 0x00D0 - 0x00DF | |
252 | // area for LSS master module 0x00D0 - 0x00DF | ||
253 | /* kEplLssmIllegalMode = 0x00D0, // illegal LSS mode (operation / configuration) | 247 | /* kEplLssmIllegalMode = 0x00D0, // illegal LSS mode (operation / configuration) |
254 | kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master | 248 | kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master |
255 | kEplLssmBusy = 0x00D2, // LSS process is busy with an previous service | 249 | kEplLssmBusy = 0x00D2, // LSS process is busy with an previous service |
@@ -257,11 +251,11 @@ typedef enum | |||
257 | kEplLssmTimeout = 0x00D4, // LSS slave did not answer a LSS service | 251 | kEplLssmTimeout = 0x00D4, // LSS slave did not answer a LSS service |
258 | kEplLssmErrorInConfirm = 0x00D5, // LSS slave replied an error code for a LSS service | 252 | kEplLssmErrorInConfirm = 0x00D5, // LSS slave replied an error code for a LSS service |
259 | */ | 253 | */ |
260 | // area for CCM modules 0x00E0 - 0xEF | 254 | // area for CCM modules 0x00E0 - 0xEF |
261 | /* kEplCcmStoreUnvalidState = 0x00E0, // memory device not available due device state | 255 | /* kEplCcmStoreUnvalidState = 0x00E0, // memory device not available due device state |
262 | kEplCcmStoreHwError = 0x00E1, // hw error due device access | 256 | kEplCcmStoreHwError = 0x00E1, // hw error due device access |
263 | */ | 257 | */ |
264 | // area for SRDO module 0x0100 - 0x011F | 258 | // area for SRDO module 0x0100 - 0x011F |
265 | /* kEplSrdoNotExist = 0x0100, // selected SRDO does not exist | 259 | /* kEplSrdoNotExist = 0x0100, // selected SRDO does not exist |
266 | kEplSrdoGranularityMismatch = 0x0101, // configured SRDO granularity is not equal to supported granularity | 260 | kEplSrdoGranularityMismatch = 0x0101, // configured SRDO granularity is not equal to supported granularity |
267 | kEplSrdoCfgTimingError = 0x0102, // configuration is not ok (Timing) | 261 | kEplSrdoCfgTimingError = 0x0102, // configuration is not ok (Timing) |
@@ -285,18 +279,16 @@ typedef enum | |||
285 | kEplSrdoOverrun = 0x0114 // a RxSRDO was received but the pevious one was not else processed | 279 | kEplSrdoOverrun = 0x0114 // a RxSRDO was received but the pevious one was not else processed |
286 | */ | 280 | */ |
287 | 281 | ||
288 | kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished | 282 | kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished |
289 | kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id) | 283 | kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id) |
290 | 284 | ||
291 | // area untill 0x07FF is reserved | 285 | // area untill 0x07FF is reserved |
292 | // area for user application from 0x0800 to 0x7FFF | 286 | // area for user application from 0x0800 to 0x7FFF |
293 | 287 | ||
294 | } tEplKernel; | 288 | } tEplKernel; |
295 | 289 | ||
296 | |||
297 | #endif | 290 | #endif |
298 | //EOF | 291 | //EOF |
299 | 292 | ||
300 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler | 293 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler |
301 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). | 294 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). |
302 | |||
diff --git a/drivers/staging/epl/EplEvent.h b/drivers/staging/epl/EplEvent.h index 5c26202f5b53..b6dc1b9b2ab1 100644 --- a/drivers/staging/epl/EplEvent.h +++ b/drivers/staging/epl/EplEvent.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/06/12 d.k.: start of the implementation, version 1.00 | 67 | 2006/06/12 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_EVENT_H_ | 71 | #ifndef _EPL_EVENT_H_ |
@@ -82,222 +81,199 @@ | |||
82 | // name and size of event queues | 81 | // name and size of event queues |
83 | #define EPL_EVENT_NAME_SHB_KERNEL_TO_USER "ShbKernelToUser" | 82 | #define EPL_EVENT_NAME_SHB_KERNEL_TO_USER "ShbKernelToUser" |
84 | #ifndef EPL_EVENT_SIZE_SHB_KERNEL_TO_USER | 83 | #ifndef EPL_EVENT_SIZE_SHB_KERNEL_TO_USER |
85 | #define EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 32768 // 32 kByte | 84 | #define EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 32768 // 32 kByte |
86 | #endif | 85 | #endif |
87 | 86 | ||
88 | #define EPL_EVENT_NAME_SHB_USER_TO_KERNEL "ShbUserToKernel" | 87 | #define EPL_EVENT_NAME_SHB_USER_TO_KERNEL "ShbUserToKernel" |
89 | #ifndef EPL_EVENT_SIZE_SHB_USER_TO_KERNEL | 88 | #ifndef EPL_EVENT_SIZE_SHB_USER_TO_KERNEL |
90 | #define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte | 89 | #define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte |
91 | #endif | 90 | #endif |
92 | 91 | ||
93 | |||
94 | // max size of event argument | 92 | // max size of event argument |
95 | #ifndef EPL_MAX_EVENT_ARG_SIZE | 93 | #ifndef EPL_MAX_EVENT_ARG_SIZE |
96 | #define EPL_MAX_EVENT_ARG_SIZE 256 // because of PDO | 94 | #define EPL_MAX_EVENT_ARG_SIZE 256 // because of PDO |
97 | #endif | 95 | #endif |
98 | 96 | ||
99 | #define EPL_DLL_ERR_MN_CRC 0x00000001L // object 0x1C00 | 97 | #define EPL_DLL_ERR_MN_CRC 0x00000001L // object 0x1C00 |
100 | #define EPL_DLL_ERR_MN_COLLISION 0x00000002L // object 0x1C01 | 98 | #define EPL_DLL_ERR_MN_COLLISION 0x00000002L // object 0x1C01 |
101 | #define EPL_DLL_ERR_MN_CYCTIMEEXCEED 0x00000004L // object 0x1C02 | 99 | #define EPL_DLL_ERR_MN_CYCTIMEEXCEED 0x00000004L // object 0x1C02 |
102 | #define EPL_DLL_ERR_MN_LOSS_LINK 0x00000008L // object 0x1C03 | 100 | #define EPL_DLL_ERR_MN_LOSS_LINK 0x00000008L // object 0x1C03 |
103 | #define EPL_DLL_ERR_MN_CN_LATE_PRES 0x00000010L // objects 0x1C04-0x1C06 | 101 | #define EPL_DLL_ERR_MN_CN_LATE_PRES 0x00000010L // objects 0x1C04-0x1C06 |
104 | #define EPL_DLL_ERR_MN_CN_LOSS_PRES 0x00000080L // objects 0x1C07-0x1C09 | 102 | #define EPL_DLL_ERR_MN_CN_LOSS_PRES 0x00000080L // objects 0x1C07-0x1C09 |
105 | #define EPL_DLL_ERR_CN_COLLISION 0x00000400L // object 0x1C0A | 103 | #define EPL_DLL_ERR_CN_COLLISION 0x00000400L // object 0x1C0A |
106 | #define EPL_DLL_ERR_CN_LOSS_SOC 0x00000800L // object 0x1C0B | 104 | #define EPL_DLL_ERR_CN_LOSS_SOC 0x00000800L // object 0x1C0B |
107 | #define EPL_DLL_ERR_CN_LOSS_SOA 0x00001000L // object 0x1C0C | 105 | #define EPL_DLL_ERR_CN_LOSS_SOA 0x00001000L // object 0x1C0C |
108 | #define EPL_DLL_ERR_CN_LOSS_PREQ 0x00002000L // object 0x1C0D | 106 | #define EPL_DLL_ERR_CN_LOSS_PREQ 0x00002000L // object 0x1C0D |
109 | #define EPL_DLL_ERR_CN_RECVD_PREQ 0x00004000L // decrement object 0x1C0D/2 | 107 | #define EPL_DLL_ERR_CN_RECVD_PREQ 0x00004000L // decrement object 0x1C0D/2 |
110 | #define EPL_DLL_ERR_CN_SOC_JITTER 0x00008000L // object 0x1C0E | 108 | #define EPL_DLL_ERR_CN_SOC_JITTER 0x00008000L // object 0x1C0E |
111 | #define EPL_DLL_ERR_CN_CRC 0x00010000L // object 0x1C0F | 109 | #define EPL_DLL_ERR_CN_CRC 0x00010000L // object 0x1C0F |
112 | #define EPL_DLL_ERR_CN_LOSS_LINK 0x00020000L // object 0x1C10 | 110 | #define EPL_DLL_ERR_CN_LOSS_LINK 0x00020000L // object 0x1C10 |
113 | #define EPL_DLL_ERR_MN_LOSS_STATRES 0x00040000L // objects 0x1C15-0x1C17 (should be operated by NmtMnu module) | 111 | #define EPL_DLL_ERR_MN_LOSS_STATRES 0x00040000L // objects 0x1C15-0x1C17 (should be operated by NmtMnu module) |
114 | #define EPL_DLL_ERR_BAD_PHYS_MODE 0x00080000L // no object | 112 | #define EPL_DLL_ERR_BAD_PHYS_MODE 0x00080000L // no object |
115 | #define EPL_DLL_ERR_MAC_BUFFER 0x00100000L // no object (NMT_GT6) | 113 | #define EPL_DLL_ERR_MAC_BUFFER 0x00100000L // no object (NMT_GT6) |
116 | #define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // no object (NMT_GT6) | 114 | #define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // no object (NMT_GT6) |
117 | #define EPL_DLL_ERR_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration) | 115 | #define EPL_DLL_ERR_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration) |
118 | |||
119 | 116 | ||
120 | //--------------------------------------------------------------------------- | 117 | //--------------------------------------------------------------------------- |
121 | // typedef | 118 | // typedef |
122 | //--------------------------------------------------------------------------- | 119 | //--------------------------------------------------------------------------- |
123 | 120 | ||
124 | // EventType determines the argument of the event | 121 | // EventType determines the argument of the event |
125 | typedef enum | 122 | typedef enum { |
126 | { | 123 | kEplEventTypeNmtEvent = 0x01, // NMT event |
127 | kEplEventTypeNmtEvent = 0x01, // NMT event | 124 | // arg is pointer to tEplNmtEvent |
128 | // arg is pointer to tEplNmtEvent | 125 | kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq) |
129 | kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq) | 126 | // arg is pointer to tEplFrame |
130 | // arg is pointer to tEplFrame | 127 | kEplEventTypePdoTx = 0x03, // PDO frame transmitted event (PRes/PReq) |
131 | kEplEventTypePdoTx = 0x03, // PDO frame transmitted event (PRes/PReq) | 128 | // arg is pointer to tEplFrameInfo |
132 | // arg is pointer to tEplFrameInfo | 129 | kEplEventTypePdoSoa = 0x04, // SoA frame received event (isochronous phase completed) |
133 | kEplEventTypePdoSoa = 0x04, // SoA frame received event (isochronous phase completed) | 130 | // arg is pointer to nothing |
134 | // arg is pointer to nothing | 131 | kEplEventTypeSync = 0x05, // Sync event (e.g. SoC or anticipated SoC) |
135 | kEplEventTypeSync = 0x05, // Sync event (e.g. SoC or anticipated SoC) | 132 | // arg is pointer to nothing |
136 | // arg is pointer to nothing | 133 | kEplEventTypeTimer = 0x06, // Timer event |
137 | kEplEventTypeTimer = 0x06, // Timer event | 134 | // arg is pointer to tEplTimerEventArg |
138 | // arg is pointer to tEplTimerEventArg | 135 | kEplEventTypeHeartbeat = 0x07, // Heartbeat event |
139 | kEplEventTypeHeartbeat = 0x07, // Heartbeat event | 136 | // arg is pointer to tEplHeartbeatEvent |
140 | // arg is pointer to tEplHeartbeatEvent | 137 | kEplEventTypeDllkCreate = 0x08, // DLL kernel create event |
141 | kEplEventTypeDllkCreate = 0x08, // DLL kernel create event | 138 | // arg is pointer to the new tEplNmtState |
142 | // arg is pointer to the new tEplNmtState | 139 | kEplEventTypeDllkDestroy = 0x09, // DLL kernel destroy event |
143 | kEplEventTypeDllkDestroy = 0x09, // DLL kernel destroy event | 140 | // arg is pointer to the old tEplNmtState |
144 | // arg is pointer to the old tEplNmtState | 141 | kEplEventTypeDllkFillTx = 0x0A, // DLL kernel fill TxBuffer event |
145 | kEplEventTypeDllkFillTx = 0x0A, // DLL kernel fill TxBuffer event | 142 | // arg is pointer to tEplDllAsyncReqPriority |
146 | // arg is pointer to tEplDllAsyncReqPriority | 143 | kEplEventTypeDllkPresReady = 0x0B, // DLL kernel PRes ready event |
147 | kEplEventTypeDllkPresReady = 0x0B, // DLL kernel PRes ready event | 144 | // arg is pointer to nothing |
148 | // arg is pointer to nothing | 145 | kEplEventTypeError = 0x0C, // Error event for API layer |
149 | kEplEventTypeError = 0x0C, // Error event for API layer | 146 | // arg is pointer to tEplEventError |
150 | // arg is pointer to tEplEventError | 147 | kEplEventTypeNmtStateChange = 0x0D, // indicate change of NMT-State |
151 | kEplEventTypeNmtStateChange = 0x0D, // indicate change of NMT-State | 148 | // arg is pointer to tEplEventNmtStateChange |
152 | // arg is pointer to tEplEventNmtStateChange | 149 | kEplEventTypeDllError = 0x0E, // DLL error event for Error handler |
153 | kEplEventTypeDllError = 0x0E, // DLL error event for Error handler | 150 | // arg is pointer to tEplErrorHandlerkEvent |
154 | // arg is pointer to tEplErrorHandlerkEvent | 151 | kEplEventTypeAsndRx = 0x0F, // received ASnd frame for DLL user module |
155 | kEplEventTypeAsndRx = 0x0F, // received ASnd frame for DLL user module | 152 | // arg is pointer to tEplFrame |
156 | // arg is pointer to tEplFrame | 153 | kEplEventTypeDllkServFilter = 0x10, // configure ServiceIdFilter |
157 | kEplEventTypeDllkServFilter = 0x10, // configure ServiceIdFilter | 154 | // arg is pointer to tEplDllCalServiceIdFilter |
158 | // arg is pointer to tEplDllCalServiceIdFilter | 155 | kEplEventTypeDllkIdentity = 0x11, // configure Identity |
159 | kEplEventTypeDllkIdentity = 0x11, // configure Identity | 156 | // arg is pointer to tEplDllIdentParam |
160 | // arg is pointer to tEplDllIdentParam | 157 | kEplEventTypeDllkConfig = 0x12, // configure ConfigParam |
161 | kEplEventTypeDllkConfig = 0x12, // configure ConfigParam | 158 | // arg is pointer to tEplDllConfigParam |
162 | // arg is pointer to tEplDllConfigParam | 159 | kEplEventTypeDllkIssueReq = 0x13, // issue Ident/Status request |
163 | kEplEventTypeDllkIssueReq = 0x13, // issue Ident/Status request | 160 | // arg is pointer to tEplDllCalIssueRequest |
164 | // arg is pointer to tEplDllCalIssueRequest | 161 | kEplEventTypeDllkAddNode = 0x14, // add node to isochronous phase |
165 | kEplEventTypeDllkAddNode = 0x14, // add node to isochronous phase | 162 | // arg is pointer to tEplDllNodeInfo |
166 | // arg is pointer to tEplDllNodeInfo | 163 | kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase |
167 | kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase | 164 | // arg is pointer to unsigned int |
168 | // arg is pointer to unsigned int | 165 | kEplEventTypeDllkSoftDelNode = 0x16, // remove node softly from isochronous phase |
169 | kEplEventTypeDllkSoftDelNode= 0x16, // remove node softly from isochronous phase | 166 | // arg is pointer to unsigned int |
170 | // arg is pointer to unsigned int | 167 | kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN |
171 | kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN | 168 | // arg is pointer to nothing |
172 | // arg is pointer to nothing | 169 | kEplEventTypeNmtMnuNmtCmdSent = 0x18, // NMT command was actually sent |
173 | kEplEventTypeNmtMnuNmtCmdSent = 0x18, // NMT command was actually sent | 170 | // arg is pointer to tEplFrame |
174 | // arg is pointer to tEplFrame | ||
175 | 171 | ||
176 | } tEplEventType; | 172 | } tEplEventType; |
177 | 173 | ||
178 | |||
179 | // EventSink determines the consumer of the event | 174 | // EventSink determines the consumer of the event |
180 | typedef enum | 175 | typedef enum { |
181 | { | 176 | kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module |
182 | kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module | 177 | kEplEventSinkNmtk = 0x01, // events for Nmtk module |
183 | kEplEventSinkNmtk = 0x01, // events for Nmtk module | 178 | kEplEventSinkDllk = 0x02, // events for Dllk module |
184 | kEplEventSinkDllk = 0x02, // events for Dllk module | 179 | kEplEventSinkDlluCal = 0x03, // events for DlluCal module |
185 | kEplEventSinkDlluCal = 0x03, // events for DlluCal module | 180 | kEplEventSinkDllkCal = 0x04, // events for DllkCal module |
186 | kEplEventSinkDllkCal = 0x04, // events for DllkCal module | 181 | kEplEventSinkPdok = 0x05, // events for Pdok module |
187 | kEplEventSinkPdok = 0x05, // events for Pdok module | 182 | kEplEventSinkNmtu = 0x06, // events for Nmtu module |
188 | kEplEventSinkNmtu = 0x06, // events for Nmtu module | 183 | kEplEventSinkErrk = 0x07, // events for Error handler module |
189 | kEplEventSinkErrk = 0x07, // events for Error handler module | 184 | kEplEventSinkErru = 0x08, // events for Error signaling module |
190 | kEplEventSinkErru = 0x08, // events for Error signaling module | 185 | kEplEventSinkSdoAsySeq = 0x09, // events for asyncronous SDO Sequence Layer module |
191 | kEplEventSinkSdoAsySeq = 0x09, // events for asyncronous SDO Sequence Layer module | 186 | kEplEventSinkNmtMnu = 0x0A, // events for NmtMnu module |
192 | kEplEventSinkNmtMnu = 0x0A, // events for NmtMnu module | 187 | kEplEventSinkLedu = 0x0B, // events for Ledu module |
193 | kEplEventSinkLedu = 0x0B, // events for Ledu module | 188 | kEplEventSinkApi = 0x0F, // events for API module |
194 | kEplEventSinkApi = 0x0F, // events for API module | ||
195 | 189 | ||
196 | } tEplEventSink; | 190 | } tEplEventSink; |
197 | 191 | ||
198 | |||
199 | // EventSource determines the source of an errorevent | 192 | // EventSource determines the source of an errorevent |
200 | typedef enum | 193 | typedef enum { |
201 | { | 194 | // kernelspace modules |
202 | // kernelspace modules | 195 | kEplEventSourceDllk = 0x01, // Dllk module |
203 | kEplEventSourceDllk = 0x01, // Dllk module | 196 | kEplEventSourceNmtk = 0x02, // Nmtk module |
204 | kEplEventSourceNmtk = 0x02, // Nmtk module | 197 | kEplEventSourceObdk = 0x03, // Obdk module |
205 | kEplEventSourceObdk = 0x03, // Obdk module | 198 | kEplEventSourcePdok = 0x04, // Pdok module |
206 | kEplEventSourcePdok = 0x04, // Pdok module | 199 | kEplEventSourceTimerk = 0x05, // Timerk module |
207 | kEplEventSourceTimerk = 0x05, // Timerk module | 200 | kEplEventSourceEventk = 0x06, // Eventk module |
208 | kEplEventSourceEventk = 0x06, // Eventk module | 201 | kEplEventSourceSyncCb = 0x07, // sync-Cb |
209 | kEplEventSourceSyncCb = 0x07, // sync-Cb | 202 | kEplEventSourceErrk = 0x08, // Error handler module |
210 | kEplEventSourceErrk = 0x08, // Error handler module | 203 | |
211 | 204 | // userspace modules | |
212 | // userspace modules | 205 | kEplEventSourceDllu = 0x10, // Dllu module |
213 | kEplEventSourceDllu = 0x10, // Dllu module | 206 | kEplEventSourceNmtu = 0x11, // Nmtu module |
214 | kEplEventSourceNmtu = 0x11, // Nmtu module | 207 | kEplEventSourceNmtCnu = 0x12, // NmtCnu module |
215 | kEplEventSourceNmtCnu = 0x12, // NmtCnu module | 208 | kEplEventSourceNmtMnu = 0x13, // NmtMnu module |
216 | kEplEventSourceNmtMnu = 0x13, // NmtMnu module | 209 | kEplEventSourceObdu = 0x14, // Obdu module |
217 | kEplEventSourceObdu = 0x14, // Obdu module | 210 | kEplEventSourceSdoUdp = 0x15, // Sdo/Udp module |
218 | kEplEventSourceSdoUdp = 0x15, // Sdo/Udp module | 211 | kEplEventSourceSdoAsnd = 0x16, // Sdo/Asnd module |
219 | kEplEventSourceSdoAsnd = 0x16, // Sdo/Asnd module | 212 | kEplEventSourceSdoAsySeq = 0x17, // Sdo asynchronus Sequence Layer module |
220 | kEplEventSourceSdoAsySeq = 0x17, // Sdo asynchronus Sequence Layer module | 213 | kEplEventSourceSdoCom = 0x18, // Sdo command layer module |
221 | kEplEventSourceSdoCom = 0x18, // Sdo command layer module | 214 | kEplEventSourceTimeru = 0x19, // Timeru module |
222 | kEplEventSourceTimeru = 0x19, // Timeru module | 215 | kEplEventSourceCfgMau = 0x1A, // CfgMau module |
223 | kEplEventSourceCfgMau = 0x1A, // CfgMau module | 216 | kEplEventSourceEventu = 0x1B, // Eventu module |
224 | kEplEventSourceEventu = 0x1B, // Eventu module | 217 | kEplEventSourceEplApi = 0x1C, // Api module |
225 | kEplEventSourceEplApi = 0x1C, // Api module | 218 | kEplEventSourceLedu = 0x1D, // Ledu module |
226 | kEplEventSourceLedu = 0x1D, // Ledu module | ||
227 | 219 | ||
228 | } tEplEventSource; | 220 | } tEplEventSource; |
229 | 221 | ||
230 | |||
231 | // structure of EPL event (element order must not be changed!) | 222 | // structure of EPL event (element order must not be changed!) |
232 | typedef struct | 223 | typedef struct { |
233 | { | 224 | tEplEventType m_EventType /*:28 */ ; // event type |
234 | tEplEventType m_EventType /*:28*/; // event type | 225 | tEplEventSink m_EventSink /*:4 */ ; // event sink |
235 | tEplEventSink m_EventSink /*:4*/; // event sink | 226 | tEplNetTime m_NetTime; // timestamp |
236 | tEplNetTime m_NetTime; // timestamp | 227 | unsigned int m_uiSize; // size of argument |
237 | unsigned int m_uiSize; // size of argument | 228 | void *m_pArg; // argument of event |
238 | void * m_pArg; // argument of event | ||
239 | 229 | ||
240 | } tEplEvent; | 230 | } tEplEvent; |
241 | 231 | ||
242 | |||
243 | // short structure of EPL event without argument and its size (element order must not be changed!) | 232 | // short structure of EPL event without argument and its size (element order must not be changed!) |
244 | typedef struct | 233 | typedef struct { |
245 | { | 234 | tEplEventType m_EventType /*:28 */ ; // event type |
246 | tEplEventType m_EventType /*:28*/; // event type | 235 | tEplEventSink m_EventSink /*:4 */ ; // event sink |
247 | tEplEventSink m_EventSink /*:4*/; // event sink | 236 | tEplNetTime m_NetTime; // timestamp |
248 | tEplNetTime m_NetTime; // timestamp | ||
249 | 237 | ||
250 | } tEplEventShort; | 238 | } tEplEventShort; |
251 | 239 | ||
252 | 240 | typedef struct { | |
253 | typedef struct | 241 | unsigned int m_uiIndex; |
254 | { | 242 | unsigned int m_uiSubIndex; |
255 | unsigned int m_uiIndex; | ||
256 | unsigned int m_uiSubIndex; | ||
257 | 243 | ||
258 | } tEplEventObdError; | 244 | } tEplEventObdError; |
259 | 245 | ||
260 | |||
261 | // structure for kEplEventTypeError | 246 | // structure for kEplEventTypeError |
262 | typedef struct | 247 | typedef struct { |
263 | { | 248 | tEplEventSource m_EventSource; // module which posted this error event |
264 | tEplEventSource m_EventSource; // module which posted this error event | 249 | tEplKernel m_EplError; // EPL error which occured |
265 | tEplKernel m_EplError; // EPL error which occured | 250 | union { |
266 | union | 251 | BYTE m_bArg; |
267 | { | 252 | DWORD m_dwArg; |
268 | BYTE m_bArg; | 253 | tEplEventSource m_EventSource; // from Eventk/u module (originating error source) |
269 | DWORD m_dwArg; | 254 | tEplEventObdError m_ObdError; // from Obd module |
270 | tEplEventSource m_EventSource; // from Eventk/u module (originating error source) | ||
271 | tEplEventObdError m_ObdError; // from Obd module | ||
272 | // tEplErrHistoryEntry m_HistoryEntry; // from Nmtk/u module | 255 | // tEplErrHistoryEntry m_HistoryEntry; // from Nmtk/u module |
273 | 256 | ||
274 | } m_Arg; | 257 | } m_Arg; |
275 | 258 | ||
276 | } tEplEventError; | 259 | } tEplEventError; |
277 | 260 | ||
278 | |||
279 | // structure for kEplEventTypeDllError | 261 | // structure for kEplEventTypeDllError |
280 | typedef struct | 262 | typedef struct { |
281 | { | 263 | unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_* |
282 | unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_* | 264 | unsigned int m_uiNodeId; |
283 | unsigned int m_uiNodeId; | 265 | tEplNmtState m_NmtState; |
284 | tEplNmtState m_NmtState; | ||
285 | 266 | ||
286 | } tEplErrorHandlerkEvent; | 267 | } tEplErrorHandlerkEvent; |
287 | 268 | ||
288 | |||
289 | // callback function to get informed about sync event | 269 | // callback function to get informed about sync event |
290 | typedef tEplKernel (PUBLIC* tEplSyncCb) (void); | 270 | typedef tEplKernel(PUBLIC * tEplSyncCb) (void); |
291 | 271 | ||
292 | // callback function for generic events | 272 | // callback function for generic events |
293 | typedef tEplKernel (PUBLIC* tEplProcessEventCb) (tEplEvent* pEplEvent_p); | 273 | typedef tEplKernel(PUBLIC * tEplProcessEventCb) (tEplEvent * pEplEvent_p); |
294 | 274 | ||
295 | //--------------------------------------------------------------------------- | 275 | //--------------------------------------------------------------------------- |
296 | // function prototypes | 276 | // function prototypes |
297 | //--------------------------------------------------------------------------- | 277 | //--------------------------------------------------------------------------- |
298 | 278 | ||
299 | 279 | #endif // #ifndef _EPL_EVENT_H_ | |
300 | |||
301 | #endif // #ifndef _EPL_EVENT_H_ | ||
302 | |||
303 | |||
diff --git a/drivers/staging/epl/EplFrame.h b/drivers/staging/epl/EplFrame.h index 1e5cb3d050fb..9a7f8b9f594e 100644 --- a/drivers/staging/epl/EplFrame.h +++ b/drivers/staging/epl/EplFrame.h | |||
@@ -66,30 +66,27 @@ | |||
66 | 66 | ||
67 | 2006/05/22 d.k.: start of the implementation, version 1.00 | 67 | 2006/05/22 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_FRAME_H_ | 71 | #ifndef _EPL_FRAME_H_ |
73 | #define _EPL_FRAME_H_ | 72 | #define _EPL_FRAME_H_ |
74 | 73 | ||
75 | |||
76 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
77 | // const defines | 75 | // const defines |
78 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
79 | 77 | ||
80 | |||
81 | // defines for EplFrame.m_wFlag | 78 | // defines for EplFrame.m_wFlag |
82 | #define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes) | 79 | #define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes) |
83 | #define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA) | 80 | #define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA) |
84 | #define EPL_FRAME_FLAG1_EA 0x04 // exception acknowledge (error signalling) (PReq, SoA) | 81 | #define EPL_FRAME_FLAG1_EA 0x04 // exception acknowledge (error signalling) (PReq, SoA) |
85 | #define EPL_FRAME_FLAG1_EC 0x08 // exception clear (error signalling) (StatusRes) | 82 | #define EPL_FRAME_FLAG1_EC 0x08 // exception clear (error signalling) (StatusRes) |
86 | #define EPL_FRAME_FLAG1_EN 0x10 // exception new (error signalling) (PRes, StatusRes) | 83 | #define EPL_FRAME_FLAG1_EN 0x10 // exception new (error signalling) (PRes, StatusRes) |
87 | #define EPL_FRAME_FLAG1_MS 0x20 // multiplexed slot (PReq) | 84 | #define EPL_FRAME_FLAG1_MS 0x20 // multiplexed slot (PReq) |
88 | #define EPL_FRAME_FLAG1_PS 0x40 // prescaled slot (SoC) | 85 | #define EPL_FRAME_FLAG1_PS 0x40 // prescaled slot (SoC) |
89 | #define EPL_FRAME_FLAG1_MC 0x80 // multiplexed cycle completed (SoC) | 86 | #define EPL_FRAME_FLAG1_MC 0x80 // multiplexed cycle completed (SoC) |
90 | #define EPL_FRAME_FLAG2_RS 0x07 // number of pending requests to send (PRes, StatusRes, IdentRes) | 87 | #define EPL_FRAME_FLAG2_RS 0x07 // number of pending requests to send (PRes, StatusRes, IdentRes) |
91 | #define EPL_FRAME_FLAG2_PR 0x38 // priority of requested asynch. frame (PRes, StatusRes, IdentRes) | 88 | #define EPL_FRAME_FLAG2_PR 0x38 // priority of requested asynch. frame (PRes, StatusRes, IdentRes) |
92 | #define EPL_FRAME_FLAG2_PR_SHIFT 3 // shift of priority of requested asynch. frame | 89 | #define EPL_FRAME_FLAG2_PR_SHIFT 3 // shift of priority of requested asynch. frame |
93 | 90 | ||
94 | // error history/status entry types | 91 | // error history/status entry types |
95 | #define EPL_ERR_ENTRYTYPE_STATUS 0x8000 | 92 | #define EPL_ERR_ENTRYTYPE_STATUS 0x8000 |
@@ -104,15 +101,13 @@ | |||
104 | #define EPL_ERR_ENTRYTYPE_PROF_MASK 0x0FFF | 101 | #define EPL_ERR_ENTRYTYPE_PROF_MASK 0x0FFF |
105 | 102 | ||
106 | // defines for EPL version / PDO version | 103 | // defines for EPL version / PDO version |
107 | #define EPL_VERSION_SUB 0x0F // sub version | 104 | #define EPL_VERSION_SUB 0x0F // sub version |
108 | #define EPL_VERSION_MAIN 0xF0 // main version | 105 | #define EPL_VERSION_MAIN 0xF0 // main version |
109 | |||
110 | 106 | ||
111 | //--------------------------------------------------------------------------- | 107 | //--------------------------------------------------------------------------- |
112 | // typedef | 108 | // typedef |
113 | //--------------------------------------------------------------------------- | 109 | //--------------------------------------------------------------------------- |
114 | 110 | ||
115 | |||
116 | // $$$ d.k.: move this definition to global.h | 111 | // $$$ d.k.: move this definition to global.h |
117 | // byte-align structures | 112 | // byte-align structures |
118 | #ifdef _MSC_VER | 113 | #ifdef _MSC_VER |
@@ -125,223 +120,205 @@ | |||
125 | # error you must byte-align these structures with the appropriate compiler directives | 120 | # error you must byte-align these structures with the appropriate compiler directives |
126 | #endif | 121 | #endif |
127 | 122 | ||
128 | 123 | typedef struct { | |
129 | typedef struct | 124 | // Offset 17 |
130 | { | 125 | BYTE m_le_bRes1; // reserved |
131 | // Offset 17 | 126 | // Offset 18 |
132 | BYTE m_le_bRes1; // reserved | 127 | BYTE m_le_bFlag1; // Flags: MC, PS |
133 | // Offset 18 | 128 | // Offset 19 |
134 | BYTE m_le_bFlag1; // Flags: MC, PS | 129 | BYTE m_le_bFlag2; // Flags: res |
135 | // Offset 19 | 130 | // Offset 20 |
136 | BYTE m_le_bFlag2; // Flags: res | 131 | tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set |
137 | // Offset 20 | 132 | // Offset 28 |
138 | tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set | 133 | QWORD m_le_RelativeTime; // in us (supported if D_NMT_RelativeTime_BOOL is set) |
139 | // Offset 28 | ||
140 | QWORD m_le_RelativeTime; // in us (supported if D_NMT_RelativeTime_BOOL is set) | ||
141 | 134 | ||
142 | } PACK_STRUCT tEplSocFrame; | 135 | } PACK_STRUCT tEplSocFrame; |
143 | 136 | ||
144 | typedef struct | 137 | typedef struct { |
145 | { | 138 | // Offset 17 |
146 | // Offset 17 | 139 | BYTE m_le_bRes1; // reserved |
147 | BYTE m_le_bRes1; // reserved | 140 | // Offset 18 |
148 | // Offset 18 | 141 | BYTE m_le_bFlag1; // Flags: MS, EA, RD |
149 | BYTE m_le_bFlag1; // Flags: MS, EA, RD | 142 | // Offset 19 |
150 | // Offset 19 | 143 | BYTE m_le_bFlag2; // Flags: res |
151 | BYTE m_le_bFlag2; // Flags: res | 144 | // Offset 20 |
152 | // Offset 20 | 145 | BYTE m_le_bPdoVersion; |
153 | BYTE m_le_bPdoVersion; | 146 | // Offset 21 |
154 | // Offset 21 | 147 | BYTE m_le_bRes2; // reserved |
155 | BYTE m_le_bRes2; // reserved | 148 | // Offset 22 |
156 | // Offset 22 | 149 | WORD m_le_wSize; |
157 | WORD m_le_wSize; | 150 | // Offset 24 |
158 | // Offset 24 | 151 | BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ]; |
159 | BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16*/]; | ||
160 | 152 | ||
161 | } PACK_STRUCT tEplPreqFrame; | 153 | } PACK_STRUCT tEplPreqFrame; |
162 | 154 | ||
163 | typedef struct | 155 | typedef struct { |
164 | { | 156 | // Offset 17 |
165 | // Offset 17 | 157 | BYTE m_le_bNmtStatus; // NMT state |
166 | BYTE m_le_bNmtStatus; // NMT state | 158 | // Offset 18 |
167 | // Offset 18 | 159 | BYTE m_le_bFlag1; // Flags: MS, EN, RD |
168 | BYTE m_le_bFlag1; // Flags: MS, EN, RD | 160 | // Offset 19 |
169 | // Offset 19 | 161 | BYTE m_le_bFlag2; // Flags: PR, RS |
170 | BYTE m_le_bFlag2; // Flags: PR, RS | 162 | // Offset 20 |
171 | // Offset 20 | 163 | BYTE m_le_bPdoVersion; |
172 | BYTE m_le_bPdoVersion; | 164 | // Offset 21 |
173 | // Offset 21 | 165 | BYTE m_le_bRes2; // reserved |
174 | BYTE m_le_bRes2; // reserved | 166 | // Offset 22 |
175 | // Offset 22 | 167 | WORD m_le_wSize; |
176 | WORD m_le_wSize; | 168 | // Offset 24 |
177 | // Offset 24 | 169 | BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 |
178 | BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 | 170 | / D_NMT_IsochrTxMaxPayload_U16 */ ]; |
179 | / D_NMT_IsochrTxMaxPayload_U16*/]; | ||
180 | 171 | ||
181 | } PACK_STRUCT tEplPresFrame; | 172 | } PACK_STRUCT tEplPresFrame; |
182 | 173 | ||
183 | typedef struct | 174 | typedef struct { |
184 | { | 175 | // Offset 17 |
185 | // Offset 17 | 176 | BYTE m_le_bNmtStatus; // NMT state |
186 | BYTE m_le_bNmtStatus; // NMT state | 177 | // Offset 18 |
187 | // Offset 18 | 178 | BYTE m_le_bFlag1; // Flags: EA, ER |
188 | BYTE m_le_bFlag1; // Flags: EA, ER | 179 | // Offset 19 |
189 | // Offset 19 | 180 | BYTE m_le_bFlag2; // Flags: res |
190 | BYTE m_le_bFlag2; // Flags: res | 181 | // Offset 20 |
191 | // Offset 20 | 182 | BYTE m_le_bReqServiceId; |
192 | BYTE m_le_bReqServiceId; | 183 | // Offset 21 |
193 | // Offset 21 | 184 | BYTE m_le_bReqServiceTarget; |
194 | BYTE m_le_bReqServiceTarget; | 185 | // Offset 22 |
195 | // Offset 22 | 186 | BYTE m_le_bEplVersion; |
196 | BYTE m_le_bEplVersion; | ||
197 | 187 | ||
198 | } PACK_STRUCT tEplSoaFrame; | 188 | } PACK_STRUCT tEplSoaFrame; |
199 | 189 | ||
200 | typedef struct | 190 | typedef struct { |
201 | { | 191 | WORD m_wEntryType; |
202 | WORD m_wEntryType; | 192 | WORD m_wErrorCode; |
203 | WORD m_wErrorCode; | 193 | tEplNetTime m_TimeStamp; |
204 | tEplNetTime m_TimeStamp; | 194 | BYTE m_abAddInfo[8]; |
205 | BYTE m_abAddInfo[8]; | ||
206 | 195 | ||
207 | } PACK_STRUCT tEplErrHistoryEntry; | 196 | } PACK_STRUCT tEplErrHistoryEntry; |
208 | 197 | ||
209 | typedef struct | 198 | typedef struct { |
210 | { | 199 | // Offset 18 |
211 | // Offset 18 | 200 | BYTE m_le_bFlag1; // Flags: EN, EC |
212 | BYTE m_le_bFlag1; // Flags: EN, EC | 201 | BYTE m_le_bFlag2; // Flags: PR, RS |
213 | BYTE m_le_bFlag2; // Flags: PR, RS | 202 | BYTE m_le_bNmtStatus; // NMT state |
214 | BYTE m_le_bNmtStatus; // NMT state | 203 | BYTE m_le_bRes1[3]; |
215 | BYTE m_le_bRes1[3]; | 204 | QWORD m_le_qwStaticError; // static error bit field |
216 | QWORD m_le_qwStaticError; // static error bit field | 205 | tEplErrHistoryEntry m_le_aErrHistoryEntry[14]; |
217 | tEplErrHistoryEntry m_le_aErrHistoryEntry[14]; | ||
218 | 206 | ||
219 | } PACK_STRUCT tEplStatusResponse; | 207 | } PACK_STRUCT tEplStatusResponse; |
220 | 208 | ||
221 | typedef struct | 209 | typedef struct { |
222 | { | 210 | // Offset 18 |
223 | // Offset 18 | 211 | BYTE m_le_bFlag1; // Flags: res |
224 | BYTE m_le_bFlag1; // Flags: res | 212 | BYTE m_le_bFlag2; // Flags: PR, RS |
225 | BYTE m_le_bFlag2; // Flags: PR, RS | 213 | BYTE m_le_bNmtStatus; // NMT state |
226 | BYTE m_le_bNmtStatus; // NMT state | 214 | BYTE m_le_bIdentRespFlags; // Flags: FW |
227 | BYTE m_le_bIdentRespFlags; // Flags: FW | 215 | BYTE m_le_bEplProfileVersion; |
228 | BYTE m_le_bEplProfileVersion; | 216 | BYTE m_le_bRes1; |
229 | BYTE m_le_bRes1; | 217 | DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32 |
230 | DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32 | 218 | WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU |
231 | WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU | 219 | WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16 |
232 | WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16 | 220 | WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16 |
233 | WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16 | 221 | DWORD m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32 |
234 | DWORD m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32 | 222 | WORD m_le_wRes2; |
235 | WORD m_le_wRes2; | 223 | DWORD m_le_dwDeviceType; // NMT_DeviceType_U32 |
236 | DWORD m_le_dwDeviceType; // NMT_DeviceType_U32 | 224 | DWORD m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 |
237 | DWORD m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 | 225 | DWORD m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 |
238 | DWORD m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32 | 226 | DWORD m_le_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 |
239 | DWORD m_le_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32 | 227 | DWORD m_le_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 |
240 | DWORD m_le_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32 | 228 | QWORD m_le_qwVendorSpecificExt1; |
241 | QWORD m_le_qwVendorSpecificExt1; | 229 | DWORD m_le_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 |
242 | DWORD m_le_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32 | 230 | DWORD m_le_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 |
243 | DWORD m_le_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32 | 231 | DWORD m_le_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device |
244 | DWORD m_le_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device | 232 | DWORD m_le_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device |
245 | DWORD m_le_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device | 233 | DWORD m_le_dwIpAddress; |
246 | DWORD m_le_dwIpAddress; | 234 | DWORD m_le_dwSubnetMask; |
247 | DWORD m_le_dwSubnetMask; | 235 | DWORD m_le_dwDefaultGateway; |
248 | DWORD m_le_dwDefaultGateway; | 236 | BYTE m_le_sHostname[32]; |
249 | BYTE m_le_sHostname[32]; | 237 | BYTE m_le_abVendorSpecificExt2[48]; |
250 | BYTE m_le_abVendorSpecificExt2[48]; | ||
251 | 238 | ||
252 | } PACK_STRUCT tEplIdentResponse; | 239 | } PACK_STRUCT tEplIdentResponse; |
253 | 240 | ||
254 | typedef struct | 241 | typedef struct { |
255 | { | 242 | // Offset 18 |
256 | // Offset 18 | 243 | BYTE m_le_bNmtCommandId; |
257 | BYTE m_le_bNmtCommandId; | 244 | BYTE m_le_bRes1; |
258 | BYTE m_le_bRes1; | 245 | BYTE m_le_abNmtCommandData[32]; |
259 | BYTE m_le_abNmtCommandData[32]; | ||
260 | 246 | ||
261 | } PACK_STRUCT tEplNmtCommandService; | 247 | } PACK_STRUCT tEplNmtCommandService; |
262 | 248 | ||
263 | typedef struct | 249 | typedef struct { |
264 | { | 250 | BYTE m_le_bReserved; |
265 | BYTE m_le_bReserved; | 251 | BYTE m_le_bTransactionId; |
266 | BYTE m_le_bTransactionId; | 252 | BYTE m_le_bFlags; |
267 | BYTE m_le_bFlags; | 253 | BYTE m_le_bCommandId; |
268 | BYTE m_le_bCommandId; | 254 | WORD m_le_wSegmentSize; |
269 | WORD m_le_wSegmentSize; | 255 | WORD m_le_wReserved; |
270 | WORD m_le_wReserved; | 256 | BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder |
271 | BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder | ||
272 | |||
273 | }PACK_STRUCT tEplAsySdoCom; | ||
274 | 257 | ||
258 | } PACK_STRUCT tEplAsySdoCom; | ||
275 | 259 | ||
276 | // asynchronous SDO Sequence Header | 260 | // asynchronous SDO Sequence Header |
277 | typedef struct | 261 | typedef struct { |
278 | { | 262 | BYTE m_le_bRecSeqNumCon; |
279 | BYTE m_le_bRecSeqNumCon; | 263 | BYTE m_le_bSendSeqNumCon; |
280 | BYTE m_le_bSendSeqNumCon; | 264 | BYTE m_le_abReserved[2]; |
281 | BYTE m_le_abReserved[2]; | 265 | tEplAsySdoCom m_le_abSdoSeqPayload; |
282 | tEplAsySdoCom m_le_abSdoSeqPayload; | ||
283 | 266 | ||
284 | } PACK_STRUCT tEplAsySdoSeq; | 267 | } PACK_STRUCT tEplAsySdoSeq; |
285 | 268 | ||
286 | typedef struct | 269 | typedef struct { |
287 | { | 270 | // Offset 18 |
288 | // Offset 18 | 271 | BYTE m_le_bNmtCommandId; |
289 | BYTE m_le_bNmtCommandId; | 272 | BYTE m_le_bTargetNodeId; |
290 | BYTE m_le_bTargetNodeId; | 273 | BYTE m_le_abNmtCommandData[32]; |
291 | BYTE m_le_abNmtCommandData[32]; | ||
292 | 274 | ||
293 | } PACK_STRUCT tEplNmtRequestService; | 275 | } PACK_STRUCT tEplNmtRequestService; |
294 | 276 | ||
295 | 277 | typedef union { | |
296 | typedef union | 278 | // Offset 18 |
297 | { | 279 | tEplStatusResponse m_StatusResponse; |
298 | // Offset 18 | 280 | tEplIdentResponse m_IdentResponse; |
299 | tEplStatusResponse m_StatusResponse; | 281 | tEplNmtCommandService m_NmtCommandService; |
300 | tEplIdentResponse m_IdentResponse; | 282 | tEplNmtRequestService m_NmtRequestService; |
301 | tEplNmtCommandService m_NmtCommandService; | 283 | tEplAsySdoSeq m_SdoSequenceFrame; |
302 | tEplNmtRequestService m_NmtRequestService; | 284 | BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16 |
303 | tEplAsySdoSeq m_SdoSequenceFrame; | 285 | / D_NMT_ASndRxMaxPayload_U16 */ ]; |
304 | BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16 | ||
305 | / D_NMT_ASndRxMaxPayload_U16*/]; | ||
306 | 286 | ||
307 | } tEplAsndPayload; | 287 | } tEplAsndPayload; |
308 | 288 | ||
309 | typedef struct | 289 | typedef struct { |
310 | { | 290 | // Offset 17 |
311 | // Offset 17 | 291 | BYTE m_le_bServiceId; |
312 | BYTE m_le_bServiceId; | 292 | // Offset 18 |
313 | // Offset 18 | 293 | tEplAsndPayload m_Payload; |
314 | tEplAsndPayload m_Payload; | ||
315 | 294 | ||
316 | } PACK_STRUCT tEplAsndFrame; | 295 | } PACK_STRUCT tEplAsndFrame; |
317 | 296 | ||
318 | typedef union | 297 | typedef union { |
319 | { | 298 | // Offset 17 |
320 | // Offset 17 | 299 | tEplSocFrame m_Soc; |
321 | tEplSocFrame m_Soc; | 300 | tEplPreqFrame m_Preq; |
322 | tEplPreqFrame m_Preq; | 301 | tEplPresFrame m_Pres; |
323 | tEplPresFrame m_Pres; | 302 | tEplSoaFrame m_Soa; |
324 | tEplSoaFrame m_Soa; | 303 | tEplAsndFrame m_Asnd; |
325 | tEplAsndFrame m_Asnd; | ||
326 | 304 | ||
327 | } tEplFrameData; | 305 | } tEplFrameData; |
328 | 306 | ||
329 | typedef struct | 307 | typedef struct { |
330 | { | 308 | // Offset 0 |
331 | // Offset 0 | 309 | BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes |
332 | BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes | 310 | // Offset 6 |
333 | // Offset 6 | 311 | BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node |
334 | BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node | 312 | // Offset 12 |
335 | // Offset 12 | 313 | WORD m_be_wEtherType; // Ethernet message type (big endian) |
336 | WORD m_be_wEtherType; // Ethernet message type (big endian) | 314 | // Offset 14 |
337 | // Offset 14 | 315 | BYTE m_le_bMessageType; // EPL message type |
338 | BYTE m_le_bMessageType; // EPL message type | 316 | // Offset 15 |
339 | // Offset 15 | 317 | BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes |
340 | BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes | 318 | // Offset 16 |
341 | // Offset 16 | 319 | BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node |
342 | BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node | 320 | // Offset 17 |
343 | // Offset 17 | 321 | tEplFrameData m_Data; |
344 | tEplFrameData m_Data; | ||
345 | 322 | ||
346 | } PACK_STRUCT tEplFrame; | 323 | } PACK_STRUCT tEplFrame; |
347 | 324 | ||
@@ -350,25 +327,18 @@ typedef struct | |||
350 | # pragma pack( pop, packing ) | 327 | # pragma pack( pop, packing ) |
351 | #endif | 328 | #endif |
352 | 329 | ||
353 | 330 | typedef enum { | |
354 | typedef enum | 331 | kEplMsgTypeNonEpl = 0x00, |
355 | { | 332 | kEplMsgTypeSoc = 0x01, |
356 | kEplMsgTypeNonEpl = 0x00, | 333 | kEplMsgTypePreq = 0x03, |
357 | kEplMsgTypeSoc = 0x01, | 334 | kEplMsgTypePres = 0x04, |
358 | kEplMsgTypePreq = 0x03, | 335 | kEplMsgTypeSoa = 0x05, |
359 | kEplMsgTypePres = 0x04, | 336 | kEplMsgTypeAsnd = 0x06, |
360 | kEplMsgTypeSoa = 0x05, | ||
361 | kEplMsgTypeAsnd = 0x06, | ||
362 | 337 | ||
363 | } tEplMsgType; | 338 | } tEplMsgType; |
364 | 339 | ||
365 | |||
366 | |||
367 | //--------------------------------------------------------------------------- | 340 | //--------------------------------------------------------------------------- |
368 | // function prototypes | 341 | // function prototypes |
369 | //--------------------------------------------------------------------------- | 342 | //--------------------------------------------------------------------------- |
370 | 343 | ||
371 | 344 | #endif // #ifndef _EPL_FRAME_H_ | |
372 | #endif // #ifndef _EPL_FRAME_H_ | ||
373 | |||
374 | |||
diff --git a/drivers/staging/epl/EplInc.h b/drivers/staging/epl/EplInc.h index cfe90e962096..77f93d144166 100644 --- a/drivers/staging/epl/EplInc.h +++ b/drivers/staging/epl/EplInc.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/05/22 d.k.: start of the implementation, version 1.00 | 67 | 2006/05/22 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_INC_H_ | 71 | #ifndef _EPL_INC_H_ |
@@ -77,28 +76,28 @@ | |||
77 | // ============================================================================ | 76 | // ============================================================================ |
78 | #if defined(WIN32) || defined(_WIN32) | 77 | #if defined(WIN32) || defined(_WIN32) |
79 | 78 | ||
80 | #ifdef UNDER_RTSS | 79 | #ifdef UNDER_RTSS |
81 | // RTX header | 80 | // RTX header |
82 | #include <windows.h> | 81 | #include <windows.h> |
83 | #include <process.h> | 82 | #include <process.h> |
84 | #include <rtapi.h> | 83 | #include <rtapi.h> |
85 | 84 | ||
86 | #elif __BORLANDC__ | 85 | #elif __BORLANDC__ |
87 | // borland C header | 86 | // borland C header |
88 | #include <windows.h> | 87 | #include <windows.h> |
89 | #include <process.h> | 88 | #include <process.h> |
90 | 89 | ||
91 | #elif WINCE | 90 | #elif WINCE |
92 | #include <windows.h> | 91 | #include <windows.h> |
93 | 92 | ||
94 | #else | 93 | #else |
95 | // MSVC needs to include windows.h at first | 94 | // MSVC needs to include windows.h at first |
96 | // the following defines ar necessary for function prototypes for waitable timers | 95 | // the following defines ar necessary for function prototypes for waitable timers |
97 | #define _WIN32_WINDOWS 0x0401 | 96 | #define _WIN32_WINDOWS 0x0401 |
98 | #define _WIN32_WINNT 0x0400 | 97 | #define _WIN32_WINNT 0x0400 |
99 | #include <windows.h> | 98 | #include <windows.h> |
100 | #include <process.h> | 99 | #include <process.h> |
101 | #endif | 100 | #endif |
102 | 101 | ||
103 | #endif | 102 | #endif |
104 | 103 | ||
@@ -106,49 +105,47 @@ | |||
106 | // possible other include file needed | 105 | // possible other include file needed |
107 | // These constants defines modules which can be included in the Epl application. | 106 | // These constants defines modules which can be included in the Epl application. |
108 | // Use this constants for define EPL_MODULE_INTEGRATION in file EplCfg.h. | 107 | // Use this constants for define EPL_MODULE_INTEGRATION in file EplCfg.h. |
109 | #define EPL_MODULE_OBDK 0x00000001L // OBD kernel part module | 108 | #define EPL_MODULE_OBDK 0x00000001L // OBD kernel part module |
110 | #define EPL_MODULE_PDOK 0x00000002L // PDO kernel part module | 109 | #define EPL_MODULE_PDOK 0x00000002L // PDO kernel part module |
111 | #define EPL_MODULE_NMT_MN 0x00000004L // NMT MN module | 110 | #define EPL_MODULE_NMT_MN 0x00000004L // NMT MN module |
112 | #define EPL_MODULE_SDOS 0x00000008L // SDO Server module | 111 | #define EPL_MODULE_SDOS 0x00000008L // SDO Server module |
113 | #define EPL_MODULE_SDOC 0x00000010L // SDO Client module | 112 | #define EPL_MODULE_SDOC 0x00000010L // SDO Client module |
114 | #define EPL_MODULE_SDO_ASND 0x00000020L // SDO over Asnd module | 113 | #define EPL_MODULE_SDO_ASND 0x00000020L // SDO over Asnd module |
115 | #define EPL_MODULE_SDO_UDP 0x00000040L // SDO over UDP module | 114 | #define EPL_MODULE_SDO_UDP 0x00000040L // SDO over UDP module |
116 | #define EPL_MODULE_SDO_PDO 0x00000080L // SDO in PDO module | 115 | #define EPL_MODULE_SDO_PDO 0x00000080L // SDO in PDO module |
117 | #define EPL_MODULE_NMT_CN 0x00000100L // NMT CN module | 116 | #define EPL_MODULE_NMT_CN 0x00000100L // NMT CN module |
118 | #define EPL_MODULE_NMTU 0x00000200L // NMT user part module | 117 | #define EPL_MODULE_NMTU 0x00000200L // NMT user part module |
119 | #define EPL_MODULE_NMTK 0x00000400L // NMT kernel part module | 118 | #define EPL_MODULE_NMTK 0x00000400L // NMT kernel part module |
120 | #define EPL_MODULE_DLLK 0x00000800L // DLL kernel part module | 119 | #define EPL_MODULE_DLLK 0x00000800L // DLL kernel part module |
121 | #define EPL_MODULE_DLLU 0x00001000L // DLL user part module | 120 | #define EPL_MODULE_DLLU 0x00001000L // DLL user part module |
122 | #define EPL_MODULE_OBDU 0x00002000L // OBD user part module | 121 | #define EPL_MODULE_OBDU 0x00002000L // OBD user part module |
123 | #define EPL_MODULE_CFGMA 0x00004000L // Configuartioan Manager module | 122 | #define EPL_MODULE_CFGMA 0x00004000L // Configuartioan Manager module |
124 | #define EPL_MODULE_VETH 0x00008000L // virtual ethernet driver module | 123 | #define EPL_MODULE_VETH 0x00008000L // virtual ethernet driver module |
125 | #define EPL_MODULE_PDOU 0x00010000L // PDO user part module | 124 | #define EPL_MODULE_PDOU 0x00010000L // PDO user part module |
126 | #define EPL_MODULE_LEDU 0x00020000L // LED user part module | 125 | #define EPL_MODULE_LEDU 0x00020000L // LED user part module |
127 | 126 | ||
128 | #include "EplCfg.h" // EPL configuration file (configuration from application) | 127 | #include "EplCfg.h" // EPL configuration file (configuration from application) |
129 | 128 | ||
130 | #include "global.h" // global definitions | 129 | #include "global.h" // global definitions |
131 | 130 | ||
132 | #include "EplDef.h" // EPL configuration file (default configuration) | 131 | #include "EplDef.h" // EPL configuration file (default configuration) |
133 | #include "EplInstDef.h" // defines macros for instance types and table | 132 | #include "EplInstDef.h" // defines macros for instance types and table |
134 | #include "Debug.h" // debug definitions | 133 | #include "Debug.h" // debug definitions |
135 | 134 | ||
136 | #include "EplErrDef.h" // EPL error codes for API funtions | 135 | #include "EplErrDef.h" // EPL error codes for API funtions |
137 | 136 | ||
138 | //--------------------------------------------------------------------------- | 137 | //--------------------------------------------------------------------------- |
139 | // typedef | 138 | // typedef |
140 | //--------------------------------------------------------------------------- | 139 | //--------------------------------------------------------------------------- |
141 | 140 | ||
142 | // IEEE 1588 conformant net time structure | 141 | // IEEE 1588 conformant net time structure |
143 | typedef struct | 142 | typedef struct { |
144 | { | 143 | DWORD m_dwSec; |
145 | DWORD m_dwSec; | 144 | DWORD m_dwNanoSec; |
146 | DWORD m_dwNanoSec; | ||
147 | 145 | ||
148 | } tEplNetTime; | 146 | } tEplNetTime; |
149 | 147 | ||
150 | 148 | #include "EplTarget.h" // target specific functions and definitions | |
151 | #include "EplTarget.h" // target specific functions and definitions | ||
152 | 149 | ||
153 | #include "EplAmi.h" | 150 | #include "EplAmi.h" |
154 | 151 | ||
@@ -156,7 +153,7 @@ typedef struct | |||
156 | // macros | 153 | // macros |
157 | // ------------------------------------------------------------------------- | 154 | // ------------------------------------------------------------------------- |
158 | 155 | ||
159 | #define EPL_SPEC_VERSION 0x20 // ETHERNET Powerlink V. 2.0 | 156 | #define EPL_SPEC_VERSION 0x20 // ETHERNET Powerlink V. 2.0 |
160 | #define EPL_STACK_VERSION(ver,rev,rel) ((((DWORD)(ver)) & 0xFF)|((((DWORD)(rev))&0xFF)<<8)|(((DWORD)(rel))<<16)) | 157 | #define EPL_STACK_VERSION(ver,rev,rel) ((((DWORD)(ver)) & 0xFF)|((((DWORD)(rev))&0xFF)<<8)|(((DWORD)(rel))<<16)) |
161 | #define EPL_OBJ1018_VERSION(ver,rev,rel) ((((DWORD)(ver))<<16) |(((DWORD)(rev))&0xFFFF)) | 158 | #define EPL_OBJ1018_VERSION(ver,rev,rel) ((((DWORD)(ver))<<16) |(((DWORD)(rev))&0xFFFF)) |
162 | #define EPL_STRING_VERSION(ver,rev,rel) "V" #ver "." #rev " r" #rel | 159 | #define EPL_STRING_VERSION(ver,rev,rel) "V" #ver "." #rev " r" #rel |
@@ -179,54 +176,53 @@ typedef struct | |||
179 | #define EPL_FEATURE_RT1 0x00001000 | 176 | #define EPL_FEATURE_RT1 0x00001000 |
180 | #define EPL_FEATURE_RT2 0x00002000 | 177 | #define EPL_FEATURE_RT2 0x00002000 |
181 | 178 | ||
182 | |||
183 | // generate EPL NMT_FeatureFlags_U32 | 179 | // generate EPL NMT_FeatureFlags_U32 |
184 | #ifndef EPL_DEF_FEATURE_ISOCHR | 180 | #ifndef EPL_DEF_FEATURE_ISOCHR |
185 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0) | 181 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0) |
186 | #define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR) | 182 | #define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR) |
187 | #else | 183 | #else |
188 | #define EPL_DEF_FEATURE_ISOCHR 0 | 184 | #define EPL_DEF_FEATURE_ISOCHR 0 |
189 | #endif | 185 | #endif |
190 | #endif | 186 | #endif |
191 | 187 | ||
192 | #ifndef EPL_DEF_FEATURE_SDO_ASND | 188 | #ifndef EPL_DEF_FEATURE_SDO_ASND |
193 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0) | 189 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0) |
194 | #define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND) | 190 | #define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND) |
195 | #else | 191 | #else |
196 | #define EPL_DEF_FEATURE_SDO_ASND 0 | 192 | #define EPL_DEF_FEATURE_SDO_ASND 0 |
197 | #endif | 193 | #endif |
198 | #endif | 194 | #endif |
199 | 195 | ||
200 | #ifndef EPL_DEF_FEATURE_SDO_UDP | 196 | #ifndef EPL_DEF_FEATURE_SDO_UDP |
201 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0) | 197 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0) |
202 | #define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP) | 198 | #define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP) |
203 | #else | 199 | #else |
204 | #define EPL_DEF_FEATURE_SDO_UDP 0 | 200 | #define EPL_DEF_FEATURE_SDO_UDP 0 |
205 | #endif | 201 | #endif |
206 | #endif | 202 | #endif |
207 | 203 | ||
208 | #ifndef EPL_DEF_FEATURE_SDO_PDO | 204 | #ifndef EPL_DEF_FEATURE_SDO_PDO |
209 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0) | 205 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0) |
210 | #define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO) | 206 | #define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO) |
211 | #else | 207 | #else |
212 | #define EPL_DEF_FEATURE_SDO_PDO 0 | 208 | #define EPL_DEF_FEATURE_SDO_PDO 0 |
213 | #endif | 209 | #endif |
214 | #endif | 210 | #endif |
215 | 211 | ||
216 | #ifndef EPL_DEF_FEATURE_PDO_DYN | 212 | #ifndef EPL_DEF_FEATURE_PDO_DYN |
217 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0) | 213 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0) |
218 | #define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN) | 214 | #define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN) |
219 | #else | 215 | #else |
220 | #define EPL_DEF_FEATURE_PDO_DYN 0 | 216 | #define EPL_DEF_FEATURE_PDO_DYN 0 |
221 | #endif | 217 | #endif |
222 | #endif | 218 | #endif |
223 | 219 | ||
224 | #ifndef EPL_DEF_FEATURE_CFGMA | 220 | #ifndef EPL_DEF_FEATURE_CFGMA |
225 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0) | 221 | #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0) |
226 | #define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA) | 222 | #define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA) |
227 | #else | 223 | #else |
228 | #define EPL_DEF_FEATURE_CFGMA 0 | 224 | #define EPL_DEF_FEATURE_CFGMA 0 |
229 | #endif | 225 | #endif |
230 | #endif | 226 | #endif |
231 | 227 | ||
232 | #define EPL_DEF_FEATURE_FLAGS (EPL_DEF_FEATURE_ISOCHR \ | 228 | #define EPL_DEF_FEATURE_FLAGS (EPL_DEF_FEATURE_ISOCHR \ |
@@ -236,12 +232,10 @@ typedef struct | |||
236 | | EPL_DEF_FEATURE_PDO_DYN \ | 232 | | EPL_DEF_FEATURE_PDO_DYN \ |
237 | | EPL_DEF_FEATURE_CFGMA) | 233 | | EPL_DEF_FEATURE_CFGMA) |
238 | 234 | ||
239 | |||
240 | #ifndef tabentries | 235 | #ifndef tabentries |
241 | #define tabentries(a) (sizeof(a)/sizeof(*(a))) | 236 | #define tabentries(a) (sizeof(a)/sizeof(*(a))) |
242 | #endif | 237 | #endif |
243 | 238 | ||
244 | |||
245 | //--------------------------------------------------------------------------- | 239 | //--------------------------------------------------------------------------- |
246 | // const defines | 240 | // const defines |
247 | //--------------------------------------------------------------------------- | 241 | //--------------------------------------------------------------------------- |
@@ -249,15 +243,14 @@ typedef struct | |||
249 | // definitions for DLL export | 243 | // definitions for DLL export |
250 | #if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB) | 244 | #if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB) |
251 | 245 | ||
252 | #define EPLDLLEXPORT __declspec (dllexport) | 246 | #define EPLDLLEXPORT __declspec (dllexport) |
253 | 247 | ||
254 | #else | 248 | #else |
255 | 249 | ||
256 | #define EPLDLLEXPORT | 250 | #define EPLDLLEXPORT |
257 | 251 | ||
258 | #endif | 252 | #endif |
259 | 253 | ||
260 | |||
261 | // ============================================================================ | 254 | // ============================================================================ |
262 | // common debug macros | 255 | // common debug macros |
263 | // ============================================================================ | 256 | // ============================================================================ |
@@ -273,49 +266,49 @@ typedef struct | |||
273 | // default level is defined in copdef.h | 266 | // default level is defined in copdef.h |
274 | 267 | ||
275 | // debug-level and TRACE-macros // standard-level // flags for DEF_DEBUG_LVL | 268 | // debug-level and TRACE-macros // standard-level // flags for DEF_DEBUG_LVL |
276 | #define EPL_DBGLVL_EDRV DEBUG_LVL_01 // 0x00000001L | 269 | #define EPL_DBGLVL_EDRV DEBUG_LVL_01 // 0x00000001L |
277 | #define EPL_DBGLVL_EDRV_TRACE0 DEBUG_LVL_01_TRACE0 | 270 | #define EPL_DBGLVL_EDRV_TRACE0 DEBUG_LVL_01_TRACE0 |
278 | #define EPL_DBGLVL_EDRV_TRACE1 DEBUG_LVL_01_TRACE1 | 271 | #define EPL_DBGLVL_EDRV_TRACE1 DEBUG_LVL_01_TRACE1 |
279 | #define EPL_DBGLVL_EDRV_TRACE2 DEBUG_LVL_01_TRACE2 | 272 | #define EPL_DBGLVL_EDRV_TRACE2 DEBUG_LVL_01_TRACE2 |
280 | #define EPL_DBGLVL_EDRV_TRACE3 DEBUG_LVL_01_TRACE3 | 273 | #define EPL_DBGLVL_EDRV_TRACE3 DEBUG_LVL_01_TRACE3 |
281 | #define EPL_DBGLVL_EDRV_TRACE4 DEBUG_LVL_01_TRACE4 | 274 | #define EPL_DBGLVL_EDRV_TRACE4 DEBUG_LVL_01_TRACE4 |
282 | 275 | ||
283 | #define EPL_DBGLVL_DLL DEBUG_LVL_02 // 0x00000002L | 276 | #define EPL_DBGLVL_DLL DEBUG_LVL_02 // 0x00000002L |
284 | #define EPL_DBGLVL_DLL_TRACE0 DEBUG_LVL_02_TRACE0 | 277 | #define EPL_DBGLVL_DLL_TRACE0 DEBUG_LVL_02_TRACE0 |
285 | #define EPL_DBGLVL_DLL_TRACE1 DEBUG_LVL_02_TRACE1 | 278 | #define EPL_DBGLVL_DLL_TRACE1 DEBUG_LVL_02_TRACE1 |
286 | #define EPL_DBGLVL_DLL_TRACE2 DEBUG_LVL_02_TRACE2 | 279 | #define EPL_DBGLVL_DLL_TRACE2 DEBUG_LVL_02_TRACE2 |
287 | #define EPL_DBGLVL_DLL_TRACE3 DEBUG_LVL_02_TRACE3 | 280 | #define EPL_DBGLVL_DLL_TRACE3 DEBUG_LVL_02_TRACE3 |
288 | #define EPL_DBGLVL_DLL_TRACE4 DEBUG_LVL_02_TRACE4 | 281 | #define EPL_DBGLVL_DLL_TRACE4 DEBUG_LVL_02_TRACE4 |
289 | 282 | ||
290 | #define EPL_DBGLVL_OBD DEBUG_LVL_03 // 0x00000004L | 283 | #define EPL_DBGLVL_OBD DEBUG_LVL_03 // 0x00000004L |
291 | #define EPL_DBGLVL_OBD_TRACE0 DEBUG_LVL_03_TRACE0 | 284 | #define EPL_DBGLVL_OBD_TRACE0 DEBUG_LVL_03_TRACE0 |
292 | #define EPL_DBGLVL_OBD_TRACE1 DEBUG_LVL_03_TRACE1 | 285 | #define EPL_DBGLVL_OBD_TRACE1 DEBUG_LVL_03_TRACE1 |
293 | #define EPL_DBGLVL_OBD_TRACE2 DEBUG_LVL_03_TRACE2 | 286 | #define EPL_DBGLVL_OBD_TRACE2 DEBUG_LVL_03_TRACE2 |
294 | #define EPL_DBGLVL_OBD_TRACE3 DEBUG_LVL_03_TRACE3 | 287 | #define EPL_DBGLVL_OBD_TRACE3 DEBUG_LVL_03_TRACE3 |
295 | #define EPL_DBGLVL_OBD_TRACE4 DEBUG_LVL_03_TRACE4 | 288 | #define EPL_DBGLVL_OBD_TRACE4 DEBUG_LVL_03_TRACE4 |
296 | 289 | ||
297 | #define EPL_DBGLVL_NMTK DEBUG_LVL_04 // 0x00000008L | 290 | #define EPL_DBGLVL_NMTK DEBUG_LVL_04 // 0x00000008L |
298 | #define EPL_DBGLVL_NMTK_TRACE0 DEBUG_LVL_04_TRACE0 | 291 | #define EPL_DBGLVL_NMTK_TRACE0 DEBUG_LVL_04_TRACE0 |
299 | #define EPL_DBGLVL_NMTK_TRACE1 DEBUG_LVL_04_TRACE1 | 292 | #define EPL_DBGLVL_NMTK_TRACE1 DEBUG_LVL_04_TRACE1 |
300 | #define EPL_DBGLVL_NMTK_TRACE2 DEBUG_LVL_04_TRACE2 | 293 | #define EPL_DBGLVL_NMTK_TRACE2 DEBUG_LVL_04_TRACE2 |
301 | #define EPL_DBGLVL_NMTK_TRACE3 DEBUG_LVL_04_TRACE3 | 294 | #define EPL_DBGLVL_NMTK_TRACE3 DEBUG_LVL_04_TRACE3 |
302 | #define EPL_DBGLVL_NMTK_TRACE4 DEBUG_LVL_04_TRACE4 | 295 | #define EPL_DBGLVL_NMTK_TRACE4 DEBUG_LVL_04_TRACE4 |
303 | 296 | ||
304 | #define EPL_DBGLVL_NMTCN DEBUG_LVL_05 // 0x00000010L | 297 | #define EPL_DBGLVL_NMTCN DEBUG_LVL_05 // 0x00000010L |
305 | #define EPL_DBGLVL_NMTCN_TRACE0 DEBUG_LVL_05_TRACE0 | 298 | #define EPL_DBGLVL_NMTCN_TRACE0 DEBUG_LVL_05_TRACE0 |
306 | #define EPL_DBGLVL_NMTCN_TRACE1 DEBUG_LVL_05_TRACE1 | 299 | #define EPL_DBGLVL_NMTCN_TRACE1 DEBUG_LVL_05_TRACE1 |
307 | #define EPL_DBGLVL_NMTCN_TRACE2 DEBUG_LVL_05_TRACE2 | 300 | #define EPL_DBGLVL_NMTCN_TRACE2 DEBUG_LVL_05_TRACE2 |
308 | #define EPL_DBGLVL_NMTCN_TRACE3 DEBUG_LVL_05_TRACE3 | 301 | #define EPL_DBGLVL_NMTCN_TRACE3 DEBUG_LVL_05_TRACE3 |
309 | #define EPL_DBGLVL_NMTCN_TRACE4 DEBUG_LVL_05_TRACE4 | 302 | #define EPL_DBGLVL_NMTCN_TRACE4 DEBUG_LVL_05_TRACE4 |
310 | 303 | ||
311 | #define EPL_DBGLVL_NMTU DEBUG_LVL_06 // 0x00000020L | 304 | #define EPL_DBGLVL_NMTU DEBUG_LVL_06 // 0x00000020L |
312 | #define EPL_DBGLVL_NMTU_TRACE0 DEBUG_LVL_06_TRACE0 | 305 | #define EPL_DBGLVL_NMTU_TRACE0 DEBUG_LVL_06_TRACE0 |
313 | #define EPL_DBGLVL_NMTU_TRACE1 DEBUG_LVL_06_TRACE1 | 306 | #define EPL_DBGLVL_NMTU_TRACE1 DEBUG_LVL_06_TRACE1 |
314 | #define EPL_DBGLVL_NMTU_TRACE2 DEBUG_LVL_06_TRACE2 | 307 | #define EPL_DBGLVL_NMTU_TRACE2 DEBUG_LVL_06_TRACE2 |
315 | #define EPL_DBGLVL_NMTU_TRACE3 DEBUG_LVL_06_TRACE3 | 308 | #define EPL_DBGLVL_NMTU_TRACE3 DEBUG_LVL_06_TRACE3 |
316 | #define EPL_DBGLVL_NMTU_TRACE4 DEBUG_LVL_06_TRACE4 | 309 | #define EPL_DBGLVL_NMTU_TRACE4 DEBUG_LVL_06_TRACE4 |
317 | 310 | ||
318 | #define EPL_DBGLVL_NMTMN DEBUG_LVL_07 // 0x00000040L | 311 | #define EPL_DBGLVL_NMTMN DEBUG_LVL_07 // 0x00000040L |
319 | #define EPL_DBGLVL_NMTMN_TRACE0 DEBUG_LVL_07_TRACE0 | 312 | #define EPL_DBGLVL_NMTMN_TRACE0 DEBUG_LVL_07_TRACE0 |
320 | #define EPL_DBGLVL_NMTMN_TRACE1 DEBUG_LVL_07_TRACE1 | 313 | #define EPL_DBGLVL_NMTMN_TRACE1 DEBUG_LVL_07_TRACE1 |
321 | #define EPL_DBGLVL_NMTMN_TRACE2 DEBUG_LVL_07_TRACE2 | 314 | #define EPL_DBGLVL_NMTMN_TRACE2 DEBUG_LVL_07_TRACE2 |
@@ -324,28 +317,28 @@ typedef struct | |||
324 | 317 | ||
325 | //... | 318 | //... |
326 | 319 | ||
327 | #define EPL_DBGLVL_SDO DEBUG_LVL_25 // 0x01000000 | 320 | #define EPL_DBGLVL_SDO DEBUG_LVL_25 // 0x01000000 |
328 | #define EPL_DBGLVL_SDO_TRACE0 DEBUG_LVL_25_TRACE0 | 321 | #define EPL_DBGLVL_SDO_TRACE0 DEBUG_LVL_25_TRACE0 |
329 | #define EPL_DBGLVL_SDO_TRACE1 DEBUG_LVL_25_TRACE1 | 322 | #define EPL_DBGLVL_SDO_TRACE1 DEBUG_LVL_25_TRACE1 |
330 | #define EPL_DBGLVL_SDO_TRACE2 DEBUG_LVL_25_TRACE2 | 323 | #define EPL_DBGLVL_SDO_TRACE2 DEBUG_LVL_25_TRACE2 |
331 | #define EPL_DBGLVL_SDO_TRACE3 DEBUG_LVL_25_TRACE3 | 324 | #define EPL_DBGLVL_SDO_TRACE3 DEBUG_LVL_25_TRACE3 |
332 | #define EPL_DBGLVL_SDO_TRACE4 DEBUG_LVL_25_TRACE4 | 325 | #define EPL_DBGLVL_SDO_TRACE4 DEBUG_LVL_25_TRACE4 |
333 | 326 | ||
334 | #define EPL_DBGLVL_VETH DEBUG_LVL_26 // 0x02000000 | 327 | #define EPL_DBGLVL_VETH DEBUG_LVL_26 // 0x02000000 |
335 | #define EPL_DBGLVL_VETH_TRACE0 DEBUG_LVL_26_TRACE0 | 328 | #define EPL_DBGLVL_VETH_TRACE0 DEBUG_LVL_26_TRACE0 |
336 | #define EPL_DBGLVL_VETH_TRACE1 DEBUG_LVL_26_TRACE1 | 329 | #define EPL_DBGLVL_VETH_TRACE1 DEBUG_LVL_26_TRACE1 |
337 | #define EPL_DBGLVL_VETH_TRACE2 DEBUG_LVL_26_TRACE2 | 330 | #define EPL_DBGLVL_VETH_TRACE2 DEBUG_LVL_26_TRACE2 |
338 | #define EPL_DBGLVL_VETH_TRACE3 DEBUG_LVL_26_TRACE3 | 331 | #define EPL_DBGLVL_VETH_TRACE3 DEBUG_LVL_26_TRACE3 |
339 | #define EPL_DBGLVL_VETH_TRACE4 DEBUG_LVL_26_TRACE4 | 332 | #define EPL_DBGLVL_VETH_TRACE4 DEBUG_LVL_26_TRACE4 |
340 | 333 | ||
341 | #define EPL_DBGLVL_EVENTK DEBUG_LVL_27 // 0x04000000 | 334 | #define EPL_DBGLVL_EVENTK DEBUG_LVL_27 // 0x04000000 |
342 | #define EPL_DBGLVL_EVENTK_TRACE0 DEBUG_LVL_27_TRACE0 | 335 | #define EPL_DBGLVL_EVENTK_TRACE0 DEBUG_LVL_27_TRACE0 |
343 | #define EPL_DBGLVL_EVENTK_TRACE1 DEBUG_LVL_27_TRACE1 | 336 | #define EPL_DBGLVL_EVENTK_TRACE1 DEBUG_LVL_27_TRACE1 |
344 | #define EPL_DBGLVL_EVENTK_TRACE2 DEBUG_LVL_27_TRACE2 | 337 | #define EPL_DBGLVL_EVENTK_TRACE2 DEBUG_LVL_27_TRACE2 |
345 | #define EPL_DBGLVL_EVENTK_TRACE3 DEBUG_LVL_27_TRACE3 | 338 | #define EPL_DBGLVL_EVENTK_TRACE3 DEBUG_LVL_27_TRACE3 |
346 | #define EPL_DBGLVL_EVENTK_TRACE4 DEBUG_LVL_27_TRACE4 | 339 | #define EPL_DBGLVL_EVENTK_TRACE4 DEBUG_LVL_27_TRACE4 |
347 | 340 | ||
348 | #define EPL_DBGLVL_EVENTU DEBUG_LVL_28 // 0x08000000 | 341 | #define EPL_DBGLVL_EVENTU DEBUG_LVL_28 // 0x08000000 |
349 | #define EPL_DBGLVL_EVENTU_TRACE0 DEBUG_LVL_28_TRACE0 | 342 | #define EPL_DBGLVL_EVENTU_TRACE0 DEBUG_LVL_28_TRACE0 |
350 | #define EPL_DBGLVL_EVENTU_TRACE1 DEBUG_LVL_28_TRACE1 | 343 | #define EPL_DBGLVL_EVENTU_TRACE1 DEBUG_LVL_28_TRACE1 |
351 | #define EPL_DBGLVL_EVENTU_TRACE2 DEBUG_LVL_28_TRACE2 | 344 | #define EPL_DBGLVL_EVENTU_TRACE2 DEBUG_LVL_28_TRACE2 |
@@ -353,46 +346,40 @@ typedef struct | |||
353 | #define EPL_DBGLVL_EVENTU_TRACE4 DEBUG_LVL_28_TRACE4 | 346 | #define EPL_DBGLVL_EVENTU_TRACE4 DEBUG_LVL_28_TRACE4 |
354 | 347 | ||
355 | // SharedBuff | 348 | // SharedBuff |
356 | #define EPL_DBGLVL_SHB DEBUG_LVL_29 // 0x10000000 | 349 | #define EPL_DBGLVL_SHB DEBUG_LVL_29 // 0x10000000 |
357 | #define EPL_DBGLVL_SHB_TRACE0 DEBUG_LVL_29_TRACE0 | 350 | #define EPL_DBGLVL_SHB_TRACE0 DEBUG_LVL_29_TRACE0 |
358 | #define EPL_DBGLVL_SHB_TRACE1 DEBUG_LVL_29_TRACE1 | 351 | #define EPL_DBGLVL_SHB_TRACE1 DEBUG_LVL_29_TRACE1 |
359 | #define EPL_DBGLVL_SHB_TRACE2 DEBUG_LVL_29_TRACE2 | 352 | #define EPL_DBGLVL_SHB_TRACE2 DEBUG_LVL_29_TRACE2 |
360 | #define EPL_DBGLVL_SHB_TRACE3 DEBUG_LVL_29_TRACE3 | 353 | #define EPL_DBGLVL_SHB_TRACE3 DEBUG_LVL_29_TRACE3 |
361 | #define EPL_DBGLVL_SHB_TRACE4 DEBUG_LVL_29_TRACE4 | 354 | #define EPL_DBGLVL_SHB_TRACE4 DEBUG_LVL_29_TRACE4 |
362 | 355 | ||
363 | #define EPL_DBGLVL_ASSERT DEBUG_LVL_ASSERT // 0x20000000L | 356 | #define EPL_DBGLVL_ASSERT DEBUG_LVL_ASSERT // 0x20000000L |
364 | #define EPL_DBGLVL_ASSERT_TRACE0 DEBUG_LVL_ASSERT_TRACE0 | 357 | #define EPL_DBGLVL_ASSERT_TRACE0 DEBUG_LVL_ASSERT_TRACE0 |
365 | #define EPL_DBGLVL_ASSERT_TRACE1 DEBUG_LVL_ASSERT_TRACE1 | 358 | #define EPL_DBGLVL_ASSERT_TRACE1 DEBUG_LVL_ASSERT_TRACE1 |
366 | #define EPL_DBGLVL_ASSERT_TRACE2 DEBUG_LVL_ASSERT_TRACE2 | 359 | #define EPL_DBGLVL_ASSERT_TRACE2 DEBUG_LVL_ASSERT_TRACE2 |
367 | #define EPL_DBGLVL_ASSERT_TRACE3 DEBUG_LVL_ASSERT_TRACE3 | 360 | #define EPL_DBGLVL_ASSERT_TRACE3 DEBUG_LVL_ASSERT_TRACE3 |
368 | #define EPL_DBGLVL_ASSERT_TRACE4 DEBUG_LVL_ASSERT_TRACE4 | 361 | #define EPL_DBGLVL_ASSERT_TRACE4 DEBUG_LVL_ASSERT_TRACE4 |
369 | 362 | ||
370 | #define EPL_DBGLVL_ERROR DEBUG_LVL_ERROR // 0x40000000L | 363 | #define EPL_DBGLVL_ERROR DEBUG_LVL_ERROR // 0x40000000L |
371 | #define EPL_DBGLVL_ERROR_TRACE0 DEBUG_LVL_ERROR_TRACE0 | 364 | #define EPL_DBGLVL_ERROR_TRACE0 DEBUG_LVL_ERROR_TRACE0 |
372 | #define EPL_DBGLVL_ERROR_TRACE1 DEBUG_LVL_ERROR_TRACE1 | 365 | #define EPL_DBGLVL_ERROR_TRACE1 DEBUG_LVL_ERROR_TRACE1 |
373 | #define EPL_DBGLVL_ERROR_TRACE2 DEBUG_LVL_ERROR_TRACE2 | 366 | #define EPL_DBGLVL_ERROR_TRACE2 DEBUG_LVL_ERROR_TRACE2 |
374 | #define EPL_DBGLVL_ERROR_TRACE3 DEBUG_LVL_ERROR_TRACE3 | 367 | #define EPL_DBGLVL_ERROR_TRACE3 DEBUG_LVL_ERROR_TRACE3 |
375 | #define EPL_DBGLVL_ERROR_TRACE4 DEBUG_LVL_ERROR_TRACE4 | 368 | #define EPL_DBGLVL_ERROR_TRACE4 DEBUG_LVL_ERROR_TRACE4 |
376 | 369 | ||
377 | #define EPL_DBGLVL_ALWAYS DEBUG_LVL_ALWAYS // 0x80000000L | 370 | #define EPL_DBGLVL_ALWAYS DEBUG_LVL_ALWAYS // 0x80000000L |
378 | #define EPL_DBGLVL_ALWAYS_TRACE0 DEBUG_LVL_ALWAYS_TRACE0 | 371 | #define EPL_DBGLVL_ALWAYS_TRACE0 DEBUG_LVL_ALWAYS_TRACE0 |
379 | #define EPL_DBGLVL_ALWAYS_TRACE1 DEBUG_LVL_ALWAYS_TRACE1 | 372 | #define EPL_DBGLVL_ALWAYS_TRACE1 DEBUG_LVL_ALWAYS_TRACE1 |
380 | #define EPL_DBGLVL_ALWAYS_TRACE2 DEBUG_LVL_ALWAYS_TRACE2 | 373 | #define EPL_DBGLVL_ALWAYS_TRACE2 DEBUG_LVL_ALWAYS_TRACE2 |
381 | #define EPL_DBGLVL_ALWAYS_TRACE3 DEBUG_LVL_ALWAYS_TRACE3 | 374 | #define EPL_DBGLVL_ALWAYS_TRACE3 DEBUG_LVL_ALWAYS_TRACE3 |
382 | #define EPL_DBGLVL_ALWAYS_TRACE4 DEBUG_LVL_ALWAYS_TRACE4 | 375 | #define EPL_DBGLVL_ALWAYS_TRACE4 DEBUG_LVL_ALWAYS_TRACE4 |
383 | 376 | ||
384 | |||
385 | //--------------------------------------------------------------------------- | 377 | //--------------------------------------------------------------------------- |
386 | // typedef | 378 | // typedef |
387 | //--------------------------------------------------------------------------- | 379 | //--------------------------------------------------------------------------- |
388 | 380 | ||
389 | |||
390 | |||
391 | //--------------------------------------------------------------------------- | 381 | //--------------------------------------------------------------------------- |
392 | // function prototypes | 382 | // function prototypes |
393 | //--------------------------------------------------------------------------- | 383 | //--------------------------------------------------------------------------- |
394 | 384 | ||
395 | 385 | #endif // #ifndef _EPL_INC_H_ | |
396 | #endif // #ifndef _EPL_INC_H_ | ||
397 | |||
398 | |||
diff --git a/drivers/staging/epl/EplInstDef.h b/drivers/staging/epl/EplInstDef.h index ab9bafabf42c..89efbf278264 100644 --- a/drivers/staging/epl/EplInstDef.h +++ b/drivers/staging/epl/EplInstDef.h | |||
@@ -71,23 +71,20 @@ | |||
71 | #ifndef _EPLINSTDEF_H_ | 71 | #ifndef _EPLINSTDEF_H_ |
72 | #define _EPLINSTDEF_H_ | 72 | #define _EPLINSTDEF_H_ |
73 | 73 | ||
74 | |||
75 | // ========================================================================= | 74 | // ========================================================================= |
76 | // types and macros for generating instances | 75 | // types and macros for generating instances |
77 | // ========================================================================= | 76 | // ========================================================================= |
78 | 77 | ||
79 | typedef enum | 78 | typedef enum { |
80 | { | 79 | kStateUnused = 0, |
81 | kStateUnused = 0, | 80 | kStateDeleted = 1, |
82 | kStateDeleted = 1, | 81 | kStateUsed = 0xFF |
83 | kStateUsed = 0xFF | ||
84 | |||
85 | } tInstState; | 82 | } tInstState; |
86 | 83 | ||
87 | //------------------------------------------------------------------------------------------ | 84 | //------------------------------------------------------------------------------------------ |
88 | 85 | ||
89 | typedef void MEM* tEplPtrInstance; | 86 | typedef void MEM *tEplPtrInstance; |
90 | typedef BYTE tEplInstanceHdl; | 87 | typedef BYTE tEplInstanceHdl; |
91 | 88 | ||
92 | // define const for illegale values | 89 | // define const for illegale values |
93 | #define CCM_ILLINSTANCE NULL | 90 | #define CCM_ILLINSTANCE NULL |
@@ -102,13 +99,12 @@ typedef BYTE tEplInstanceHdl; | |||
102 | //-------------------------------------------------------------------------------------- | 99 | //-------------------------------------------------------------------------------------- |
103 | 100 | ||
104 | // memory attributes for instance table | 101 | // memory attributes for instance table |
105 | #define INST_NEAR // faster access to variables | 102 | #define INST_NEAR // faster access to variables |
106 | #define INST_FAR // variables wich have to located in xdata | 103 | #define INST_FAR // variables wich have to located in xdata |
107 | #define STATIC // prevent warnings for variables with same name | 104 | #define STATIC // prevent warnings for variables with same name |
108 | |||
109 | #define INSTANCE_TYPE_BEGIN typedef struct { | ||
110 | #define INSTANCE_TYPE_END } tEplInstanceInfo; | ||
111 | 105 | ||
106 | #define INSTANCE_TYPE_BEGIN typedef struct { | ||
107 | #define INSTANCE_TYPE_END } tEplInstanceInfo; | ||
112 | 108 | ||
113 | //-------------------------------------------------------------------------------------- | 109 | //-------------------------------------------------------------------------------------- |
114 | // macro definition for API interface | 110 | // macro definition for API interface |
@@ -117,53 +113,51 @@ typedef BYTE tEplInstanceHdl; | |||
117 | // declaration: | 113 | // declaration: |
118 | 114 | ||
119 | // macros for declaration within function header or prototype of API functions | 115 | // macros for declaration within function header or prototype of API functions |
120 | #define CCM_DECL_INSTANCE_HDL tEplInstanceHdl InstanceHandle | 116 | #define CCM_DECL_INSTANCE_HDL tEplInstanceHdl InstanceHandle |
121 | #define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle, | 117 | #define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle, |
122 | 118 | ||
123 | // macros for declaration of pointer to instance handle within function header or prototype of API functions | 119 | // macros for declaration of pointer to instance handle within function header or prototype of API functions |
124 | #define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle | 120 | #define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle |
125 | #define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle, | 121 | #define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle, |
126 | 122 | ||
127 | // macros for declaration instance as lokacl variable within functions | 123 | // macros for declaration instance as lokacl variable within functions |
128 | #define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance; | 124 | #define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance; |
129 | #define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle; | 125 | #define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle; |
130 | 126 | ||
131 | // reference: | 127 | // reference: |
132 | 128 | ||
133 | // macros for reference of instance handle for function parameters | 129 | // macros for reference of instance handle for function parameters |
134 | #define CCM_INSTANCE_HDL InstanceHandle | 130 | #define CCM_INSTANCE_HDL InstanceHandle |
135 | #define CCM_INSTANCE_HDL_ InstanceHandle, | 131 | #define CCM_INSTANCE_HDL_ InstanceHandle, |
136 | 132 | ||
137 | // macros for reference of instance parameter for function parameters | 133 | // macros for reference of instance parameter for function parameters |
138 | #define CCM_INSTANCE_PARAM(par) par | 134 | #define CCM_INSTANCE_PARAM(par) par |
139 | #define CCM_INSTANCE_PARAM_(par) par, | 135 | #define CCM_INSTANCE_PARAM_(par) par, |
140 | 136 | ||
141 | // macros for reference of instance parameter for writing or reading values | 137 | // macros for reference of instance parameter for writing or reading values |
142 | #define CCM_INST_ENTRY (*((tEplPtrInstance)pInstance)) | 138 | #define CCM_INST_ENTRY (*((tEplPtrInstance)pInstance)) |
143 | 139 | ||
144 | // processing: | 140 | // processing: |
145 | 141 | ||
146 | // macros for process instance handle | 142 | // macros for process instance handle |
147 | #define CCM_CHECK_INSTANCE_HDL() if (InstanceHandle >= EPL_MAX_INSTANCES) \ | 143 | #define CCM_CHECK_INSTANCE_HDL() if (InstanceHandle >= EPL_MAX_INSTANCES) \ |
148 | {return (kEplIllegalInstance);} | 144 | {return (kEplIllegalInstance);} |
149 | 145 | ||
150 | |||
151 | // macros for process pointer to instance handle | 146 | // macros for process pointer to instance handle |
152 | #define CCM_CHECK_PTR_INSTANCE_HDL() if (pInstanceHandle == NULL) \ | 147 | #define CCM_CHECK_PTR_INSTANCE_HDL() if (pInstanceHandle == NULL) \ |
153 | {return (kEplInvalidInstanceParam);} | 148 | {return (kEplInvalidInstanceParam);} |
154 | 149 | ||
155 | // This macro returned the handle and pointer to next free instance. | 150 | // This macro returned the handle and pointer to next free instance. |
156 | #define CCM_GET_FREE_INSTANCE_AND_HDL() pInstance = CcmGetFreeInstanceAndHandle (pInstanceHandle); \ | 151 | #define CCM_GET_FREE_INSTANCE_AND_HDL() pInstance = CcmGetFreeInstanceAndHandle (pInstanceHandle); \ |
157 | ASSERT (*pInstanceHandle != CCM_ILLINSTANCE_HDL); | 152 | ASSERT (*pInstanceHandle != CCM_ILLINSTANCE_HDL); |
158 | 153 | ||
159 | #define CCM_CHECK_INSTANCE_PTR() if (pInstance == CCM_ILLINSTANCE) \ | 154 | #define CCM_CHECK_INSTANCE_PTR() if (pInstance == CCM_ILLINSTANCE) \ |
160 | {return (kEplNoFreeInstance);} | 155 | {return (kEplNoFreeInstance);} |
161 | 156 | ||
162 | #define CCM_GET_INSTANCE_PTR() pInstance = CcmGetInstancePtr (InstanceHandle); | 157 | #define CCM_GET_INSTANCE_PTR() pInstance = CcmGetInstancePtr (InstanceHandle); |
163 | #define CCM_GET_FREE_INSTANCE_PTR() pInstance = GetFreeInstance (); \ | 158 | #define CCM_GET_FREE_INSTANCE_PTR() pInstance = GetFreeInstance (); \ |
164 | ASSERT (pInstance != CCM_ILLINSTANCE); | 159 | ASSERT (pInstance != CCM_ILLINSTANCE); |
165 | 160 | ||
166 | |||
167 | //-------------------------------------------------------------------------------------- | 161 | //-------------------------------------------------------------------------------------- |
168 | // macro definition for stack interface | 162 | // macro definition for stack interface |
169 | //-------------------------------------------------------------------------------------- | 163 | //-------------------------------------------------------------------------------------- |
@@ -171,52 +165,52 @@ typedef BYTE tEplInstanceHdl; | |||
171 | // macros for declaration within the function header, prototype or local var list | 165 | // macros for declaration within the function header, prototype or local var list |
172 | // Declaration of pointers within function paramater list must defined as void MEM* | 166 | // Declaration of pointers within function paramater list must defined as void MEM* |
173 | // pointer. | 167 | // pointer. |
174 | #define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance | 168 | #define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance |
175 | #define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance, | 169 | #define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance, |
176 | #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance; | 170 | #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance; |
177 | 171 | ||
178 | // macros for reference of pointer to instance | 172 | // macros for reference of pointer to instance |
179 | // These macros are used for parameter passing to called function. | 173 | // These macros are used for parameter passing to called function. |
180 | #define EPL_MCO_INSTANCE_PTR pInstance | 174 | #define EPL_MCO_INSTANCE_PTR pInstance |
181 | #define EPL_MCO_INSTANCE_PTR_ pInstance, | 175 | #define EPL_MCO_INSTANCE_PTR_ pInstance, |
182 | #define EPL_MCO_ADDR_INSTANCE_PTR_ &pInstance, | 176 | #define EPL_MCO_ADDR_INSTANCE_PTR_ &pInstance, |
183 | 177 | ||
184 | // macro for access of struct members of one instance | 178 | // macro for access of struct members of one instance |
185 | // An access to a member of instance table must be casted by the local | 179 | // An access to a member of instance table must be casted by the local |
186 | // defined type of instance table. | 180 | // defined type of instance table. |
187 | #define EPL_MCO_INST_ENTRY (*(tEplPtrInstance)pInstance) | 181 | #define EPL_MCO_INST_ENTRY (*(tEplPtrInstance)pInstance) |
188 | #define EPL_MCO_GLB_VAR(var) (((tEplPtrInstance)pInstance)->var) | 182 | #define EPL_MCO_GLB_VAR(var) (((tEplPtrInstance)pInstance)->var) |
189 | 183 | ||
190 | // macros for process pointer to instance | 184 | // macros for process pointer to instance |
191 | #define EPL_MCO_GET_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetInstancePtr (InstanceHandle); | 185 | #define EPL_MCO_GET_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetInstancePtr (InstanceHandle); |
192 | #define EPL_MCO_GET_FREE_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetFreeInstance (); \ | 186 | #define EPL_MCO_GET_FREE_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetFreeInstance (); \ |
193 | ASSERT (pInstance != CCM_ILLINSTANCE); | 187 | ASSERT (pInstance != CCM_ILLINSTANCE); |
194 | 188 | ||
195 | // This macro should be used to check the passed pointer to an public function | 189 | // This macro should be used to check the passed pointer to an public function |
196 | #define EPL_MCO_CHECK_INSTANCE_STATE() ASSERT (pInstance != NULL); \ | 190 | #define EPL_MCO_CHECK_INSTANCE_STATE() ASSERT (pInstance != NULL); \ |
197 | ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed); | 191 | ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed); |
198 | 192 | ||
199 | // macros for declaration of pointer to instance pointer | 193 | // macros for declaration of pointer to instance pointer |
200 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr | 194 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr |
201 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr, | 195 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr, |
202 | 196 | ||
203 | // macros for reference of pointer to instance pointer | 197 | // macros for reference of pointer to instance pointer |
204 | // These macros are used for parameter passing to called function. | 198 | // These macros are used for parameter passing to called function. |
205 | #define EPL_MCO_PTR_INSTANCE_PTR pInstancePtr | 199 | #define EPL_MCO_PTR_INSTANCE_PTR pInstancePtr |
206 | #define EPL_MCO_PTR_INSTANCE_PTR_ pInstancePtr, | 200 | #define EPL_MCO_PTR_INSTANCE_PTR_ pInstancePtr, |
207 | 201 | ||
208 | // macros for process pointer to instance pointer | 202 | // macros for process pointer to instance pointer |
209 | #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() ASSERT (pInstancePtr != NULL); | 203 | #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() ASSERT (pInstancePtr != NULL); |
210 | #define EPL_MCO_SET_PTR_INSTANCE_PTR() (*pInstancePtr = pInstance); | 204 | #define EPL_MCO_SET_PTR_INSTANCE_PTR() (*pInstancePtr = pInstance); |
211 | 205 | ||
212 | #define EPL_MCO_INSTANCE_PARAM(a) (a) | 206 | #define EPL_MCO_INSTANCE_PARAM(a) (a) |
213 | #define EPL_MCO_INSTANCE_PARAM_(a) (a), | 207 | #define EPL_MCO_INSTANCE_PARAM_(a) (a), |
214 | #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) | 208 | #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) |
215 | #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) | 209 | #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) |
216 | #define EPL_MCO_WRITE_INSTANCE_STATE(a) EPL_MCO_GLB_VAR (m_InstState) = a; | 210 | #define EPL_MCO_WRITE_INSTANCE_STATE(a) EPL_MCO_GLB_VAR (m_InstState) = a; |
217 | 211 | ||
218 | // this macro deletes all instance entries as unused | 212 | // this macro deletes all instance entries as unused |
219 | #define EPL_MCO_DELETE_INSTANCE_TABLE() \ | 213 | #define EPL_MCO_DELETE_INSTANCE_TABLE() \ |
220 | { \ | 214 | { \ |
221 | tEplInstanceInfo MEM* pInstance = &aEplInstanceTable_g[0]; \ | 215 | tEplInstanceInfo MEM* pInstance = &aEplInstanceTable_g[0]; \ |
222 | tFastByte InstNumber = 0; \ | 216 | tFastByte InstNumber = 0; \ |
@@ -229,10 +223,10 @@ typedef BYTE tEplInstanceHdl; | |||
229 | } | 223 | } |
230 | 224 | ||
231 | // definition of functions which has to be defined in each module of CANopen stack | 225 | // definition of functions which has to be defined in each module of CANopen stack |
232 | #define EPL_MCO_DEFINE_INSTANCE_FCT() \ | 226 | #define EPL_MCO_DEFINE_INSTANCE_FCT() \ |
233 | static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p); \ | 227 | static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p); \ |
234 | static tEplPtrInstance GetFreeInstance (void); | 228 | static tEplPtrInstance GetFreeInstance (void); |
235 | #define EPL_MCO_DECL_INSTANCE_FCT() \ | 229 | #define EPL_MCO_DECL_INSTANCE_FCT() \ |
236 | static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \ | 230 | static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \ |
237 | return &aEplInstanceTable_g[InstHandle_p]; } \ | 231 | return &aEplInstanceTable_g[InstHandle_p]; } \ |
238 | static tEplPtrInstance GetFreeInstance (void) { \ | 232 | static tEplPtrInstance GetFreeInstance (void) { \ |
@@ -245,27 +239,27 @@ typedef BYTE tEplInstanceHdl; | |||
245 | return CCM_ILLINSTANCE; } | 239 | return CCM_ILLINSTANCE; } |
246 | 240 | ||
247 | // this macro defines the instance table. Each entry is reserved for an instance of CANopen. | 241 | // this macro defines the instance table. Each entry is reserved for an instance of CANopen. |
248 | #define EPL_MCO_DECL_INSTANCE_VAR() \ | 242 | #define EPL_MCO_DECL_INSTANCE_VAR() \ |
249 | static tEplInstanceInfo MEM aEplInstanceTable_g [EPL_MAX_INSTANCES]; | 243 | static tEplInstanceInfo MEM aEplInstanceTable_g [EPL_MAX_INSTANCES]; |
250 | 244 | ||
251 | // this macro defines member variables in instance table which are needed in | 245 | // this macro defines member variables in instance table which are needed in |
252 | // all modules of Epl stack | 246 | // all modules of Epl stack |
253 | #define EPL_MCO_DECL_INSTANCE_MEMBER() \ | 247 | #define EPL_MCO_DECL_INSTANCE_MEMBER() \ |
254 | STATIC BYTE m_InstState; \ | 248 | STATIC BYTE m_InstState; \ |
255 | STATIC BYTE m_bInstIndex; | 249 | STATIC BYTE m_bInstIndex; |
256 | 250 | ||
257 | #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) | 251 | #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) |
258 | #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) | 252 | #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) |
259 | 253 | ||
260 | #else // only one instance is used | 254 | #else // only one instance is used |
261 | 255 | ||
262 | // Memory attributes for instance table. | 256 | // Memory attributes for instance table. |
263 | #define INST_NEAR NEAR // faster access to variables | 257 | #define INST_NEAR NEAR // faster access to variables |
264 | #define INST_FAR MEM // variables wich have to located in xdata | 258 | #define INST_FAR MEM // variables wich have to located in xdata |
265 | #define STATIC static // prevent warnings for variables with same name | 259 | #define STATIC static // prevent warnings for variables with same name |
266 | 260 | ||
267 | #define INSTANCE_TYPE_BEGIN | 261 | #define INSTANCE_TYPE_BEGIN |
268 | #define INSTANCE_TYPE_END | 262 | #define INSTANCE_TYPE_END |
269 | 263 | ||
270 | // macros for declaration, initializing and member access for instance handle | 264 | // macros for declaration, initializing and member access for instance handle |
271 | // This class of macros are used by API function to inform CCM-modul which | 265 | // This class of macros are used by API function to inform CCM-modul which |
@@ -273,99 +267,98 @@ typedef BYTE tEplInstanceHdl; | |||
273 | 267 | ||
274 | // macros for reference of instance handle | 268 | // macros for reference of instance handle |
275 | // These macros are used for parameter passing to CANopen API function. | 269 | // These macros are used for parameter passing to CANopen API function. |
276 | #define CCM_INSTANCE_HDL | 270 | #define CCM_INSTANCE_HDL |
277 | #define CCM_INSTANCE_HDL_ | 271 | #define CCM_INSTANCE_HDL_ |
278 | 272 | ||
279 | #define CCM_DECL_INSTANCE_PTR_LOCAL | 273 | #define CCM_DECL_INSTANCE_PTR_LOCAL |
280 | 274 | ||
281 | // macros for declaration within the function header or prototype | 275 | // macros for declaration within the function header or prototype |
282 | #define CCM_DECL_INSTANCE_HDL void | 276 | #define CCM_DECL_INSTANCE_HDL void |
283 | #define CCM_DECL_INSTANCE_HDL_ | 277 | #define CCM_DECL_INSTANCE_HDL_ |
284 | 278 | ||
285 | // macros for process instance handle | 279 | // macros for process instance handle |
286 | #define CCM_CHECK_INSTANCE_HDL() | 280 | #define CCM_CHECK_INSTANCE_HDL() |
287 | 281 | ||
288 | // macros for declaration of pointer to instance handle | 282 | // macros for declaration of pointer to instance handle |
289 | #define CCM_DECL_PTR_INSTANCE_HDL void | 283 | #define CCM_DECL_PTR_INSTANCE_HDL void |
290 | #define CCM_DECL_PTR_INSTANCE_HDL_ | 284 | #define CCM_DECL_PTR_INSTANCE_HDL_ |
291 | 285 | ||
292 | // macros for process pointer to instance handle | 286 | // macros for process pointer to instance handle |
293 | #define CCM_CHECK_PTR_INSTANCE_HDL() | 287 | #define CCM_CHECK_PTR_INSTANCE_HDL() |
294 | 288 | ||
295 | // This macro returned the handle and pointer to next free instance. | 289 | // This macro returned the handle and pointer to next free instance. |
296 | #define CCM_GET_FREE_INSTANCE_AND_HDL() | 290 | #define CCM_GET_FREE_INSTANCE_AND_HDL() |
297 | 291 | ||
298 | #define CCM_CHECK_INSTANCE_PTR() | 292 | #define CCM_CHECK_INSTANCE_PTR() |
299 | 293 | ||
300 | #define CCM_GET_INSTANCE_PTR() | 294 | #define CCM_GET_INSTANCE_PTR() |
301 | #define CCM_GET_FREE_INSTANCE_PTR() | 295 | #define CCM_GET_FREE_INSTANCE_PTR() |
302 | 296 | ||
303 | #define CCM_INSTANCE_PARAM(par) | 297 | #define CCM_INSTANCE_PARAM(par) |
304 | #define CCM_INSTANCE_PARAM_(par) | 298 | #define CCM_INSTANCE_PARAM_(par) |
305 | 299 | ||
306 | #define CCM_INST_ENTRY aCcmInstanceTable_g[0] | 300 | #define CCM_INST_ENTRY aCcmInstanceTable_g[0] |
307 | 301 | ||
308 | // macros for declaration, initializing and member access for instance pointer | 302 | // macros for declaration, initializing and member access for instance pointer |
309 | // This class of macros are used by CANopen internal function to point to one instance. | 303 | // This class of macros are used by CANopen internal function to point to one instance. |
310 | 304 | ||
311 | // macros for declaration within the function header, prototype or local var list | 305 | // macros for declaration within the function header, prototype or local var list |
312 | #define EPL_MCO_DECL_INSTANCE_PTR void | 306 | #define EPL_MCO_DECL_INSTANCE_PTR void |
313 | #define EPL_MCO_DECL_INSTANCE_PTR_ | 307 | #define EPL_MCO_DECL_INSTANCE_PTR_ |
314 | #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL | 308 | #define EPL_MCO_DECL_INSTANCE_PTR_LOCAL |
315 | 309 | ||
316 | // macros for reference of pointer to instance | 310 | // macros for reference of pointer to instance |
317 | // These macros are used for parameter passing to called function. | 311 | // These macros are used for parameter passing to called function. |
318 | #define EPL_MCO_INSTANCE_PTR | 312 | #define EPL_MCO_INSTANCE_PTR |
319 | #define EPL_MCO_INSTANCE_PTR_ | 313 | #define EPL_MCO_INSTANCE_PTR_ |
320 | #define EPL_MCO_ADDR_INSTANCE_PTR_ | 314 | #define EPL_MCO_ADDR_INSTANCE_PTR_ |
321 | 315 | ||
322 | // macros for process pointer to instance | 316 | // macros for process pointer to instance |
323 | #define EPL_MCO_GET_INSTANCE_PTR() | 317 | #define EPL_MCO_GET_INSTANCE_PTR() |
324 | #define EPL_MCO_GET_FREE_INSTANCE_PTR() | 318 | #define EPL_MCO_GET_FREE_INSTANCE_PTR() |
325 | 319 | ||
326 | // This macro should be used to check the passed pointer to an public function | 320 | // This macro should be used to check the passed pointer to an public function |
327 | #define EPL_MCO_CHECK_INSTANCE_STATE() | 321 | #define EPL_MCO_CHECK_INSTANCE_STATE() |
328 | 322 | ||
329 | // macros for declaration of pointer to instance pointer | 323 | // macros for declaration of pointer to instance pointer |
330 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR void | 324 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR void |
331 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ | 325 | #define EPL_MCO_DECL_PTR_INSTANCE_PTR_ |
332 | 326 | ||
333 | // macros for reference of pointer to instance pointer | 327 | // macros for reference of pointer to instance pointer |
334 | // These macros are used for parameter passing to called function. | 328 | // These macros are used for parameter passing to called function. |
335 | #define EPL_MCO_PTR_INSTANCE_PTR | 329 | #define EPL_MCO_PTR_INSTANCE_PTR |
336 | #define EPL_MCO_PTR_INSTANCE_PTR_ | 330 | #define EPL_MCO_PTR_INSTANCE_PTR_ |
337 | 331 | ||
338 | // macros for process pointer to instance pointer | 332 | // macros for process pointer to instance pointer |
339 | #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() | 333 | #define EPL_MCO_CHECK_PTR_INSTANCE_PTR() |
340 | #define EPL_MCO_SET_PTR_INSTANCE_PTR() | 334 | #define EPL_MCO_SET_PTR_INSTANCE_PTR() |
341 | 335 | ||
342 | #define EPL_MCO_INSTANCE_PARAM(a) | 336 | #define EPL_MCO_INSTANCE_PARAM(a) |
343 | #define EPL_MCO_INSTANCE_PARAM_(a) | 337 | #define EPL_MCO_INSTANCE_PARAM_(a) |
344 | #define EPL_MCO_INSTANCE_PARAM_IDX_() | 338 | #define EPL_MCO_INSTANCE_PARAM_IDX_() |
345 | #define EPL_MCO_INSTANCE_PARAM_IDX() | 339 | #define EPL_MCO_INSTANCE_PARAM_IDX() |
346 | 340 | ||
347 | // macro for access of struct members of one instance | 341 | // macro for access of struct members of one instance |
348 | #define EPL_MCO_INST_ENTRY aEplInstanceTable_g[0] | 342 | #define EPL_MCO_INST_ENTRY aEplInstanceTable_g[0] |
349 | #define EPL_MCO_GLB_VAR(var) (var) | 343 | #define EPL_MCO_GLB_VAR(var) (var) |
350 | #define EPL_MCO_WRITE_INSTANCE_STATE(a) | 344 | #define EPL_MCO_WRITE_INSTANCE_STATE(a) |
351 | 345 | ||
352 | // this macro deletes all instance entries as unused | 346 | // this macro deletes all instance entries as unused |
353 | #define EPL_MCO_DELETE_INSTANCE_TABLE() | 347 | #define EPL_MCO_DELETE_INSTANCE_TABLE() |
354 | 348 | ||
355 | // definition of functions which has to be defined in each module of CANopen stack | 349 | // definition of functions which has to be defined in each module of CANopen stack |
356 | #define EPL_MCO_DEFINE_INSTANCE_FCT() | 350 | #define EPL_MCO_DEFINE_INSTANCE_FCT() |
357 | #define EPL_MCO_DECL_INSTANCE_FCT() | 351 | #define EPL_MCO_DECL_INSTANCE_FCT() |
358 | 352 | ||
359 | // this macro defines the instance table. Each entry is reserved for an instance of CANopen. | 353 | // this macro defines the instance table. Each entry is reserved for an instance of CANopen. |
360 | #define EPL_MCO_DECL_INSTANCE_VAR() | 354 | #define EPL_MCO_DECL_INSTANCE_VAR() |
361 | 355 | ||
362 | // this macro defines member variables in instance table which are needed in | 356 | // this macro defines member variables in instance table which are needed in |
363 | // all modules of CANopen stack | 357 | // all modules of CANopen stack |
364 | #define EPL_MCO_DECL_INSTANCE_MEMBER() | 358 | #define EPL_MCO_DECL_INSTANCE_MEMBER() |
365 | 359 | ||
366 | #endif | 360 | #endif |
367 | 361 | ||
368 | |||
369 | /* | 362 | /* |
370 | #if (CDRV_MAX_INSTANCES > 1) | 363 | #if (CDRV_MAX_INSTANCES > 1) |
371 | 364 | ||
@@ -378,9 +371,7 @@ typedef BYTE tEplInstanceHdl; | |||
378 | #endif | 371 | #endif |
379 | */ | 372 | */ |
380 | 373 | ||
381 | |||
382 | #endif // _EPLINSTDEF_H_ | 374 | #endif // _EPLINSTDEF_H_ |
383 | 375 | ||
384 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler | 376 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler |
385 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). | 377 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). |
386 | |||
diff --git a/drivers/staging/epl/EplLed.h b/drivers/staging/epl/EplLed.h index 390d6db35abb..6a29aed303a2 100644 --- a/drivers/staging/epl/EplLed.h +++ b/drivers/staging/epl/EplLed.h | |||
@@ -66,39 +66,27 @@ | |||
66 | 66 | ||
67 | 2008/11/17 d.k.: start of the implementation | 67 | 2008/11/17 d.k.: start of the implementation |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | |||
73 | #ifndef _EPLLED_H_ | 71 | #ifndef _EPLLED_H_ |
74 | #define _EPLLED_H_ | 72 | #define _EPLLED_H_ |
75 | 73 | ||
76 | |||
77 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
78 | // const defines | 75 | // const defines |
79 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
80 | 77 | ||
81 | |||
82 | //--------------------------------------------------------------------------- | 78 | //--------------------------------------------------------------------------- |
83 | // typedef | 79 | // typedef |
84 | //--------------------------------------------------------------------------- | 80 | //--------------------------------------------------------------------------- |
85 | 81 | ||
86 | 82 | typedef enum { | |
87 | typedef enum | 83 | kEplLedTypeStatus = 0x00, |
88 | { | 84 | kEplLedTypeError = 0x01, |
89 | kEplLedTypeStatus = 0x00, | ||
90 | kEplLedTypeError = 0x01, | ||
91 | 85 | ||
92 | } tEplLedType; | 86 | } tEplLedType; |
93 | 87 | ||
94 | |||
95 | |||
96 | |||
97 | //--------------------------------------------------------------------------- | 88 | //--------------------------------------------------------------------------- |
98 | // function prototypes | 89 | // function prototypes |
99 | //--------------------------------------------------------------------------- | 90 | //--------------------------------------------------------------------------- |
100 | 91 | ||
101 | 92 | #endif // #ifndef _EPLLED_H_ | |
102 | #endif // #ifndef _EPLLED_H_ | ||
103 | |||
104 | |||
diff --git a/drivers/staging/epl/EplNmt.h b/drivers/staging/epl/EplNmt.h index 7b9e58e31f15..4c11e5bc74aa 100644 --- a/drivers/staging/epl/EplNmt.h +++ b/drivers/staging/epl/EplNmt.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/06/09 k.t.: start of the implementation | 67 | 2006/06/09 k.t.: start of the implementation |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPLNMT_H_ | 71 | #ifndef _EPLNMT_H_ |
@@ -79,18 +78,18 @@ | |||
79 | //--------------------------------------------------------------------------- | 78 | //--------------------------------------------------------------------------- |
80 | 79 | ||
81 | // define super-states and masks to identify a super-state | 80 | // define super-states and masks to identify a super-state |
82 | #define EPL_NMT_GS_POWERED 0x0008 // super state | 81 | #define EPL_NMT_GS_POWERED 0x0008 // super state |
83 | #define EPL_NMT_GS_INITIALISATION 0x0009 // super state | 82 | #define EPL_NMT_GS_INITIALISATION 0x0009 // super state |
84 | #define EPL_NMT_GS_COMMUNICATING 0x000C // super state | 83 | #define EPL_NMT_GS_COMMUNICATING 0x000C // super state |
85 | #define EPL_NMT_CS_EPLMODE 0x000D // super state | 84 | #define EPL_NMT_CS_EPLMODE 0x000D // super state |
86 | #define EPL_NMT_MS_EPLMODE 0x000D // super state | 85 | #define EPL_NMT_MS_EPLMODE 0x000D // super state |
87 | 86 | ||
88 | #define EPL_NMT_SUPERSTATE_MASK 0x000F // mask to select state | 87 | #define EPL_NMT_SUPERSTATE_MASK 0x000F // mask to select state |
89 | 88 | ||
90 | #define EPL_NMT_TYPE_UNDEFINED 0x0000 // type of NMT state is still undefined | 89 | #define EPL_NMT_TYPE_UNDEFINED 0x0000 // type of NMT state is still undefined |
91 | #define EPL_NMT_TYPE_CS 0x0100 // CS type of NMT state | 90 | #define EPL_NMT_TYPE_CS 0x0100 // CS type of NMT state |
92 | #define EPL_NMT_TYPE_MS 0x0200 // MS type of NMT state | 91 | #define EPL_NMT_TYPE_MS 0x0200 // MS type of NMT state |
93 | #define EPL_NMT_TYPE_MASK 0x0300 // mask to select type of NMT state (i.e. CS or MS) | 92 | #define EPL_NMT_TYPE_MASK 0x0300 // mask to select type of NMT state (i.e. CS or MS) |
94 | 93 | ||
95 | //--------------------------------------------------------------------------- | 94 | //--------------------------------------------------------------------------- |
96 | // typedef | 95 | // typedef |
@@ -106,143 +105,126 @@ | |||
106 | // --> there are masks defined to indentify the | 105 | // --> there are masks defined to indentify the |
107 | // super-states | 106 | // super-states |
108 | 107 | ||
109 | typedef enum | 108 | typedef enum { |
110 | { | 109 | kEplNmtGsOff = 0x0000, |
111 | kEplNmtGsOff = 0x0000, | 110 | kEplNmtGsInitialising = 0x0019, |
112 | kEplNmtGsInitialising = 0x0019, | 111 | kEplNmtGsResetApplication = 0x0029, |
113 | kEplNmtGsResetApplication = 0x0029, | 112 | kEplNmtGsResetCommunication = 0x0039, |
114 | kEplNmtGsResetCommunication = 0x0039, | 113 | kEplNmtGsResetConfiguration = 0x0079, |
115 | kEplNmtGsResetConfiguration = 0x0079, | 114 | kEplNmtCsNotActive = 0x011C, |
116 | kEplNmtCsNotActive = 0x011C, | 115 | kEplNmtCsPreOperational1 = 0x011D, |
117 | kEplNmtCsPreOperational1 = 0x011D, | 116 | kEplNmtCsStopped = 0x014D, |
118 | kEplNmtCsStopped = 0x014D, | 117 | kEplNmtCsPreOperational2 = 0x015D, |
119 | kEplNmtCsPreOperational2 = 0x015D, | 118 | kEplNmtCsReadyToOperate = 0x016D, |
120 | kEplNmtCsReadyToOperate = 0x016D, | 119 | kEplNmtCsOperational = 0x01FD, |
121 | kEplNmtCsOperational = 0x01FD, | 120 | kEplNmtCsBasicEthernet = 0x011E, |
122 | kEplNmtCsBasicEthernet = 0x011E, | 121 | kEplNmtMsNotActive = 0x021C, |
123 | kEplNmtMsNotActive = 0x021C, | 122 | kEplNmtMsPreOperational1 = 0x021D, |
124 | kEplNmtMsPreOperational1 = 0x021D, | 123 | kEplNmtMsPreOperational2 = 0x025D, |
125 | kEplNmtMsPreOperational2 = 0x025D, | 124 | kEplNmtMsReadyToOperate = 0x026D, |
126 | kEplNmtMsReadyToOperate = 0x026D, | 125 | kEplNmtMsOperational = 0x02FD, |
127 | kEplNmtMsOperational = 0x02FD, | 126 | kEplNmtMsBasicEthernet = 0x021E |
128 | kEplNmtMsBasicEthernet = 0x021E | ||
129 | |||
130 | } tEplNmtState; | 127 | } tEplNmtState; |
131 | 128 | ||
132 | // NMT-events | 129 | // NMT-events |
133 | typedef enum | 130 | typedef enum { |
134 | { | 131 | // Events from DLL |
135 | // Events from DLL | 132 | // Events defined by EPL V2 specification |
136 | // Events defined by EPL V2 specification | 133 | kEplNmtEventNoEvent = 0x00, |
137 | kEplNmtEventNoEvent = 0x00, | ||
138 | // kEplNmtEventDllMePres = 0x01, | 134 | // kEplNmtEventDllMePres = 0x01, |
139 | kEplNmtEventDllMePresTimeout = 0x02, | 135 | kEplNmtEventDllMePresTimeout = 0x02, |
140 | // kEplNmtEventDllMeAsnd = 0x03, | 136 | // kEplNmtEventDllMeAsnd = 0x03, |
141 | // kEplNmtEventDllMeAsndTimeout = 0x04, | 137 | // kEplNmtEventDllMeAsndTimeout = 0x04, |
142 | kEplNmtEventDllMeSoaSent = 0x04, | 138 | kEplNmtEventDllMeSoaSent = 0x04, |
143 | kEplNmtEventDllMeSocTrig = 0x05, | 139 | kEplNmtEventDllMeSocTrig = 0x05, |
144 | kEplNmtEventDllMeSoaTrig = 0x06, | 140 | kEplNmtEventDllMeSoaTrig = 0x06, |
145 | kEplNmtEventDllCeSoc = 0x07, | 141 | kEplNmtEventDllCeSoc = 0x07, |
146 | kEplNmtEventDllCePreq = 0x08, | 142 | kEplNmtEventDllCePreq = 0x08, |
147 | kEplNmtEventDllCePres = 0x09, | 143 | kEplNmtEventDllCePres = 0x09, |
148 | kEplNmtEventDllCeSoa = 0x0A, | 144 | kEplNmtEventDllCeSoa = 0x0A, |
149 | kEplNmtEventDllCeAsnd = 0x0B, | 145 | kEplNmtEventDllCeAsnd = 0x0B, |
150 | kEplNmtEventDllCeFrameTimeout = 0x0C, | 146 | kEplNmtEventDllCeFrameTimeout = 0x0C, |
151 | 147 | ||
152 | // Events triggered by NMT-Commands | 148 | // Events triggered by NMT-Commands |
153 | kEplNmtEventSwReset = 0x10, // NMT_GT1, NMT_GT2, NMT_GT8 | 149 | kEplNmtEventSwReset = 0x10, // NMT_GT1, NMT_GT2, NMT_GT8 |
154 | kEplNmtEventResetNode = 0x11, | 150 | kEplNmtEventResetNode = 0x11, |
155 | kEplNmtEventResetCom = 0x12, | 151 | kEplNmtEventResetCom = 0x12, |
156 | kEplNmtEventResetConfig = 0x13, | 152 | kEplNmtEventResetConfig = 0x13, |
157 | kEplNmtEventEnterPreOperational2= 0x14, | 153 | kEplNmtEventEnterPreOperational2 = 0x14, |
158 | kEplNmtEventEnableReadyToOperate= 0x15, | 154 | kEplNmtEventEnableReadyToOperate = 0x15, |
159 | kEplNmtEventStartNode = 0x16, // NMT_CT7 | 155 | kEplNmtEventStartNode = 0x16, // NMT_CT7 |
160 | kEplNmtEventStopNode = 0x17, | 156 | kEplNmtEventStopNode = 0x17, |
161 | 157 | ||
162 | // Events triggered by higher layer | 158 | // Events triggered by higher layer |
163 | kEplNmtEventEnterResetApp = 0x20, | 159 | kEplNmtEventEnterResetApp = 0x20, |
164 | kEplNmtEventEnterResetCom = 0x21, | 160 | kEplNmtEventEnterResetCom = 0x21, |
165 | kEplNmtEventInternComError = 0x22, // NMT_GT6, internal communication error -> enter ResetCommunication | 161 | kEplNmtEventInternComError = 0x22, // NMT_GT6, internal communication error -> enter ResetCommunication |
166 | kEplNmtEventEnterResetConfig = 0x23, | 162 | kEplNmtEventEnterResetConfig = 0x23, |
167 | kEplNmtEventEnterCsNotActive = 0x24, | 163 | kEplNmtEventEnterCsNotActive = 0x24, |
168 | kEplNmtEventEnterMsNotActive = 0x25, | 164 | kEplNmtEventEnterMsNotActive = 0x25, |
169 | kEplNmtEventTimerBasicEthernet = 0x26, // NMT_CT3; timer triggered state change (NotActive -> BasicEth) | 165 | kEplNmtEventTimerBasicEthernet = 0x26, // NMT_CT3; timer triggered state change (NotActive -> BasicEth) |
170 | kEplNmtEventTimerMsPreOp1 = 0x27, // enter PreOp1 on MN (NotActive -> MsPreOp1) | 166 | kEplNmtEventTimerMsPreOp1 = 0x27, // enter PreOp1 on MN (NotActive -> MsPreOp1) |
171 | kEplNmtEventNmtCycleError = 0x28, // NMT_CT11, NMT_MT6; error during cycle -> enter PreOp1 | 167 | kEplNmtEventNmtCycleError = 0x28, // NMT_CT11, NMT_MT6; error during cycle -> enter PreOp1 |
172 | kEplNmtEventTimerMsPreOp2 = 0x29, // enter PreOp2 on MN (MsPreOp1 -> MsPreOp2 if kEplNmtEventAllMandatoryCNIdent) | 168 | kEplNmtEventTimerMsPreOp2 = 0x29, // enter PreOp2 on MN (MsPreOp1 -> MsPreOp2 if kEplNmtEventAllMandatoryCNIdent) |
173 | kEplNmtEventAllMandatoryCNIdent = 0x2A, // enter PreOp2 on MN if kEplNmtEventTimerMsPreOp2 | 169 | kEplNmtEventAllMandatoryCNIdent = 0x2A, // enter PreOp2 on MN if kEplNmtEventTimerMsPreOp2 |
174 | kEplNmtEventEnterReadyToOperate = 0x2B, // application ready for the state ReadyToOp | 170 | kEplNmtEventEnterReadyToOperate = 0x2B, // application ready for the state ReadyToOp |
175 | kEplNmtEventEnterMsOperational = 0x2C, // enter Operational on MN | 171 | kEplNmtEventEnterMsOperational = 0x2C, // enter Operational on MN |
176 | kEplNmtEventSwitchOff = 0x2D, // enter state Off | 172 | kEplNmtEventSwitchOff = 0x2D, // enter state Off |
177 | kEplNmtEventCriticalError = 0x2E, // enter state Off because of critical error | 173 | kEplNmtEventCriticalError = 0x2E, // enter state Off because of critical error |
178 | 174 | ||
179 | } tEplNmtEvent; | 175 | } tEplNmtEvent; |
180 | 176 | ||
181 | |||
182 | // type for argument of event kEplEventTypeNmtStateChange | 177 | // type for argument of event kEplEventTypeNmtStateChange |
183 | typedef struct | 178 | typedef struct { |
184 | { | 179 | tEplNmtState m_NewNmtState; |
185 | tEplNmtState m_NewNmtState; | 180 | tEplNmtEvent m_NmtEvent; |
186 | tEplNmtEvent m_NmtEvent; | ||
187 | 181 | ||
188 | } tEplEventNmtStateChange; | 182 | } tEplEventNmtStateChange; |
189 | 183 | ||
190 | |||
191 | // structure for kEplEventTypeHeartbeat | 184 | // structure for kEplEventTypeHeartbeat |
192 | typedef struct | 185 | typedef struct { |
193 | { | 186 | unsigned int m_uiNodeId; // NodeId |
194 | unsigned int m_uiNodeId; // NodeId | 187 | tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN) |
195 | tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN) | 188 | WORD m_wErrorCode; // EPL error code in case of NMT state NotActive |
196 | WORD m_wErrorCode; // EPL error code in case of NMT state NotActive | ||
197 | 189 | ||
198 | } tEplHeartbeatEvent; | 190 | } tEplHeartbeatEvent; |
199 | 191 | ||
200 | 192 | typedef enum { | |
201 | typedef enum | 193 | kEplNmtNodeEventFound = 0x00, |
202 | { | 194 | kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN |
203 | kEplNmtNodeEventFound = 0x00, | 195 | kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration on CN |
204 | kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN | 196 | kEplNmtNodeEventUpdateConf = 0x03, // application / Configuration Manager shall update configuration on CN (check was done by NmtMn module) |
205 | kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration on CN | 197 | kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN |
206 | kEplNmtNodeEventUpdateConf = 0x03, // application / Configuration Manager shall update configuration on CN (check was done by NmtMn module) | 198 | kEplNmtNodeEventReadyToStart = 0x05, // issued if EPL_NMTST_NO_STARTNODE set |
207 | kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN | 199 | // application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually |
208 | kEplNmtNodeEventReadyToStart= 0x05, // issued if EPL_NMTST_NO_STARTNODE set | 200 | kEplNmtNodeEventNmtState = 0x06, |
209 | // application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually | 201 | kEplNmtNodeEventError = 0x07, // NMT error of CN |
210 | kEplNmtNodeEventNmtState = 0x06, | ||
211 | kEplNmtNodeEventError = 0x07, // NMT error of CN | ||
212 | 202 | ||
213 | } tEplNmtNodeEvent; | 203 | } tEplNmtNodeEvent; |
214 | 204 | ||
215 | 205 | typedef enum { | |
216 | typedef enum | 206 | kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound |
217 | { | 207 | kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully |
218 | kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound | 208 | kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully |
219 | kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully | 209 | kEplNmtNodeCommandConfOk = 0x04, // application / Configuration Manager has updated configuration on CN successfully |
220 | kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully | 210 | kEplNmtNodeCommandConfReset = 0x05, // application / Configuration Manager has updated configuration on CN successfully |
221 | kEplNmtNodeCommandConfOk = 0x04, // application / Configuration Manager has updated configuration on CN successfully | 211 | // and CN needs ResetConf so that the configuration gets actived |
222 | kEplNmtNodeCommandConfReset = 0x05, // application / Configuration Manager has updated configuration on CN successfully | 212 | kEplNmtNodeCommandConfErr = 0x06, // application / Configuration Manager failed on updating configuration on CN |
223 | // and CN needs ResetConf so that the configuration gets actived | 213 | kEplNmtNodeCommandStart = 0x07, // if EPL_NMTST_NO_STARTNODE set it must be issued after kEplNmtNodeEventReadyToStart |
224 | kEplNmtNodeCommandConfErr = 0x06, // application / Configuration Manager failed on updating configuration on CN | ||
225 | kEplNmtNodeCommandStart = 0x07, // if EPL_NMTST_NO_STARTNODE set it must be issued after kEplNmtNodeEventReadyToStart | ||
226 | 214 | ||
227 | } tEplNmtNodeCommand; | 215 | } tEplNmtNodeCommand; |
228 | 216 | ||
229 | 217 | typedef enum { | |
230 | typedef enum | 218 | kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible |
231 | { | 219 | kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible |
232 | kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible | 220 | kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible |
233 | kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible | 221 | kEplNmtBootEventOperational = 0x03, // all mandatory CNs are Operational |
234 | kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible | 222 | kEplNmtBootEventError = 0x04, // boot process halted because of an error |
235 | kEplNmtBootEventOperational = 0x03, // all mandatory CNs are Operational | ||
236 | kEplNmtBootEventError = 0x04, // boot process halted because of an error | ||
237 | 223 | ||
238 | } tEplNmtBootEvent; | 224 | } tEplNmtBootEvent; |
239 | 225 | ||
240 | |||
241 | //--------------------------------------------------------------------------- | 226 | //--------------------------------------------------------------------------- |
242 | // function prototypes | 227 | // function prototypes |
243 | //--------------------------------------------------------------------------- | 228 | //--------------------------------------------------------------------------- |
244 | 229 | ||
245 | 230 | #endif // #ifndef _EPLNMT_H_ | |
246 | #endif // #ifndef _EPLNMT_H_ | ||
247 | |||
248 | |||
diff --git a/drivers/staging/epl/EplObd.h b/drivers/staging/epl/EplObd.h index 4adf68009d09..88cc11e34ccd 100644 --- a/drivers/staging/epl/EplObd.h +++ b/drivers/staging/epl/EplObd.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/06/02 k.t.: start of the implementation, version 1.00 | 67 | 2006/06/02 k.t.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #include "EplInc.h" | 71 | #include "EplInc.h" |
@@ -74,7 +73,6 @@ | |||
74 | #ifndef _EPLOBD_H_ | 73 | #ifndef _EPLOBD_H_ |
75 | #define _EPLOBD_H_ | 74 | #define _EPLOBD_H_ |
76 | 75 | ||
77 | |||
78 | // ============================================================================ | 76 | // ============================================================================ |
79 | // defines | 77 | // defines |
80 | // ============================================================================ | 78 | // ============================================================================ |
@@ -97,43 +95,39 @@ | |||
97 | // ============================================================================ | 95 | // ============================================================================ |
98 | 96 | ||
99 | // directions for access to object dictionary | 97 | // directions for access to object dictionary |
100 | typedef enum | 98 | typedef enum { |
101 | { | 99 | kEplObdDirInit = 0x00, // initialising after power on |
102 | kEplObdDirInit = 0x00, // initialising after power on | 100 | kEplObdDirStore = 0x01, // store all object values to non volatile memory |
103 | kEplObdDirStore = 0x01, // store all object values to non volatile memory | 101 | kEplObdDirLoad = 0x02, // load all object values from non volatile memory |
104 | kEplObdDirLoad = 0x02, // load all object values from non volatile memory | 102 | kEplObdDirRestore = 0x03, // deletes non volatile memory (restore) |
105 | kEplObdDirRestore = 0x03, // deletes non volatile memory (restore) | 103 | kEplObdDirOBKCheck = 0xFF // reserved |
106 | kEplObdDirOBKCheck = 0xFF // reserved | 104 | } tEplObdDir; |
107 | |||
108 | }tEplObdDir; | ||
109 | 105 | ||
110 | // commands for store | 106 | // commands for store |
111 | typedef enum | 107 | typedef enum { |
112 | { | 108 | kEplObdCommNothing = 0x00, |
113 | kEplObdCommNothing = 0x00, | 109 | kEplObdCommOpenWrite = 0x01, |
114 | kEplObdCommOpenWrite = 0x01, | 110 | kEplObdCommWriteObj = 0x02, |
115 | kEplObdCommWriteObj = 0x02, | 111 | kEplObdCommCloseWrite = 0x03, |
116 | kEplObdCommCloseWrite = 0x03, | 112 | kEplObdCommOpenRead = 0x04, |
117 | kEplObdCommOpenRead = 0x04, | 113 | kEplObdCommReadObj = 0x05, |
118 | kEplObdCommReadObj = 0x05, | 114 | kEplObdCommCloseRead = 0x06, |
119 | kEplObdCommCloseRead = 0x06, | 115 | kEplObdCommClear = 0x07, |
120 | kEplObdCommClear = 0x07, | 116 | kEplObdCommUnknown = 0xFF |
121 | kEplObdCommUnknown = 0xFF | 117 | } tEplObdCommand; |
122 | }tEplObdCommand; | ||
123 | 118 | ||
124 | //----------------------------------------------------------------------------------------------------------- | 119 | //----------------------------------------------------------------------------------------------------------- |
125 | // events of object callback function | 120 | // events of object callback function |
126 | typedef enum | 121 | typedef enum { |
127 | { | ||
128 | // m_pArg points to | 122 | // m_pArg points to |
129 | // --------------------- | 123 | // --------------------- |
130 | kEplObdEvCheckExist = 0x06, // checking if object does exist (reading and writing) NULL | 124 | kEplObdEvCheckExist = 0x06, // checking if object does exist (reading and writing) NULL |
131 | kEplObdEvPreRead = 0x00, // before reading an object source data buffer in OD | 125 | kEplObdEvPreRead = 0x00, // before reading an object source data buffer in OD |
132 | kEplObdEvPostRead = 0x01, // after reading an object destination data buffer from caller | 126 | kEplObdEvPostRead = 0x01, // after reading an object destination data buffer from caller |
133 | kEplObdEvWrStringDomain = 0x07, // event for changing string/domain data pointer or size struct tEplObdVStringDomain in RAM | 127 | kEplObdEvWrStringDomain = 0x07, // event for changing string/domain data pointer or size struct tEplObdVStringDomain in RAM |
134 | kEplObdEvInitWrite = 0x04, // initializes writing an object (checking object size) size of object in OD (tEplObdSize) | 128 | kEplObdEvInitWrite = 0x04, // initializes writing an object (checking object size) size of object in OD (tEplObdSize) |
135 | kEplObdEvPreWrite = 0x02, // before writing an object source data buffer from caller | 129 | kEplObdEvPreWrite = 0x02, // before writing an object source data buffer from caller |
136 | kEplObdEvPostWrite = 0x03, // after writing an object destination data buffer in OD | 130 | kEplObdEvPostWrite = 0x03, // after writing an object destination data buffer in OD |
137 | // kEplObdEvAbortSdo = 0x05 // after an abort of an SDO transfer | 131 | // kEplObdEvAbortSdo = 0x05 // after an abort of an SDO transfer |
138 | 132 | ||
139 | } tEplObdEvent; | 133 | } tEplObdEvent; |
@@ -141,29 +135,29 @@ typedef enum | |||
141 | // part of OD (bit oriented) | 135 | // part of OD (bit oriented) |
142 | typedef unsigned int tEplObdPart; | 136 | typedef unsigned int tEplObdPart; |
143 | 137 | ||
144 | #define kEplObdPartNo 0x00 // nothing | 138 | #define kEplObdPartNo 0x00 // nothing |
145 | #define kEplObdPartGen 0x01 // part (0x1000 - 0x1FFF) | 139 | #define kEplObdPartGen 0x01 // part (0x1000 - 0x1FFF) |
146 | #define kEplObdPartMan 0x02 // manufacturer part (0x2000 - 0x5FFF) | 140 | #define kEplObdPartMan 0x02 // manufacturer part (0x2000 - 0x5FFF) |
147 | #define kEplObdPartDev 0x04 // device part (0x6000 - 0x9FFF) | 141 | #define kEplObdPartDev 0x04 // device part (0x6000 - 0x9FFF) |
148 | #define kEplObdPartUsr 0x08 // dynamic part e.g. for ICE61131-3 | 142 | #define kEplObdPartUsr 0x08 // dynamic part e.g. for ICE61131-3 |
149 | 143 | ||
150 | // combinations | 144 | // combinations |
151 | #define kEplObdPartApp ( kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // manufacturer and device part (0x2000 - 0x9FFF) and user OD | 145 | #define kEplObdPartApp ( kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // manufacturer and device part (0x2000 - 0x9FFF) and user OD |
152 | #define kEplObdPartAll (kEplObdPartGen | kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // whole OD | 146 | #define kEplObdPartAll (kEplObdPartGen | kEplObdPartMan | kEplObdPartDev | kEplObdPartUsr) // whole OD |
153 | 147 | ||
154 | //----------------------------------------------------------------------------------------------------------- | 148 | //----------------------------------------------------------------------------------------------------------- |
155 | // access types for objects | 149 | // access types for objects |
156 | // must be a difine because bit-flags | 150 | // must be a difine because bit-flags |
157 | typedef unsigned int tEplObdAccess; | 151 | typedef unsigned int tEplObdAccess; |
158 | 152 | ||
159 | #define kEplObdAccRead 0x01 // object can be read | 153 | #define kEplObdAccRead 0x01 // object can be read |
160 | #define kEplObdAccWrite 0x02 // object can be written | 154 | #define kEplObdAccWrite 0x02 // object can be written |
161 | #define kEplObdAccConst 0x04 // object contains a constant value | 155 | #define kEplObdAccConst 0x04 // object contains a constant value |
162 | #define kEplObdAccPdo 0x08 // object can be mapped in a PDO | 156 | #define kEplObdAccPdo 0x08 // object can be mapped in a PDO |
163 | #define kEplObdAccArray 0x10 // object contains an array of numerical values | 157 | #define kEplObdAccArray 0x10 // object contains an array of numerical values |
164 | #define kEplObdAccRange 0x20 // object contains lower and upper limit | 158 | #define kEplObdAccRange 0x20 // object contains lower and upper limit |
165 | #define kEplObdAccVar 0x40 // object data is placed in application | 159 | #define kEplObdAccVar 0x40 // object data is placed in application |
166 | #define kEplObdAccStore 0x80 // object data can be stored to non volatile memory | 160 | #define kEplObdAccStore 0x80 // object data can be stored to non volatile memory |
167 | 161 | ||
168 | // combinations (not all combinations are required) | 162 | // combinations (not all combinations are required) |
169 | #define kEplObdAccR (0 | 0 | 0 | 0 | 0 | 0 | kEplObdAccRead) | 163 | #define kEplObdAccR (0 | 0 | 0 | 0 | 0 | 0 | kEplObdAccRead) |
@@ -205,10 +199,7 @@ typedef unsigned int tEplObdAccess; | |||
205 | #define kEplObdAccSVGPW (kEplObdAccStore | kEplObdAccVar | kEplObdAccRange | kEplObdAccPdo | 0 | kEplObdAccWrite | 0 ) | 199 | #define kEplObdAccSVGPW (kEplObdAccStore | kEplObdAccVar | kEplObdAccRange | kEplObdAccPdo | 0 | kEplObdAccWrite | 0 ) |
206 | #define kEplObdAccSVGPRW (kEplObdAccStore | kEplObdAccVar | kEplObdAccRange | kEplObdAccPdo | 0 | kEplObdAccWrite | kEplObdAccRead) | 200 | #define kEplObdAccSVGPRW (kEplObdAccStore | kEplObdAccVar | kEplObdAccRange | kEplObdAccPdo | 0 | kEplObdAccWrite | kEplObdAccRead) |
207 | 201 | ||
208 | 202 | typedef unsigned int tEplObdSize; // For all objects as objects size are used an unsigned int. | |
209 | |||
210 | typedef unsigned int tEplObdSize; // For all objects as objects size are used an unsigned int. | ||
211 | |||
212 | 203 | ||
213 | // ------------------------------------------------------------------------- | 204 | // ------------------------------------------------------------------------- |
214 | // types for data types defined in DS301 | 205 | // types for data types defined in DS301 |
@@ -216,108 +207,99 @@ typedef unsigned int tEplObdSize; // For all objects as objects size are used an | |||
216 | 207 | ||
217 | // types of objects in object dictionary | 208 | // types of objects in object dictionary |
218 | // DS-301 defines these types as WORD | 209 | // DS-301 defines these types as WORD |
219 | typedef enum | 210 | typedef enum { |
220 | { | ||
221 | // types which are always supported | 211 | // types which are always supported |
222 | kEplObdTypBool = 0x0001, | 212 | kEplObdTypBool = 0x0001, |
223 | 213 | ||
224 | kEplObdTypInt8 = 0x0002, | 214 | kEplObdTypInt8 = 0x0002, |
225 | kEplObdTypInt16 = 0x0003, | 215 | kEplObdTypInt16 = 0x0003, |
226 | kEplObdTypInt32 = 0x0004, | 216 | kEplObdTypInt32 = 0x0004, |
227 | kEplObdTypUInt8 = 0x0005, | 217 | kEplObdTypUInt8 = 0x0005, |
228 | kEplObdTypUInt16 = 0x0006, | 218 | kEplObdTypUInt16 = 0x0006, |
229 | kEplObdTypUInt32 = 0x0007, | 219 | kEplObdTypUInt32 = 0x0007, |
230 | kEplObdTypReal32 = 0x0008, | 220 | kEplObdTypReal32 = 0x0008, |
231 | kEplObdTypVString = 0x0009, | 221 | kEplObdTypVString = 0x0009, |
232 | kEplObdTypOString = 0x000A, | 222 | kEplObdTypOString = 0x000A, |
233 | kEplObdTypDomain = 0x000F, | 223 | kEplObdTypDomain = 0x000F, |
234 | 224 | ||
235 | kEplObdTypInt24 = 0x0010, | 225 | kEplObdTypInt24 = 0x0010, |
236 | kEplObdTypUInt24 = 0x0016, | 226 | kEplObdTypUInt24 = 0x0016, |
237 | 227 | ||
238 | kEplObdTypReal64 = 0x0011, | 228 | kEplObdTypReal64 = 0x0011, |
239 | kEplObdTypInt40 = 0x0012, | 229 | kEplObdTypInt40 = 0x0012, |
240 | kEplObdTypInt48 = 0x0013, | 230 | kEplObdTypInt48 = 0x0013, |
241 | kEplObdTypInt56 = 0x0014, | 231 | kEplObdTypInt56 = 0x0014, |
242 | kEplObdTypInt64 = 0x0015, | 232 | kEplObdTypInt64 = 0x0015, |
243 | kEplObdTypUInt40 = 0x0018, | 233 | kEplObdTypUInt40 = 0x0018, |
244 | kEplObdTypUInt48 = 0x0019, | 234 | kEplObdTypUInt48 = 0x0019, |
245 | kEplObdTypUInt56 = 0x001A, | 235 | kEplObdTypUInt56 = 0x001A, |
246 | kEplObdTypUInt64 = 0x001B, | 236 | kEplObdTypUInt64 = 0x001B, |
247 | kEplObdTypTimeOfDay = 0x000C, | 237 | kEplObdTypTimeOfDay = 0x000C, |
248 | kEplObdTypTimeDiff = 0x000D | 238 | kEplObdTypTimeDiff = 0x000D |
249 | 239 | } tEplObdType; | |
250 | }tEplObdType; | ||
251 | // other types are not supported in this version | 240 | // other types are not supported in this version |
252 | 241 | ||
253 | |||
254 | // ------------------------------------------------------------------------- | 242 | // ------------------------------------------------------------------------- |
255 | // types for data types defined in DS301 | 243 | // types for data types defined in DS301 |
256 | // ------------------------------------------------------------------------- | 244 | // ------------------------------------------------------------------------- |
257 | 245 | ||
258 | typedef unsigned char tEplObdBoolean; // 0001 | 246 | typedef unsigned char tEplObdBoolean; // 0001 |
259 | typedef signed char tEplObdInteger8; // 0002 | 247 | typedef signed char tEplObdInteger8; // 0002 |
260 | typedef signed short int tEplObdInteger16; // 0003 | 248 | typedef signed short int tEplObdInteger16; // 0003 |
261 | typedef signed long tEplObdInteger32; // 0004 | 249 | typedef signed long tEplObdInteger32; // 0004 |
262 | typedef unsigned char tEplObdUnsigned8; // 0005 | 250 | typedef unsigned char tEplObdUnsigned8; // 0005 |
263 | typedef unsigned short int tEplObdUnsigned16; // 0006 | 251 | typedef unsigned short int tEplObdUnsigned16; // 0006 |
264 | typedef unsigned long tEplObdUnsigned32; // 0007 | 252 | typedef unsigned long tEplObdUnsigned32; // 0007 |
265 | typedef float tEplObdReal32; // 0008 | 253 | typedef float tEplObdReal32; // 0008 |
266 | typedef unsigned char tEplObdDomain; // 000F | 254 | typedef unsigned char tEplObdDomain; // 000F |
267 | typedef signed long tEplObdInteger24; // 0010 | 255 | typedef signed long tEplObdInteger24; // 0010 |
268 | typedef unsigned long tEplObdUnsigned24; // 0016 | 256 | typedef unsigned long tEplObdUnsigned24; // 0016 |
269 | 257 | ||
270 | typedef signed QWORD tEplObdInteger40; // 0012 | 258 | typedef signed QWORD tEplObdInteger40; // 0012 |
271 | typedef signed QWORD tEplObdInteger48; // 0013 | 259 | typedef signed QWORD tEplObdInteger48; // 0013 |
272 | typedef signed QWORD tEplObdInteger56; // 0014 | 260 | typedef signed QWORD tEplObdInteger56; // 0014 |
273 | typedef signed QWORD tEplObdInteger64; // 0015 | 261 | typedef signed QWORD tEplObdInteger64; // 0015 |
274 | 262 | ||
275 | typedef unsigned QWORD tEplObdUnsigned40; // 0018 | 263 | typedef unsigned QWORD tEplObdUnsigned40; // 0018 |
276 | typedef unsigned QWORD tEplObdUnsigned48; // 0019 | 264 | typedef unsigned QWORD tEplObdUnsigned48; // 0019 |
277 | typedef unsigned QWORD tEplObdUnsigned56; // 001A | 265 | typedef unsigned QWORD tEplObdUnsigned56; // 001A |
278 | typedef unsigned QWORD tEplObdUnsigned64; // 001B | 266 | typedef unsigned QWORD tEplObdUnsigned64; // 001B |
279 | 267 | ||
280 | typedef double tEplObdReal64; // 0011 | 268 | typedef double tEplObdReal64; // 0011 |
281 | 269 | ||
282 | typedef tTimeOfDay tEplObdTimeOfDay; // 000C | 270 | typedef tTimeOfDay tEplObdTimeOfDay; // 000C |
283 | typedef tTimeOfDay tEplObdTimeDifference; // 000D | 271 | typedef tTimeOfDay tEplObdTimeDifference; // 000D |
284 | |||
285 | 272 | ||
286 | // ------------------------------------------------------------------------- | 273 | // ------------------------------------------------------------------------- |
287 | // structur for defining a variable | 274 | // structur for defining a variable |
288 | // ------------------------------------------------------------------------- | 275 | // ------------------------------------------------------------------------- |
289 | // ------------------------------------------------------------------------- | 276 | // ------------------------------------------------------------------------- |
290 | typedef enum | 277 | typedef enum { |
291 | { | 278 | kVarValidSize = 0x01, |
292 | kVarValidSize = 0x01, | 279 | kVarValidData = 0x02, |
293 | kVarValidData = 0x02, | ||
294 | // kVarValidCallback = 0x04, | 280 | // kVarValidCallback = 0x04, |
295 | // kVarValidArg = 0x08, | 281 | // kVarValidArg = 0x08, |
296 | 282 | ||
297 | kVarValidAll = 0x03 // currently only size and data are implemented and used | 283 | kVarValidAll = 0x03 // currently only size and data are implemented and used |
298 | 284 | } tEplVarParamValid; | |
299 | }tEplVarParamValid; | ||
300 | |||
301 | 285 | ||
302 | typedef tEplKernel (PUBLIC ROM* tEplVarCallback) (CCM_DECL_INSTANCE_HDL_ | 286 | typedef tEplKernel(PUBLIC ROM * tEplVarCallback) (CCM_DECL_INSTANCE_HDL_ |
303 | void * pParam_p); | 287 | void *pParam_p); |
304 | 288 | ||
305 | typedef struct | 289 | typedef struct { |
306 | { | 290 | tEplVarParamValid m_ValidFlag; |
307 | tEplVarParamValid m_ValidFlag; | 291 | unsigned int m_uiIndex; |
308 | unsigned int m_uiIndex; | 292 | unsigned int m_uiSubindex; |
309 | unsigned int m_uiSubindex; | 293 | tEplObdSize m_Size; |
310 | tEplObdSize m_Size; | 294 | void MEM *m_pData; |
311 | void MEM* m_pData; | ||
312 | // tEplVarCallback m_fpCallback; | 295 | // tEplVarCallback m_fpCallback; |
313 | // void * m_pArg; | 296 | // void * m_pArg; |
314 | 297 | ||
315 | } tEplVarParam; | 298 | } tEplVarParam; |
316 | 299 | ||
317 | typedef struct | 300 | typedef struct { |
318 | { | 301 | void MEM *m_pData; |
319 | void MEM* m_pData; | 302 | tEplObdSize m_Size; |
320 | tEplObdSize m_Size; | ||
321 | /* | 303 | /* |
322 | #if (EPL_PDO_USE_STATIC_MAPPING == FALSE) | 304 | #if (EPL_PDO_USE_STATIC_MAPPING == FALSE) |
323 | tEplVarCallback m_fpCallback; | 305 | tEplVarCallback m_fpCallback; |
@@ -326,45 +308,38 @@ typedef struct | |||
326 | */ | 308 | */ |
327 | } tEplObdVarEntry; | 309 | } tEplObdVarEntry; |
328 | 310 | ||
329 | typedef struct | 311 | typedef struct { |
330 | { | 312 | tEplObdSize m_Size; |
331 | tEplObdSize m_Size; | 313 | BYTE *m_pString; |
332 | BYTE * m_pString; | ||
333 | 314 | ||
334 | } tEplObdOString; // 000C | 315 | } tEplObdOString; // 000C |
335 | 316 | ||
336 | typedef struct | 317 | typedef struct { |
337 | { | 318 | tEplObdSize m_Size; |
338 | tEplObdSize m_Size; | 319 | char *m_pString; |
339 | char * m_pString; | 320 | } tEplObdVString; // 000D |
340 | } tEplObdVString; // 000D | ||
341 | 321 | ||
342 | 322 | typedef struct { | |
343 | typedef struct | 323 | tEplObdSize m_Size; |
344 | { | 324 | char *m_pDefString; // $$$ d.k. it is unused, so we could delete it |
345 | tEplObdSize m_Size; | 325 | char *m_pString; |
346 | char * m_pDefString; // $$$ d.k. it is unused, so we could delete it | ||
347 | char * m_pString; | ||
348 | 326 | ||
349 | } tEplObdVStringDef; | 327 | } tEplObdVStringDef; |
350 | 328 | ||
351 | typedef struct | 329 | typedef struct { |
352 | { | 330 | tEplObdSize m_Size; |
353 | tEplObdSize m_Size; | 331 | BYTE *m_pDefString; // $$$ d.k. it is unused, so we could delete it |
354 | BYTE * m_pDefString; // $$$ d.k. it is unused, so we could delete it | 332 | BYTE *m_pString; |
355 | BYTE * m_pString; | ||
356 | 333 | ||
357 | } tEplObdOStringDef; | 334 | } tEplObdOStringDef; |
358 | 335 | ||
359 | //r.d. parameter struct for changing object size and/or pointer to data of Strings or Domains | 336 | //r.d. parameter struct for changing object size and/or pointer to data of Strings or Domains |
360 | typedef struct | 337 | typedef struct { |
361 | { | 338 | tEplObdSize m_DownloadSize; // download size from SDO or APP |
362 | tEplObdSize m_DownloadSize; // download size from SDO or APP | 339 | tEplObdSize m_ObjSize; // current object size from OD - should be changed from callback function |
363 | tEplObdSize m_ObjSize; // current object size from OD - should be changed from callback function | 340 | void *m_pData; // current object ptr from OD - should be changed from callback function |
364 | void * m_pData; // current object ptr from OD - should be changed from callback function | ||
365 | |||
366 | } tEplObdVStringDomain; // 000D | ||
367 | 341 | ||
342 | } tEplObdVStringDomain; // 000D | ||
368 | 343 | ||
369 | // ============================================================================ | 344 | // ============================================================================ |
370 | // types | 345 | // types |
@@ -374,131 +349,116 @@ typedef struct | |||
374 | // ------------------------------------------------------------------------- | 349 | // ------------------------------------------------------------------------- |
375 | 350 | ||
376 | // Change not the order for this struct!!! | 351 | // Change not the order for this struct!!! |
377 | typedef struct | 352 | typedef struct { |
378 | { | 353 | unsigned int m_uiSubIndex; |
379 | unsigned int m_uiSubIndex; | 354 | tEplObdType m_Type; |
380 | tEplObdType m_Type; | 355 | tEplObdAccess m_Access; |
381 | tEplObdAccess m_Access; | 356 | void *m_pDefault; |
382 | void * m_pDefault; | 357 | void MEM *m_pCurrent; // points always to RAM |
383 | void MEM* m_pCurrent; // points always to RAM | ||
384 | 358 | ||
385 | } tEplObdSubEntry; | 359 | } tEplObdSubEntry; |
386 | 360 | ||
387 | // r.d.: has always to be because new OBD-Macros for arrays | 361 | // r.d.: has always to be because new OBD-Macros for arrays |
388 | typedef tEplObdSubEntry * tEplObdSubEntryPtr; | 362 | typedef tEplObdSubEntry *tEplObdSubEntryPtr; |
389 | 363 | ||
390 | // ------------------------------------------------------------------------- | 364 | // ------------------------------------------------------------------------- |
391 | // callback function for objdictionary modul | 365 | // callback function for objdictionary modul |
392 | // ------------------------------------------------------------------------- | 366 | // ------------------------------------------------------------------------- |
393 | 367 | ||
394 | // parameters for callback function | 368 | // parameters for callback function |
395 | typedef struct | 369 | typedef struct { |
396 | { | 370 | tEplObdEvent m_ObdEvent; |
397 | tEplObdEvent m_ObdEvent; | 371 | unsigned int m_uiIndex; |
398 | unsigned int m_uiIndex; | 372 | unsigned int m_uiSubIndex; |
399 | unsigned int m_uiSubIndex; | 373 | void *m_pArg; |
400 | void * m_pArg; | 374 | DWORD m_dwAbortCode; |
401 | DWORD m_dwAbortCode; | ||
402 | 375 | ||
403 | } tEplObdCbParam; | 376 | } tEplObdCbParam; |
404 | 377 | ||
405 | // define type for callback function: pParam_p points to tEplObdCbParam | 378 | // define type for callback function: pParam_p points to tEplObdCbParam |
406 | typedef tEplKernel (PUBLIC ROM* tEplObdCallback) (CCM_DECL_INSTANCE_HDL_ | 379 | typedef tEplKernel(PUBLIC ROM * tEplObdCallback) (CCM_DECL_INSTANCE_HDL_ |
407 | tEplObdCbParam MEM* pParam_p); | 380 | tEplObdCbParam MEM * |
381 | pParam_p); | ||
408 | 382 | ||
409 | // do not change the order for this struct!!! | 383 | // do not change the order for this struct!!! |
410 | 384 | ||
411 | typedef struct | 385 | typedef struct { |
412 | { | 386 | unsigned int m_uiIndex; |
413 | unsigned int m_uiIndex; | 387 | tEplObdSubEntryPtr m_pSubIndex; |
414 | tEplObdSubEntryPtr m_pSubIndex; | 388 | unsigned int m_uiCount; |
415 | unsigned int m_uiCount; | 389 | tEplObdCallback m_fpCallback; // function is called back if object access |
416 | tEplObdCallback m_fpCallback; // function is called back if object access | ||
417 | 390 | ||
418 | } tEplObdEntry; | 391 | } tEplObdEntry; |
419 | 392 | ||
420 | |||
421 | // allways pointer | 393 | // allways pointer |
422 | typedef tEplObdEntry * tEplObdEntryPtr; | 394 | typedef tEplObdEntry *tEplObdEntryPtr; |
423 | |||
424 | |||
425 | 395 | ||
426 | // ------------------------------------------------------------------------- | 396 | // ------------------------------------------------------------------------- |
427 | // structur to initialize OBD module | 397 | // structur to initialize OBD module |
428 | // ------------------------------------------------------------------------- | 398 | // ------------------------------------------------------------------------- |
429 | 399 | ||
430 | typedef struct | 400 | typedef struct { |
431 | { | 401 | tEplObdEntryPtr m_pPart; |
432 | tEplObdEntryPtr m_pPart; | 402 | tEplObdEntryPtr m_pManufacturerPart; |
433 | tEplObdEntryPtr m_pManufacturerPart; | 403 | tEplObdEntryPtr m_pDevicePart; |
434 | tEplObdEntryPtr m_pDevicePart; | ||
435 | 404 | ||
436 | #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) | 405 | #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) |
437 | 406 | ||
438 | tEplObdEntryPtr m_pUserPart; | 407 | tEplObdEntryPtr m_pUserPart; |
439 | 408 | ||
440 | #endif | 409 | #endif |
441 | 410 | ||
442 | } tEplObdInitParam; | 411 | } tEplObdInitParam; |
443 | 412 | ||
444 | |||
445 | // ------------------------------------------------------------------------- | 413 | // ------------------------------------------------------------------------- |
446 | // structur for parameters of STORE RESTORE command | 414 | // structur for parameters of STORE RESTORE command |
447 | // ------------------------------------------------------------------------- | 415 | // ------------------------------------------------------------------------- |
448 | 416 | ||
449 | typedef struct | 417 | typedef struct { |
450 | { | 418 | tEplObdCommand m_bCommand; |
451 | tEplObdCommand m_bCommand; | 419 | tEplObdPart m_bCurrentOdPart; |
452 | tEplObdPart m_bCurrentOdPart; | 420 | void MEM *m_pData; |
453 | void MEM* m_pData; | 421 | tEplObdSize m_ObjSize; |
454 | tEplObdSize m_ObjSize; | ||
455 | 422 | ||
456 | } tEplObdCbStoreParam; | 423 | } tEplObdCbStoreParam; |
457 | 424 | ||
425 | typedef tEplKernel(PUBLIC ROM * tInitTabEntryCallback) (void MEM * pTabEntry_p, | ||
426 | unsigned int | ||
427 | uiObjIndex_p); | ||
458 | 428 | ||
459 | typedef tEplKernel (PUBLIC ROM* tInitTabEntryCallback) ( | 429 | typedef tEplKernel(PUBLIC ROM * |
460 | void MEM* pTabEntry_p, | 430 | tEplObdStoreLoadObjCallback) (CCM_DECL_INSTANCE_HDL_ |
461 | unsigned int uiObjIndex_p); | 431 | tEplObdCbStoreParam MEM * |
462 | 432 | pCbStoreParam_p); | |
463 | typedef tEplKernel (PUBLIC ROM* tEplObdStoreLoadObjCallback) (CCM_DECL_INSTANCE_HDL_ | ||
464 | tEplObdCbStoreParam MEM* pCbStoreParam_p); | ||
465 | 433 | ||
466 | // ------------------------------------------------------------------------- | 434 | // ------------------------------------------------------------------------- |
467 | // this stucture is used for parameters for function ObdInitModuleTab() | 435 | // this stucture is used for parameters for function ObdInitModuleTab() |
468 | // ------------------------------------------------------------------------- | 436 | // ------------------------------------------------------------------------- |
469 | typedef struct | 437 | typedef struct { |
470 | { | 438 | unsigned int m_uiLowerObjIndex; // lower limit of ObjIndex |
471 | unsigned int m_uiLowerObjIndex; // lower limit of ObjIndex | 439 | unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex |
472 | unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex | 440 | tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found |
473 | tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found | 441 | void MEM *m_pTabBase; // base address of table |
474 | void MEM* m_pTabBase; // base address of table | 442 | unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from BYTE to WORD necessary for PDO bit mapping |
475 | unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from BYTE to WORD necessary for PDO bit mapping | 443 | unsigned int m_uiMaxEntries; // max. tabel entries |
476 | unsigned int m_uiMaxEntries; // max. tabel entries | ||
477 | 444 | ||
478 | } tEplObdModulTabParam; | 445 | } tEplObdModulTabParam; |
479 | 446 | ||
480 | //------------------------------------------------------------------- | 447 | //------------------------------------------------------------------- |
481 | // enum for function EplObdSetNodeId | 448 | // enum for function EplObdSetNodeId |
482 | //------------------------------------------------------------------- | 449 | //------------------------------------------------------------------- |
483 | typedef enum | 450 | typedef enum { |
484 | { | 451 | kEplObdNodeIdUnknown = 0x00, // unknown how the node id was set |
485 | kEplObdNodeIdUnknown = 0x00, // unknown how the node id was set | 452 | kEplObdNodeIdSoftware = 0x01, // node id set by software |
486 | kEplObdNodeIdSoftware = 0x01, // node id set by software | 453 | kEplObdNodeIdHardware = 0x02 // node id set by hardware |
487 | kEplObdNodeIdHardware = 0x02 // node id set by hardware | 454 | } tEplObdNodeIdType; |
488 | |||
489 | }tEplObdNodeIdType; | ||
490 | 455 | ||
491 | // ============================================================================ | 456 | // ============================================================================ |
492 | // global variables | 457 | // global variables |
493 | // ============================================================================ | 458 | // ============================================================================ |
494 | 459 | ||
495 | |||
496 | |||
497 | // ============================================================================ | 460 | // ============================================================================ |
498 | // public functions | 461 | // public functions |
499 | // ============================================================================ | 462 | // ============================================================================ |
500 | 463 | ||
501 | 464 | #endif // #ifndef _EPLOBD_H_ | |
502 | #endif // #ifndef _EPLOBD_H_ | ||
503 | |||
504 | |||
diff --git a/drivers/staging/epl/EplObdMacro.h b/drivers/staging/epl/EplObdMacro.h index c15c36064ec7..23f2ad80dde8 100644 --- a/drivers/staging/epl/EplObdMacro.h +++ b/drivers/staging/epl/EplObdMacro.h | |||
@@ -67,11 +67,8 @@ | |||
67 | 2006/06/05 k.t.: start of the implementation | 67 | 2006/06/05 k.t.: start of the implementation |
68 | -> based on CANopen ObdMacro.h | 68 | -> based on CANopen ObdMacro.h |
69 | 69 | ||
70 | |||
71 | |||
72 | ****************************************************************************/ | 70 | ****************************************************************************/ |
73 | 71 | ||
74 | |||
75 | //--------------------------------------------------------------------------- | 72 | //--------------------------------------------------------------------------- |
76 | // const defines | 73 | // const defines |
77 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
@@ -79,284 +76,279 @@ | |||
79 | #if defined (EPL_OBD_DEFINE_MACRO) | 76 | #if defined (EPL_OBD_DEFINE_MACRO) |
80 | 77 | ||
81 | //------------------------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------------------------- |
82 | #if defined (EPL_OBD_CREATE_ROM_DATA) | 79 | #if defined (EPL_OBD_CREATE_ROM_DATA) |
83 | 80 | ||
84 | // #pragma message ("EPL_OBD_CREATE_ROM_DATA") | 81 | // #pragma message ("EPL_OBD_CREATE_ROM_DATA") |
85 | 82 | ||
86 | #define EPL_OBD_BEGIN() static DWORD dwObd_OBK_g = 0x0000; | 83 | #define EPL_OBD_BEGIN() static DWORD dwObd_OBK_g = 0x0000; |
87 | #define EPL_OBD_END() | 84 | #define EPL_OBD_END() |
88 | 85 | ||
89 | //--------------------------------------------------------------------------------------- | 86 | //--------------------------------------------------------------------------------------- |
90 | #define EPL_OBD_BEGIN_PART_GENERIC() | 87 | #define EPL_OBD_BEGIN_PART_GENERIC() |
91 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() | 88 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() |
92 | #define EPL_OBD_BEGIN_PART_DEVICE() | 89 | #define EPL_OBD_BEGIN_PART_DEVICE() |
93 | #define EPL_OBD_END_PART() | 90 | #define EPL_OBD_END_PART() |
94 | 91 | ||
95 | //--------------------------------------------------------------------------------------- | 92 | //--------------------------------------------------------------------------------------- |
96 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) | 93 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) |
97 | #define EPL_OBD_END_INDEX(ind) | 94 | #define EPL_OBD_END_INDEX(ind) |
98 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ | 95 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ |
99 | static dtyp xDef##ind##_0x01_g = (def); | 96 | static dtyp xDef##ind##_0x01_g = (def); |
100 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ | 97 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); \ |
101 | static dtyp xDef##ind##_0x01_g = (def); | 98 | static dtyp xDef##ind##_0x01_g = (def); |
102 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); | 99 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdUnsigned8 xDef##ind##_0x00_g = (cnt); |
103 | 100 | ||
104 | //--------------------------------------------------------------------------------------- | 101 | //--------------------------------------------------------------------------------------- |
105 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; | 102 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; |
106 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; | 103 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; |
107 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) | 104 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) |
108 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char MEM szCur##ind##_##sub##_g[size+1]; \ | 105 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char MEM szCur##ind##_##sub##_g[size+1]; \ |
109 | static tEplObdVStringDef xDef##ind##_##sub##_g = {size, val, szCur##ind##_##sub##_g}; | 106 | static tEplObdVStringDef xDef##ind##_##sub##_g = {size, val, szCur##ind##_##sub##_g}; |
110 | 107 | ||
111 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE MEM bCur##ind##_##sub##_g[size]; \ | 108 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE MEM bCur##ind##_##sub##_g[size]; \ |
112 | static tEplObdOStringDef xDef##ind##_##sub##_g = {size, ((BYTE*)""), bCur##ind##_##sub##_g}; | 109 | static tEplObdOStringDef xDef##ind##_##sub##_g = {size, ((BYTE*)""), bCur##ind##_##sub##_g}; |
113 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) | 110 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) |
114 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; | 111 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; |
115 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; | 112 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; |
116 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) | 113 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) |
117 | 114 | ||
118 | //------------------------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------------------------- |
119 | #elif defined (EPL_OBD_CREATE_RAM_DATA) | 116 | #elif defined (EPL_OBD_CREATE_RAM_DATA) |
120 | 117 | ||
121 | // #pragma message ("EPL_OBD_CREATE_RAM_DATA") | 118 | // #pragma message ("EPL_OBD_CREATE_RAM_DATA") |
122 | 119 | ||
123 | #define EPL_OBD_BEGIN() | 120 | #define EPL_OBD_BEGIN() |
124 | #define EPL_OBD_END() | 121 | #define EPL_OBD_END() |
125 | 122 | ||
126 | //--------------------------------------------------------------------------------------- | 123 | //--------------------------------------------------------------------------------------- |
127 | #define EPL_OBD_BEGIN_PART_GENERIC() | 124 | #define EPL_OBD_BEGIN_PART_GENERIC() |
128 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() | 125 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() |
129 | #define EPL_OBD_BEGIN_PART_DEVICE() | 126 | #define EPL_OBD_BEGIN_PART_DEVICE() |
130 | #define EPL_OBD_END_PART() | 127 | #define EPL_OBD_END_PART() |
131 | 128 | ||
132 | //--------------------------------------------------------------------------------------- | 129 | //--------------------------------------------------------------------------------------- |
133 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) | 130 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) |
134 | #define EPL_OBD_END_INDEX(ind) | 131 | #define EPL_OBD_END_INDEX(ind) |
135 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static dtyp MEM axCur##ind##_g[cnt]; | 132 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static dtyp MEM axCur##ind##_g[cnt]; |
136 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; | 133 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; |
137 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; | 134 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdVarEntry MEM aVarEntry##ind##_g[cnt]; |
138 | 135 | ||
139 | //--------------------------------------------------------------------------------------- | 136 | //--------------------------------------------------------------------------------------- |
140 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp MEM xCur##ind##_##sub##_g; | 137 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) static dtyp MEM xCur##ind##_##sub##_g; |
141 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp MEM xCur##ind##_##sub##_g; | 138 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp MEM xCur##ind##_##sub##_g; |
142 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static tEplObdVString MEM xCur##ind##_##sub##_g; | 139 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static tEplObdVString MEM xCur##ind##_##sub##_g; |
143 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static tEplObdOString MEM xCur##ind##_##sub##_g; | 140 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static tEplObdOString MEM xCur##ind##_##sub##_g; |
144 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) static dtyp MEM xCur##ind##_##sub##_g; | 141 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) static dtyp MEM xCur##ind##_##sub##_g; |
145 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; | 142 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; |
146 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; | 143 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; |
147 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; | 144 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; |
148 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; | 145 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) static tEplObdVarEntry MEM VarEntry##ind##_##sub##_g; |
149 | 146 | ||
150 | //------------------------------------------------------------------------------------------- | 147 | //------------------------------------------------------------------------------------------- |
151 | #elif defined (EPL_OBD_CREATE_SUBINDEX_TAB) | 148 | #elif defined (EPL_OBD_CREATE_SUBINDEX_TAB) |
152 | 149 | ||
153 | // #pragma message ("EPL_OBD_CREATE_SUBINDEX_TAB") | 150 | // #pragma message ("EPL_OBD_CREATE_SUBINDEX_TAB") |
154 | 151 | ||
155 | #define EPL_OBD_BEGIN() | 152 | #define EPL_OBD_BEGIN() |
156 | #define EPL_OBD_END() | 153 | #define EPL_OBD_END() |
157 | 154 | ||
158 | //--------------------------------------------------------------------------------------- | 155 | //--------------------------------------------------------------------------------------- |
159 | #define EPL_OBD_BEGIN_PART_GENERIC() | 156 | #define EPL_OBD_BEGIN_PART_GENERIC() |
160 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() | 157 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() |
161 | #define EPL_OBD_BEGIN_PART_DEVICE() | 158 | #define EPL_OBD_BEGIN_PART_DEVICE() |
162 | #define EPL_OBD_END_PART() | 159 | #define EPL_OBD_END_PART() |
163 | 160 | ||
164 | //--------------------------------------------------------------------------------------- | 161 | //--------------------------------------------------------------------------------------- |
165 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[cnt]= { | 162 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[cnt]= { |
166 | #define EPL_OBD_END_INDEX(ind) EPL_OBD_END_SUBINDEX()}; | 163 | #define EPL_OBD_END_INDEX(ind) EPL_OBD_END_SUBINDEX()}; |
167 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ | 164 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ |
168 | {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ | 165 | {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ |
169 | {1, typ, (acc)|kEplObdAccArray, &xDef##ind##_0x01_g, &axCur##ind##_g[0]}, \ | 166 | {1, typ, (acc)|kEplObdAccArray, &xDef##ind##_0x01_g, &axCur##ind##_g[0]}, \ |
170 | EPL_OBD_END_SUBINDEX()}; | 167 | EPL_OBD_END_SUBINDEX()}; |
171 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ | 168 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ |
172 | {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ | 169 | {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ |
173 | {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, &xDef##ind##_0x01_g, &aVarEntry##ind##_g[0]}, \ | 170 | {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, &xDef##ind##_0x01_g, &aVarEntry##ind##_g[0]}, \ |
174 | EPL_OBD_END_SUBINDEX()}; | 171 | EPL_OBD_END_SUBINDEX()}; |
175 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ | 172 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) static tEplObdSubEntry MEM aObdSubEntry##ind##Ram_g[]= { \ |
176 | {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ | 173 | {0, kEplObdTypUInt8, kEplObdAccCR, &xDef##ind##_0x00_g, NULL}, \ |
177 | {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, NULL, &aVarEntry##ind##_g[0]}, \ | 174 | {1, typ, (acc)|kEplObdAccArray|kEplObdAccVar, NULL, &aVarEntry##ind##_g[0]}, \ |
178 | EPL_OBD_END_SUBINDEX()}; | 175 | EPL_OBD_END_SUBINDEX()}; |
179 | 176 | ||
180 | //--------------------------------------------------------------------------------------- | 177 | //--------------------------------------------------------------------------------------- |
181 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc), &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, | 178 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc), &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, |
182 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccRange, &xDef##ind##_##sub##_g[0],&xCur##ind##_##sub##_g}, | 179 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccRange, &xDef##ind##_##sub##_g[0],&xCur##ind##_##sub##_g}, |
183 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc), NULL, &xCur##ind##_##sub##_g}, | 180 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc), NULL, &xCur##ind##_##sub##_g}, |
184 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) {sub,kEplObdTypVString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, | 181 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) {sub,kEplObdTypVString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, |
185 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) {sub,kEplObdTypOString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, | 182 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) {sub,kEplObdTypOString,(acc)/*|kEplObdAccVar*/, &xDef##ind##_##sub##_g, &xCur##ind##_##sub##_g}, |
186 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) {sub,kEplObdTypDomain, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, | 183 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) {sub,kEplObdTypDomain, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, |
187 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc)|kEplObdAccVar, &xDef##ind##_##sub##_g, &VarEntry##ind##_##sub##_g}, | 184 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) {sub,typ, (acc)|kEplObdAccVar, &xDef##ind##_##sub##_g, &VarEntry##ind##_##sub##_g}, |
188 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccVar|kEplObdAccRange,&xDef##ind##_##sub##_g[0],&VarEntry##ind##_##sub##_g}, | 185 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) {sub,typ, (acc)|kEplObdAccVar|kEplObdAccRange,&xDef##ind##_##sub##_g[0],&VarEntry##ind##_##sub##_g}, |
189 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, | 186 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) {sub,typ, (acc)|kEplObdAccVar, NULL, &VarEntry##ind##_##sub##_g}, |
190 | |||
191 | 187 | ||
192 | //------------------------------------------------------------------------------------------- | 188 | //------------------------------------------------------------------------------------------- |
193 | #elif defined (EPL_OBD_CREATE_INDEX_TAB) | 189 | #elif defined (EPL_OBD_CREATE_INDEX_TAB) |
194 | 190 | ||
195 | // #pragma message ("EPL_OBD_CREATE_INDEX_TAB") | 191 | // #pragma message ("EPL_OBD_CREATE_INDEX_TAB") |
196 | 192 | ||
197 | #define EPL_OBD_BEGIN() | 193 | #define EPL_OBD_BEGIN() |
198 | #define EPL_OBD_END() | 194 | #define EPL_OBD_END() |
199 | 195 | ||
200 | //--------------------------------------------------------------------------------------- | 196 | //--------------------------------------------------------------------------------------- |
201 | #define EPL_OBD_BEGIN_PART_GENERIC() static tEplObdEntry aObdTab_g[] = { | 197 | #define EPL_OBD_BEGIN_PART_GENERIC() static tEplObdEntry aObdTab_g[] = { |
202 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() static tEplObdEntry aObdTabManufacturer_g[] = { | 198 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() static tEplObdEntry aObdTabManufacturer_g[] = { |
203 | #define EPL_OBD_BEGIN_PART_DEVICE() static tEplObdEntry aObdTabDevice_g[] = { | 199 | #define EPL_OBD_BEGIN_PART_DEVICE() static tEplObdEntry aObdTabDevice_g[] = { |
204 | #define EPL_OBD_END_PART() {EPL_OBD_TABLE_INDEX_END,(tEplObdSubEntryPtr)&dwObd_OBK_g,0,NULL}}; | 200 | #define EPL_OBD_END_PART() {EPL_OBD_TABLE_INDEX_END,(tEplObdSubEntryPtr)&dwObd_OBK_g,0,NULL}}; |
205 | 201 | ||
206 | //--------------------------------------------------------------------------------------- | 202 | //--------------------------------------------------------------------------------------- |
207 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],cnt,(tEplObdCallback)call}, | 203 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],cnt,(tEplObdCallback)call}, |
208 | #define EPL_OBD_END_INDEX(ind) | 204 | #define EPL_OBD_END_INDEX(ind) |
209 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, | 205 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, |
210 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, | 206 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, |
211 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, | 207 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) {ind,(tEplObdSubEntryPtr)&aObdSubEntry##ind##Ram_g[0],(cnt)+1,(tEplObdCallback)call}, |
212 | 208 | ||
213 | //--------------------------------------------------------------------------------------- | 209 | //--------------------------------------------------------------------------------------- |
214 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) | 210 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) |
215 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 211 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
216 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) | 212 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) |
217 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) | 213 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) |
218 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) | 214 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) |
219 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) | 215 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) |
220 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) | 216 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) |
221 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 217 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
222 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) | 218 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) |
223 | 219 | ||
224 | //------------------------------------------------------------------------------------------- | 220 | //------------------------------------------------------------------------------------------- |
225 | #elif defined (EPL_OBD_CREATE_INIT_FUNCTION) | 221 | #elif defined (EPL_OBD_CREATE_INIT_FUNCTION) |
226 | 222 | ||
227 | // #pragma message ("EPL_OBD_CREATE_INIT_FUNCTION") | 223 | // #pragma message ("EPL_OBD_CREATE_INIT_FUNCTION") |
228 | 224 | ||
229 | #define EPL_OBD_BEGIN() | 225 | #define EPL_OBD_BEGIN() |
230 | #define EPL_OBD_END() | 226 | #define EPL_OBD_END() |
231 | 227 | ||
232 | //--------------------------------------------------------------------------------------- | 228 | //--------------------------------------------------------------------------------------- |
233 | #define EPL_OBD_BEGIN_PART_GENERIC() pInitParam->m_pPart = (tEplObdEntryPtr) &aObdTab_g[0]; | 229 | #define EPL_OBD_BEGIN_PART_GENERIC() pInitParam->m_pPart = (tEplObdEntryPtr) &aObdTab_g[0]; |
234 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() pInitParam->m_pManufacturerPart = (tEplObdEntryPtr) &aObdTabManufacturer_g[0]; | 230 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() pInitParam->m_pManufacturerPart = (tEplObdEntryPtr) &aObdTabManufacturer_g[0]; |
235 | #define EPL_OBD_BEGIN_PART_DEVICE() pInitParam->m_pDevicePart = (tEplObdEntryPtr) &aObdTabDevice_g[0]; | 231 | #define EPL_OBD_BEGIN_PART_DEVICE() pInitParam->m_pDevicePart = (tEplObdEntryPtr) &aObdTabDevice_g[0]; |
236 | #define EPL_OBD_END_PART() | 232 | #define EPL_OBD_END_PART() |
237 | 233 | ||
238 | //--------------------------------------------------------------------------------------- | 234 | //--------------------------------------------------------------------------------------- |
239 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) | 235 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) |
240 | #define EPL_OBD_END_INDEX(ind) | 236 | #define EPL_OBD_END_INDEX(ind) |
241 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) | 237 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) |
242 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) | 238 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) |
243 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) | 239 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) |
244 | 240 | ||
245 | //--------------------------------------------------------------------------------------- | 241 | //--------------------------------------------------------------------------------------- |
246 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) | 242 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) |
247 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 243 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
248 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) | 244 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) |
249 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) | 245 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) |
250 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) | 246 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) |
251 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) | 247 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) |
252 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) | 248 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) |
253 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 249 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
254 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) | 250 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) |
255 | |||
256 | 251 | ||
257 | //------------------------------------------------------------------------------------------- | 252 | //------------------------------------------------------------------------------------------- |
258 | #elif defined (EPL_OBD_CREATE_INIT_SUBINDEX) | 253 | #elif defined (EPL_OBD_CREATE_INIT_SUBINDEX) |
259 | 254 | ||
260 | // #pragma message ("EPL_OBD_CREATE_INIT_SUBINDEX") | 255 | // #pragma message ("EPL_OBD_CREATE_INIT_SUBINDEX") |
261 | 256 | ||
262 | #define EPL_OBD_BEGIN() | 257 | #define EPL_OBD_BEGIN() |
263 | #define EPL_OBD_END() | 258 | #define EPL_OBD_END() |
264 | 259 | ||
265 | //--------------------------------------------------------------------------------------- | 260 | //--------------------------------------------------------------------------------------- |
266 | #define EPL_OBD_BEGIN_PART_GENERIC() | 261 | #define EPL_OBD_BEGIN_PART_GENERIC() |
267 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() | 262 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() |
268 | #define EPL_OBD_BEGIN_PART_DEVICE() | 263 | #define EPL_OBD_BEGIN_PART_DEVICE() |
269 | #define EPL_OBD_END_PART() | 264 | #define EPL_OBD_END_PART() |
270 | 265 | ||
271 | //--------------------------------------------------------------------------------------- | 266 | //--------------------------------------------------------------------------------------- |
272 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) //CCM_SUBINDEX_RAM_ONLY (EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g))); | 267 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) //CCM_SUBINDEX_RAM_ONLY (EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g))); |
273 | #define EPL_OBD_END_INDEX(ind) | 268 | #define EPL_OBD_END_INDEX(ind) |
274 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); | 269 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); |
275 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); | 270 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); |
276 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); | 271 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) //EPL_MEMCPY (&aObdSubEntry##ind##Ram_g[0],&aObdSubEntry##ind##Rom_g[0],sizeof(aObdSubEntry##ind##Ram_g)); |
277 | 272 | ||
278 | //--------------------------------------------------------------------------------------- | 273 | //--------------------------------------------------------------------------------------- |
279 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) | 274 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) |
280 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 275 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
281 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) | 276 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) |
282 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) | 277 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) |
283 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) | 278 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) |
284 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) | 279 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) |
285 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) | 280 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) |
286 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 281 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
287 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) | 282 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) |
288 | 283 | ||
289 | //------------------------------------------------------------------------------------------- | 284 | //------------------------------------------------------------------------------------------- |
290 | #else | 285 | #else |
291 | 286 | ||
292 | // #pragma message ("ELSE OF DEFINE") | 287 | // #pragma message ("ELSE OF DEFINE") |
293 | 288 | ||
294 | #define EPL_OBD_BEGIN() | 289 | #define EPL_OBD_BEGIN() |
295 | #define EPL_OBD_END() | 290 | #define EPL_OBD_END() |
296 | 291 | ||
297 | //--------------------------------------------------------------------------------------- | 292 | //--------------------------------------------------------------------------------------- |
298 | #define EPL_OBD_BEGIN_PART_GENERIC() | 293 | #define EPL_OBD_BEGIN_PART_GENERIC() |
299 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() | 294 | #define EPL_OBD_BEGIN_PART_MANUFACTURER() |
300 | #define EPL_OBD_BEGIN_PART_DEVICE() | 295 | #define EPL_OBD_BEGIN_PART_DEVICE() |
301 | #define EPL_OBD_END_PART() | 296 | #define EPL_OBD_END_PART() |
302 | 297 | ||
303 | //--------------------------------------------------------------------------------------- | 298 | //--------------------------------------------------------------------------------------- |
304 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) | 299 | #define EPL_OBD_BEGIN_INDEX_RAM(ind,cnt,call) |
305 | #define EPL_OBD_END_INDEX(ind) | 300 | #define EPL_OBD_END_INDEX(ind) |
306 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) | 301 | #define EPL_OBD_RAM_INDEX_RAM_ARRAY(ind,cnt,call,typ,acc,dtyp,name,def) |
307 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) | 302 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY(ind,cnt,call,typ,acc,dtyp,name,def) |
308 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) | 303 | #define EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT(ind,cnt,call,typ,acc,dtyp,name) |
309 | 304 | ||
310 | //--------------------------------------------------------------------------------------- | 305 | //--------------------------------------------------------------------------------------- |
311 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) | 306 | #define EPL_OBD_SUBINDEX_RAM_VAR(ind,sub,typ,acc,dtyp,name,val) |
312 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 307 | #define EPL_OBD_SUBINDEX_RAM_VAR_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
313 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,sizes,val) | 308 | #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,sizes,val) |
314 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) | 309 | #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) |
315 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) | 310 | #define EPL_OBD_SUBINDEX_RAM_VAR_NOINIT(ind,sub,typ,acc,dtyp,name) |
316 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) | 311 | #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) |
317 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) | 312 | #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) |
318 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) | 313 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) |
319 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) | 314 | #define EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT(ind,sub,typ,acc,dtyp,name) |
320 | 315 | ||
321 | #endif | 316 | #endif |
322 | 317 | ||
323 | //------------------------------------------------------------------------------------------- | 318 | //------------------------------------------------------------------------------------------- |
324 | #elif defined (EPL_OBD_UNDEFINE_MACRO) | 319 | #elif defined (EPL_OBD_UNDEFINE_MACRO) |
325 | 320 | ||
326 | // #pragma message ("EPL_OBD_UNDEFINE_MACRO") | 321 | // #pragma message ("EPL_OBD_UNDEFINE_MACRO") |
327 | 322 | ||
328 | #undef EPL_OBD_BEGIN | 323 | #undef EPL_OBD_BEGIN |
329 | #undef EPL_OBD_END | 324 | #undef EPL_OBD_END |
330 | 325 | ||
331 | //--------------------------------------------------------------------------------------- | 326 | //--------------------------------------------------------------------------------------- |
332 | #undef EPL_OBD_BEGIN_PART_GENERIC | 327 | #undef EPL_OBD_BEGIN_PART_GENERIC |
333 | #undef EPL_OBD_BEGIN_PART_MANUFACTURER | 328 | #undef EPL_OBD_BEGIN_PART_MANUFACTURER |
334 | #undef EPL_OBD_BEGIN_PART_DEVICE | 329 | #undef EPL_OBD_BEGIN_PART_DEVICE |
335 | #undef EPL_OBD_END_PART | 330 | #undef EPL_OBD_END_PART |
336 | 331 | ||
337 | //--------------------------------------------------------------------------------------- | 332 | //--------------------------------------------------------------------------------------- |
338 | #undef EPL_OBD_BEGIN_INDEX_RAM | 333 | #undef EPL_OBD_BEGIN_INDEX_RAM |
339 | #undef EPL_OBD_END_INDEX | 334 | #undef EPL_OBD_END_INDEX |
340 | #undef EPL_OBD_RAM_INDEX_RAM_ARRAY | 335 | #undef EPL_OBD_RAM_INDEX_RAM_ARRAY |
341 | #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY | 336 | #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY |
342 | #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT | 337 | #undef EPL_OBD_RAM_INDEX_RAM_VARARRAY_NOINIT |
343 | 338 | ||
344 | //--------------------------------------------------------------------------------------- | 339 | //--------------------------------------------------------------------------------------- |
345 | #undef EPL_OBD_SUBINDEX_RAM_VAR | 340 | #undef EPL_OBD_SUBINDEX_RAM_VAR |
346 | #undef EPL_OBD_SUBINDEX_RAM_VAR_RG | 341 | #undef EPL_OBD_SUBINDEX_RAM_VAR_RG |
347 | #undef EPL_OBD_SUBINDEX_RAM_VSTRING | 342 | #undef EPL_OBD_SUBINDEX_RAM_VSTRING |
348 | #undef EPL_OBD_SUBINDEX_RAM_OSTRING | 343 | #undef EPL_OBD_SUBINDEX_RAM_OSTRING |
349 | #undef EPL_OBD_SUBINDEX_RAM_VAR_NOINIT | 344 | #undef EPL_OBD_SUBINDEX_RAM_VAR_NOINIT |
350 | #undef EPL_OBD_SUBINDEX_RAM_DOMAIN | 345 | #undef EPL_OBD_SUBINDEX_RAM_DOMAIN |
351 | #undef EPL_OBD_SUBINDEX_RAM_USERDEF | 346 | #undef EPL_OBD_SUBINDEX_RAM_USERDEF |
352 | #undef EPL_OBD_SUBINDEX_RAM_USERDEF_RG | 347 | #undef EPL_OBD_SUBINDEX_RAM_USERDEF_RG |
353 | #undef EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT | 348 | #undef EPL_OBD_SUBINDEX_RAM_USERDEF_NOINIT |
354 | 349 | ||
355 | #else | 350 | #else |
356 | 351 | ||
357 | #error "nothing defined" | 352 | #error "nothing defined" |
358 | |||
359 | 353 | ||
360 | #endif | 354 | #endif |
361 | |||
362 | |||
diff --git a/drivers/staging/epl/EplObjDef.h b/drivers/staging/epl/EplObjDef.h index 5823c14de19f..7713125a3e8d 100644 --- a/drivers/staging/epl/EplObjDef.h +++ b/drivers/staging/epl/EplObjDef.h | |||
@@ -71,48 +71,43 @@ | |||
71 | #ifndef _EPLOBJDEF_H_ | 71 | #ifndef _EPLOBJDEF_H_ |
72 | #define _EPLOBJDEF_H_ | 72 | #define _EPLOBJDEF_H_ |
73 | 73 | ||
74 | |||
75 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
76 | // security checks | 75 | // security checks |
77 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
78 | 77 | ||
79 | |||
80 | //--------------------------------------------------------------------------- | 78 | //--------------------------------------------------------------------------- |
81 | // macros to help building OD | 79 | // macros to help building OD |
82 | //--------------------------------------------------------------------------- | 80 | //--------------------------------------------------------------------------- |
83 | 81 | ||
84 | |||
85 | //--------------------------------------------------------------------------- | 82 | //--------------------------------------------------------------------------- |
86 | #if (defined (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB) && (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB != FALSE)) | 83 | #if (defined (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB) && (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB != FALSE)) |
87 | 84 | ||
88 | #define CCM_SUBINDEX_RAM_ONLY(a) a; | 85 | #define CCM_SUBINDEX_RAM_ONLY(a) a; |
89 | #define CCM_SUBINDEX_RAM_ONEOF(a,b) a | 86 | #define CCM_SUBINDEX_RAM_ONEOF(a,b) a |
90 | 87 | ||
91 | #else | 88 | #else |
92 | 89 | ||
93 | #define CCM_SUBINDEX_RAM_ONLY(a) | 90 | #define CCM_SUBINDEX_RAM_ONLY(a) |
94 | #define CCM_SUBINDEX_RAM_ONEOF(a,b) b | 91 | #define CCM_SUBINDEX_RAM_ONEOF(a,b) b |
95 | 92 | ||
96 | #endif | 93 | #endif |
97 | 94 | ||
98 | |||
99 | //--------------------------------------------------------------------------- | 95 | //--------------------------------------------------------------------------- |
100 | // To prevent unused memory in subindex tables we need this macro. | 96 | // To prevent unused memory in subindex tables we need this macro. |
101 | // But not all compilers support to preset the last struct value followed by a comma. | 97 | // But not all compilers support to preset the last struct value followed by a comma. |
102 | // Compilers which does not support a comma after last struct value has to place in a dummy subindex. | 98 | // Compilers which does not support a comma after last struct value has to place in a dummy subindex. |
103 | #if ((DEV_SYSTEM & _DEV_COMMA_EXT_) != 0) | 99 | #if ((DEV_SYSTEM & _DEV_COMMA_EXT_) != 0) |
104 | 100 | ||
105 | #define EPL_OBD_END_SUBINDEX() | 101 | #define EPL_OBD_END_SUBINDEX() |
106 | #define EPL_OBD_MAX_ARRAY_SUBENTRIES 2 | 102 | #define EPL_OBD_MAX_ARRAY_SUBENTRIES 2 |
107 | 103 | ||
108 | #else | 104 | #else |
109 | 105 | ||
110 | #define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL} | 106 | #define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL} |
111 | #define EPL_OBD_MAX_ARRAY_SUBENTRIES 3 | 107 | #define EPL_OBD_MAX_ARRAY_SUBENTRIES 3 |
112 | 108 | ||
113 | #endif | 109 | #endif |
114 | 110 | ||
115 | |||
116 | //--------------------------------------------------------------------------- | 111 | //--------------------------------------------------------------------------- |
117 | //--------------------------------------------------------------------------- | 112 | //--------------------------------------------------------------------------- |
118 | // globale vars | 113 | // globale vars |
@@ -123,37 +118,33 @@ | |||
123 | // creation of data in ROM memory | 118 | // creation of data in ROM memory |
124 | // ------------------------------------------------------------------------- | 119 | // ------------------------------------------------------------------------- |
125 | #define EPL_OBD_CREATE_ROM_DATA | 120 | #define EPL_OBD_CREATE_ROM_DATA |
126 | #include "objdict.h" | 121 | #include "objdict.h" |
127 | #undef EPL_OBD_CREATE_ROM_DATA | 122 | #undef EPL_OBD_CREATE_ROM_DATA |
128 | 123 | ||
129 | |||
130 | // ------------------------------------------------------------------------- | 124 | // ------------------------------------------------------------------------- |
131 | // creation of data in RAM memory | 125 | // creation of data in RAM memory |
132 | // ------------------------------------------------------------------------- | 126 | // ------------------------------------------------------------------------- |
133 | 127 | ||
134 | #define EPL_OBD_CREATE_RAM_DATA | 128 | #define EPL_OBD_CREATE_RAM_DATA |
135 | #include "objdict.h" | 129 | #include "objdict.h" |
136 | #undef EPL_OBD_CREATE_RAM_DATA | 130 | #undef EPL_OBD_CREATE_RAM_DATA |
137 | 131 | ||
138 | |||
139 | // ------------------------------------------------------------------------- | 132 | // ------------------------------------------------------------------------- |
140 | // creation of subindex tables in ROM and RAM | 133 | // creation of subindex tables in ROM and RAM |
141 | // ------------------------------------------------------------------------- | 134 | // ------------------------------------------------------------------------- |
142 | 135 | ||
143 | #define EPL_OBD_CREATE_SUBINDEX_TAB | 136 | #define EPL_OBD_CREATE_SUBINDEX_TAB |
144 | #include "objdict.h" | 137 | #include "objdict.h" |
145 | #undef EPL_OBD_CREATE_SUBINDEX_TAB | 138 | #undef EPL_OBD_CREATE_SUBINDEX_TAB |
146 | 139 | ||
147 | |||
148 | // ------------------------------------------------------------------------- | 140 | // ------------------------------------------------------------------------- |
149 | // creation of index tables for generic, manufacturer and device part | 141 | // creation of index tables for generic, manufacturer and device part |
150 | // ------------------------------------------------------------------------- | 142 | // ------------------------------------------------------------------------- |
151 | 143 | ||
152 | #define EPL_OBD_CREATE_INDEX_TAB | 144 | #define EPL_OBD_CREATE_INDEX_TAB |
153 | #include "objdict.h" | 145 | #include "objdict.h" |
154 | #undef EPL_OBD_CREATE_INDEX_TAB | 146 | #undef EPL_OBD_CREATE_INDEX_TAB |
155 | 147 | ||
156 | |||
157 | //=========================================================================// | 148 | //=========================================================================// |
158 | // // | 149 | // // |
159 | // P U B L I C F U N C T I O N S // | 150 | // P U B L I C F U N C T I O N S // |
@@ -174,47 +165,44 @@ | |||
174 | // | 165 | // |
175 | // ---------------------------------------------------------------------------- | 166 | // ---------------------------------------------------------------------------- |
176 | 167 | ||
177 | EPLDLLEXPORT tEplKernel PUBLIC EPL_OBD_INIT_RAM_NAME (tEplObdInitParam MEM* pInitParam_p) | 168 | EPLDLLEXPORT tEplKernel PUBLIC EPL_OBD_INIT_RAM_NAME(tEplObdInitParam MEM * |
169 | pInitParam_p) | ||
178 | { | 170 | { |
179 | 171 | ||
180 | tEplObdInitParam MEM* pInitParam = pInitParam_p; | 172 | tEplObdInitParam MEM *pInitParam = pInitParam_p; |
181 | 173 | ||
182 | // check if pointer to parameter structure is valid | 174 | // check if pointer to parameter structure is valid |
183 | // if not then only copy subindex tables below | 175 | // if not then only copy subindex tables below |
184 | if (pInitParam != NULL) | 176 | if (pInitParam != NULL) { |
185 | { | 177 | // at first delete all parameters (all pointers will be set zu NULL) |
186 | // at first delete all parameters (all pointers will be set zu NULL) | 178 | EPL_MEMSET(pInitParam, 0, sizeof(tEplObdInitParam)); |
187 | EPL_MEMSET (pInitParam, 0, sizeof (tEplObdInitParam)); | 179 | |
188 | 180 | #define EPL_OBD_CREATE_INIT_FUNCTION | |
189 | #define EPL_OBD_CREATE_INIT_FUNCTION | 181 | { |
190 | { | 182 | // inserts code to init pointer to index tables |
191 | // inserts code to init pointer to index tables | 183 | #include "objdict.h" |
192 | #include "objdict.h" | 184 | } |
193 | } | 185 | #undef EPL_OBD_CREATE_INIT_FUNCTION |
194 | #undef EPL_OBD_CREATE_INIT_FUNCTION | 186 | |
195 | 187 | #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) | |
196 | #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) | 188 | { |
197 | { | 189 | // to begin no user OD is defined |
198 | // to begin no user OD is defined | 190 | pInitParam_p->m_pUserPart = NULL; |
199 | pInitParam_p->m_pUserPart = NULL; | 191 | } |
200 | } | 192 | #endif |
201 | #endif | 193 | } |
202 | } | 194 | #define EPL_OBD_CREATE_INIT_SUBINDEX |
203 | 195 | { | |
204 | #define EPL_OBD_CREATE_INIT_SUBINDEX | 196 | // inserts code to copy subindex tables |
205 | { | 197 | #include "objdict.h" |
206 | // inserts code to copy subindex tables | 198 | } |
207 | #include "objdict.h" | 199 | #undef EPL_OBD_CREATE_INIT_SUBINDEX |
208 | } | 200 | |
209 | #undef EPL_OBD_CREATE_INIT_SUBINDEX | 201 | return kEplSuccessful; |
210 | |||
211 | return kEplSuccessful; | ||
212 | 202 | ||
213 | } | 203 | } |
214 | 204 | ||
215 | |||
216 | #endif // _EPLOBJDEF_H_ | 205 | #endif // _EPLOBJDEF_H_ |
217 | 206 | ||
218 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler | 207 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler |
219 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). | 208 | // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder). |
220 | |||
diff --git a/drivers/staging/epl/EplPdo.h b/drivers/staging/epl/EplPdo.h index 0273a94773f1..d22ac86e85b6 100644 --- a/drivers/staging/epl/EplPdo.h +++ b/drivers/staging/epl/EplPdo.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/05/22 d.k.: start of the implementation, version 1.00 | 67 | 2006/05/22 d.k.: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPL_PDO_H_ | 71 | #ifndef _EPL_PDO_H_ |
@@ -85,42 +84,34 @@ | |||
85 | // NodeId for PRes TPDO | 84 | // NodeId for PRes TPDO |
86 | #define EPL_PDO_PRES_NODE_ID 0x00 | 85 | #define EPL_PDO_PRES_NODE_ID 0x00 |
87 | 86 | ||
88 | |||
89 | //--------------------------------------------------------------------------- | 87 | //--------------------------------------------------------------------------- |
90 | // typedef | 88 | // typedef |
91 | //--------------------------------------------------------------------------- | 89 | //--------------------------------------------------------------------------- |
92 | 90 | ||
93 | typedef struct | 91 | typedef struct { |
94 | { | 92 | void *m_pVar; |
95 | void* m_pVar; | 93 | WORD m_wOffset; // in Bits |
96 | WORD m_wOffset; // in Bits | 94 | WORD m_wSize; // in Bits |
97 | WORD m_wSize; // in Bits | 95 | BOOL m_fNumeric; // numeric value -> use AMI functions |
98 | BOOL m_fNumeric; // numeric value -> use AMI functions | ||
99 | 96 | ||
100 | } tEplPdoMapping; | 97 | } tEplPdoMapping; |
101 | 98 | ||
102 | typedef struct | 99 | typedef struct { |
103 | { | 100 | unsigned int m_uiSizeOfStruct; |
104 | unsigned int m_uiSizeOfStruct; | 101 | unsigned int m_uiPdoId; |
105 | unsigned int m_uiPdoId; | 102 | unsigned int m_uiNodeId; |
106 | unsigned int m_uiNodeId; | 103 | // 0xFF=invalid, RPDO: 0x00=PReq, localNodeId=PRes, remoteNodeId=PRes |
107 | // 0xFF=invalid, RPDO: 0x00=PReq, localNodeId=PRes, remoteNodeId=PRes | 104 | // TPDO: 0x00=PRes, MN: CnNodeId=PReq |
108 | // TPDO: 0x00=PRes, MN: CnNodeId=PReq | ||
109 | 105 | ||
110 | BOOL m_fTxRx; | 106 | BOOL m_fTxRx; |
111 | BYTE m_bMappingVersion; | 107 | BYTE m_bMappingVersion; |
112 | unsigned int m_uiMaxMappingEntries; // maximum number of mapping entries, i.e. size of m_aPdoMapping | 108 | unsigned int m_uiMaxMappingEntries; // maximum number of mapping entries, i.e. size of m_aPdoMapping |
113 | tEplPdoMapping m_aPdoMapping[1]; | 109 | tEplPdoMapping m_aPdoMapping[1]; |
114 | 110 | ||
115 | } tEplPdoParam; | 111 | } tEplPdoParam; |
116 | 112 | ||
117 | |||
118 | |||
119 | //--------------------------------------------------------------------------- | 113 | //--------------------------------------------------------------------------- |
120 | // function prototypes | 114 | // function prototypes |
121 | //--------------------------------------------------------------------------- | 115 | //--------------------------------------------------------------------------- |
122 | 116 | ||
123 | 117 | #endif // #ifndef _EPL_PDO_H_ | |
124 | #endif // #ifndef _EPL_PDO_H_ | ||
125 | |||
126 | |||
diff --git a/drivers/staging/epl/EplSdo.h b/drivers/staging/epl/EplSdo.h index c41b32c870c0..1cb3f2de4a3c 100644 --- a/drivers/staging/epl/EplSdo.h +++ b/drivers/staging/epl/EplSdo.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/06/26 k.t.: start of the implementation | 67 | 2006/06/26 k.t.: start of the implementation |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #include "EplInc.h" | 71 | #include "EplInc.h" |
@@ -76,7 +75,6 @@ | |||
76 | #ifndef _EPLSDO_H_ | 75 | #ifndef _EPLSDO_H_ |
77 | #define _EPLSDO_H_ | 76 | #define _EPLSDO_H_ |
78 | 77 | ||
79 | |||
80 | //--------------------------------------------------------------------------- | 78 | //--------------------------------------------------------------------------- |
81 | // const defines | 79 | // const defines |
82 | //--------------------------------------------------------------------------- | 80 | //--------------------------------------------------------------------------- |
@@ -118,64 +116,58 @@ typedef unsigned int tEplSdoConHdl; | |||
118 | 116 | ||
119 | // callback function pointer for Protocol Abstraction Layer to call | 117 | // callback function pointer for Protocol Abstraction Layer to call |
120 | // asynchronuus SDO Sequence Layer | 118 | // asynchronuus SDO Sequence Layer |
121 | typedef tEplKernel (PUBLIC* tEplSequLayerReceiveCb ) ( | 119 | typedef tEplKernel(PUBLIC * tEplSequLayerReceiveCb) (tEplSdoConHdl ConHdl_p, |
122 | tEplSdoConHdl ConHdl_p, | 120 | tEplAsySdoSeq * |
123 | tEplAsySdoSeq* pSdoSeqData_p, | 121 | pSdoSeqData_p, |
124 | unsigned int uiDataSize_p); | 122 | unsigned int uiDataSize_p); |
125 | 123 | ||
126 | // handle between asynchronuus SDO Sequence Layer and SDO Command layer | 124 | // handle between asynchronuus SDO Sequence Layer and SDO Command layer |
127 | typedef unsigned int tEplSdoSeqConHdl; | 125 | typedef unsigned int tEplSdoSeqConHdl; |
128 | 126 | ||
129 | // callback function pointer for asynchronuus SDO Sequence Layer to call | 127 | // callback function pointer for asynchronuus SDO Sequence Layer to call |
130 | // SDO Command layer for received data | 128 | // SDO Command layer for received data |
131 | typedef tEplKernel (PUBLIC* tEplSdoComReceiveCb) ( | 129 | typedef tEplKernel(PUBLIC * |
132 | tEplSdoSeqConHdl SdoSeqConHdl_p, | 130 | tEplSdoComReceiveCb) (tEplSdoSeqConHdl SdoSeqConHdl_p, |
133 | tEplAsySdoCom* pAsySdoCom_p, | 131 | tEplAsySdoCom * pAsySdoCom_p, |
134 | unsigned int uiDataSize_p); | 132 | unsigned int uiDataSize_p); |
135 | 133 | ||
136 | // status of connection | 134 | // status of connection |
137 | typedef enum | 135 | typedef enum { |
138 | { | 136 | kAsySdoConStateConnected = 0x00, |
139 | kAsySdoConStateConnected = 0x00, | 137 | kAsySdoConStateInitError = 0x01, |
140 | kAsySdoConStateInitError = 0x01, | 138 | kAsySdoConStateConClosed = 0x02, |
141 | kAsySdoConStateConClosed = 0x02, | 139 | kAsySdoConStateAckReceived = 0x03, |
142 | kAsySdoConStateAckReceived = 0x03, | 140 | kAsySdoConStateFrameSended = 0x04, |
143 | kAsySdoConStateFrameSended = 0x04, | 141 | kAsySdoConStateTimeout = 0x05 |
144 | kAsySdoConStateTimeout = 0x05 | 142 | } tEplAsySdoConState; |
145 | |||
146 | }tEplAsySdoConState; | ||
147 | 143 | ||
148 | // callback function pointer for asynchronuus SDO Sequence Layer to call | 144 | // callback function pointer for asynchronuus SDO Sequence Layer to call |
149 | // SDO Command layer for connection status | 145 | // SDO Command layer for connection status |
150 | typedef tEplKernel (PUBLIC* tEplSdoComConCb) ( | 146 | typedef tEplKernel(PUBLIC * tEplSdoComConCb) (tEplSdoSeqConHdl SdoSeqConHdl_p, |
151 | tEplSdoSeqConHdl SdoSeqConHdl_p, | 147 | tEplAsySdoConState |
152 | tEplAsySdoConState AsySdoConState_p); | 148 | AsySdoConState_p); |
153 | 149 | ||
154 | // handle between SDO Command layer and application | 150 | // handle between SDO Command layer and application |
155 | typedef unsigned int tEplSdoComConHdl; | 151 | typedef unsigned int tEplSdoComConHdl; |
156 | 152 | ||
157 | // status of connection | 153 | // status of connection |
158 | typedef enum | 154 | typedef enum { |
159 | { | 155 | kEplSdoComTransferNotActive = 0x00, |
160 | kEplSdoComTransferNotActive = 0x00, | 156 | kEplSdoComTransferRunning = 0x01, |
161 | kEplSdoComTransferRunning = 0x01, | 157 | kEplSdoComTransferTxAborted = 0x02, |
162 | kEplSdoComTransferTxAborted = 0x02, | 158 | kEplSdoComTransferRxAborted = 0x03, |
163 | kEplSdoComTransferRxAborted = 0x03, | 159 | kEplSdoComTransferFinished = 0x04, |
164 | kEplSdoComTransferFinished = 0x04, | 160 | kEplSdoComTransferLowerLayerAbort = 0x05 |
165 | kEplSdoComTransferLowerLayerAbort = 0x05 | ||
166 | |||
167 | } tEplSdoComConState; | 161 | } tEplSdoComConState; |
168 | 162 | ||
169 | // SDO Services and Command-Ids from DS 1.0.0 p.152 | 163 | // SDO Services and Command-Ids from DS 1.0.0 p.152 |
170 | typedef enum | 164 | typedef enum { |
171 | { | 165 | kEplSdoServiceNIL = 0x00, |
172 | kEplSdoServiceNIL = 0x00, | 166 | kEplSdoServiceWriteByIndex = 0x01, |
173 | kEplSdoServiceWriteByIndex = 0x01, | 167 | kEplSdoServiceReadByIndex = 0x02 |
174 | kEplSdoServiceReadByIndex = 0x02 | 168 | //-------------------------------- |
175 | 169 | // the following services are optional and | |
176 | //-------------------------------- | 170 | // not supported now |
177 | // the following services are optional and | ||
178 | // not supported now | ||
179 | /* | 171 | /* |
180 | kEplSdoServiceWriteAllByIndex = 0x03, | 172 | kEplSdoServiceWriteAllByIndex = 0x03, |
181 | kEplSdoServiceReadAllByIndex = 0x04, | 173 | kEplSdoServiceReadAllByIndex = 0x04, |
@@ -196,76 +188,58 @@ typedef enum | |||
196 | } tEplSdoServiceType; | 188 | } tEplSdoServiceType; |
197 | 189 | ||
198 | // describes if read or write access | 190 | // describes if read or write access |
199 | typedef enum | 191 | typedef enum { |
200 | { | 192 | kEplSdoAccessTypeRead = 0x00, |
201 | kEplSdoAccessTypeRead = 0x00, | 193 | kEplSdoAccessTypeWrite = 0x01 |
202 | kEplSdoAccessTypeWrite = 0x01 | ||
203 | |||
204 | } tEplSdoAccessType; | 194 | } tEplSdoAccessType; |
205 | 195 | ||
206 | typedef enum | 196 | typedef enum { |
207 | { | 197 | kEplSdoTypeAuto = 0x00, |
208 | kEplSdoTypeAuto = 0x00, | 198 | kEplSdoTypeUdp = 0x01, |
209 | kEplSdoTypeUdp = 0x01, | 199 | kEplSdoTypeAsnd = 0x02, |
210 | kEplSdoTypeAsnd = 0x02, | 200 | kEplSdoTypePdo = 0x03 |
211 | kEplSdoTypePdo = 0x03 | 201 | } tEplSdoType; |
212 | 202 | ||
213 | }tEplSdoType; | 203 | typedef enum { |
214 | 204 | kEplSdoTransAuto = 0x00, | |
215 | typedef enum | 205 | kEplSdoTransExpedited = 0x01, |
216 | { | 206 | kEplSdoTransSegmented = 0x02 |
217 | kEplSdoTransAuto = 0x00, | ||
218 | kEplSdoTransExpedited = 0x01, | ||
219 | kEplSdoTransSegmented = 0x02 | ||
220 | |||
221 | |||
222 | } tEplSdoTransType; | 207 | } tEplSdoTransType; |
223 | 208 | ||
224 | |||
225 | // structure to inform application about finish of SDO transfer | 209 | // structure to inform application about finish of SDO transfer |
226 | typedef struct | 210 | typedef struct { |
227 | { | 211 | tEplSdoComConHdl m_SdoComConHdl; |
228 | tEplSdoComConHdl m_SdoComConHdl; | 212 | tEplSdoComConState m_SdoComConState; |
229 | tEplSdoComConState m_SdoComConState; | 213 | DWORD m_dwAbortCode; |
230 | DWORD m_dwAbortCode; | 214 | tEplSdoAccessType m_SdoAccessType; |
231 | tEplSdoAccessType m_SdoAccessType; | 215 | unsigned int m_uiNodeId; // NodeId of the target |
232 | unsigned int m_uiNodeId; // NodeId of the target | 216 | unsigned int m_uiTargetIndex; // index which was accessed |
233 | unsigned int m_uiTargetIndex; // index which was accessed | 217 | unsigned int m_uiTargetSubIndex; // subindex which was accessed |
234 | unsigned int m_uiTargetSubIndex; // subindex which was accessed | 218 | unsigned int m_uiTransferredByte; // number of bytes transferred |
235 | unsigned int m_uiTransferredByte; // number of bytes transferred | 219 | void *m_pUserArg; // user definable argument pointer |
236 | void* m_pUserArg; // user definable argument pointer | ||
237 | 220 | ||
238 | } tEplSdoComFinished; | 221 | } tEplSdoComFinished; |
239 | 222 | ||
240 | |||
241 | // callback function pointer to inform application about connection | 223 | // callback function pointer to inform application about connection |
242 | typedef tEplKernel (PUBLIC* tEplSdoFinishedCb) ( | 224 | typedef tEplKernel(PUBLIC * tEplSdoFinishedCb) (tEplSdoComFinished * |
243 | tEplSdoComFinished* pSdoComFinished_p); | 225 | pSdoComFinished_p); |
244 | |||
245 | 226 | ||
246 | // structure to init SDO transfer to Read or Write by Index | 227 | // structure to init SDO transfer to Read or Write by Index |
247 | typedef struct | 228 | typedef struct { |
248 | { | 229 | tEplSdoComConHdl m_SdoComConHdl; |
249 | tEplSdoComConHdl m_SdoComConHdl; | 230 | unsigned int m_uiIndex; |
250 | unsigned int m_uiIndex; | 231 | unsigned int m_uiSubindex; |
251 | unsigned int m_uiSubindex; | 232 | void *m_pData; |
252 | void* m_pData; | 233 | unsigned int m_uiDataSize; |
253 | unsigned int m_uiDataSize; | 234 | unsigned int m_uiTimeout; // not used in this version |
254 | unsigned int m_uiTimeout; // not used in this version | 235 | tEplSdoAccessType m_SdoAccessType; |
255 | tEplSdoAccessType m_SdoAccessType; | 236 | tEplSdoFinishedCb m_pfnSdoFinishedCb; |
256 | tEplSdoFinishedCb m_pfnSdoFinishedCb; | 237 | void *m_pUserArg; // user definable argument pointer |
257 | void* m_pUserArg; // user definable argument pointer | ||
258 | 238 | ||
259 | } tEplSdoComTransParamByIndex; | 239 | } tEplSdoComTransParamByIndex; |
260 | 240 | ||
261 | |||
262 | |||
263 | |||
264 | //--------------------------------------------------------------------------- | 241 | //--------------------------------------------------------------------------- |
265 | // function prototypes | 242 | // function prototypes |
266 | //--------------------------------------------------------------------------- | 243 | //--------------------------------------------------------------------------- |
267 | 244 | ||
268 | 245 | #endif // #ifndef _EPLSDO_H_ | |
269 | #endif // #ifndef _EPLSDO_H_ | ||
270 | |||
271 | |||
diff --git a/drivers/staging/epl/EplSdoAc.h b/drivers/staging/epl/EplSdoAc.h index 97de988870e8..400fb38ce3e9 100644 --- a/drivers/staging/epl/EplSdoAc.h +++ b/drivers/staging/epl/EplSdoAc.h | |||
@@ -71,7 +71,6 @@ | |||
71 | #ifndef _EPLSDOAC_H_ | 71 | #ifndef _EPLSDOAC_H_ |
72 | #define _EPLSDOAC_H_ | 72 | #define _EPLSDOAC_H_ |
73 | 73 | ||
74 | |||
75 | // ========================================================================= | 74 | // ========================================================================= |
76 | // SDO abort codes | 75 | // SDO abort codes |
77 | // ========================================================================= | 76 | // ========================================================================= |
@@ -106,7 +105,6 @@ | |||
106 | #define EPL_SDOAC_OBJECT_DICTIONARY_NOT_EXIST 0x08000023L | 105 | #define EPL_SDOAC_OBJECT_DICTIONARY_NOT_EXIST 0x08000023L |
107 | #define EPL_SDOAC_CONFIG_DATA_EMPTY 0x08000024L | 106 | #define EPL_SDOAC_CONFIG_DATA_EMPTY 0x08000024L |
108 | 107 | ||
109 | |||
110 | #endif // _EPLSDOAC_H_ | 108 | #endif // _EPLSDOAC_H_ |
111 | 109 | ||
112 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler | 110 | // Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler |
diff --git a/drivers/staging/epl/EplTarget.h b/drivers/staging/epl/EplTarget.h index 0d1fe8afda23..b2b66f82c035 100644 --- a/drivers/staging/epl/EplTarget.h +++ b/drivers/staging/epl/EplTarget.h | |||
@@ -66,13 +66,11 @@ | |||
66 | 66 | ||
67 | 2005/12/05 -as: start of the implementation, version 1.00 | 67 | 2005/12/05 -as: start of the implementation, version 1.00 |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #ifndef _EPLTARGET_H_ | 71 | #ifndef _EPLTARGET_H_ |
73 | #define _EPLTARGET_H_ | 72 | #define _EPLTARGET_H_ |
74 | 73 | ||
75 | |||
76 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
77 | // const defines | 75 | // const defines |
78 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
@@ -87,137 +85,132 @@ | |||
87 | 85 | ||
88 | #if (TARGET_SYSTEM == _WIN32_) | 86 | #if (TARGET_SYSTEM == _WIN32_) |
89 | 87 | ||
90 | #define _WIN32_WINDOWS 0x0401 | 88 | #define _WIN32_WINDOWS 0x0401 |
91 | #define _WIN32_WINNT 0x0400 | 89 | #define _WIN32_WINNT 0x0400 |
92 | 90 | ||
93 | #include <stdlib.h> | 91 | #include <stdlib.h> |
94 | #include <stdio.h> | 92 | #include <stdio.h> |
95 | 93 | ||
96 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt | 94 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt |
97 | #include <string.h> | 95 | #include <string.h> |
98 | 96 | ||
99 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); | 97 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); |
100 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); | 98 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); |
101 | 99 | ||
102 | // f.j.: die Funktionen für <MemAlloc> und <MemFree> sind in WinMem.c definiert | 100 | // f.j.: die Funktionen für <MemAlloc> und <MemFree> sind in WinMem.c definiert |
103 | //definition der Prototypen | 101 | //definition der Prototypen |
104 | void FAR* MemAlloc (DWORD dwMemSize_p); | 102 | void FAR *MemAlloc(DWORD dwMemSize_p); |
105 | void MemFree (void FAR* pMem_p); | 103 | void MemFree(void FAR * pMem_p); |
106 | 104 | ||
107 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) | 105 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) |
108 | #define EPL_FREE(ptr) free((void *)ptr) | 106 | #define EPL_FREE(ptr) free((void *)ptr) |
109 | 107 | ||
110 | #ifndef PRINTF0 | 108 | #ifndef PRINTF0 |
111 | void trace (const char* fmt, ...); | 109 | void trace(const char *fmt, ...); |
112 | #define PRINTF TRACE | 110 | #define PRINTF TRACE |
113 | #define PRINTF0(arg) TRACE0(arg) | 111 | #define PRINTF0(arg) TRACE0(arg) |
114 | #define PRINTF1(arg,p1) TRACE1(arg,p1) | 112 | #define PRINTF1(arg,p1) TRACE1(arg,p1) |
115 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) | 113 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) |
116 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) | 114 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) |
117 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) | 115 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) |
118 | //#define PRINTF printf | 116 | //#define PRINTF printf |
119 | //#define PRINTF0(arg) PRINTF(arg) | 117 | //#define PRINTF0(arg) PRINTF(arg) |
120 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) | 118 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) |
121 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) | 119 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) |
122 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) | 120 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) |
123 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | 121 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) |
124 | #endif | 122 | #endif |
125 | |||
126 | #ifdef ASSERTMSG | ||
127 | #undef ASSERTMSG | ||
128 | #endif | ||
129 | |||
130 | #define ASSERTMSG(expr,string) if (!(expr)) { \ | ||
131 | MessageBox (NULL, string, "Assertion failed", MB_OK | MB_ICONERROR); \ | ||
132 | exit (-1);} | ||
133 | 123 | ||
124 | #ifdef ASSERTMSG | ||
125 | #undef ASSERTMSG | ||
126 | #endif | ||
134 | 127 | ||
128 | #define ASSERTMSG(expr,string) if (!(expr)) { \ | ||
129 | MessageBox (NULL, string, "Assertion failed", MB_OK | MB_ICONERROR); \ | ||
130 | exit (-1);} | ||
135 | 131 | ||
136 | #elif (TARGET_SYSTEM == _NO_OS_) | 132 | #elif (TARGET_SYSTEM == _NO_OS_) |
137 | 133 | ||
138 | #include <stdlib.h> | 134 | #include <stdlib.h> |
139 | #include <stdio.h> | 135 | #include <stdio.h> |
140 | 136 | ||
141 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt | 137 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt |
142 | // #include <string.h> | 138 | // #include <string.h> |
143 | 139 | ||
144 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); | 140 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); |
145 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); | 141 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); |
146 | 142 | ||
147 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) | 143 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) |
148 | #define EPL_FREE(ptr) free((void *)ptr) | 144 | #define EPL_FREE(ptr) free((void *)ptr) |
149 | 145 | ||
150 | #ifndef PRINTF0 | 146 | #ifndef PRINTF0 |
151 | #define PRINTF TRACE | 147 | #define PRINTF TRACE |
152 | #define PRINTF0(arg) TRACE0(arg) | 148 | #define PRINTF0(arg) TRACE0(arg) |
153 | #define PRINTF1(arg,p1) TRACE1(arg,p1) | 149 | #define PRINTF1(arg,p1) TRACE1(arg,p1) |
154 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) | 150 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) |
155 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) | 151 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) |
156 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) | 152 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) |
157 | //#define PRINTF printf | 153 | //#define PRINTF printf |
158 | //#define PRINTF0(arg) PRINTF(arg) | 154 | //#define PRINTF0(arg) PRINTF(arg) |
159 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) | 155 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) |
160 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) | 156 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) |
161 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) | 157 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) |
162 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | 158 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) |
163 | #endif | 159 | #endif |
164 | |||
165 | 160 | ||
166 | #elif (TARGET_SYSTEM == _LINUX_) | 161 | #elif (TARGET_SYSTEM == _LINUX_) |
167 | 162 | ||
168 | #ifndef __KERNEL__ | 163 | #ifndef __KERNEL__ |
169 | #include <stdlib.h> | 164 | #include <stdlib.h> |
170 | #include <stdio.h> | 165 | #include <stdio.h> |
171 | #else | 166 | #else |
172 | // #include <linux/config.h> | 167 | // #include <linux/config.h> |
173 | #include <linux/module.h> | 168 | #include <linux/module.h> |
174 | #include <linux/kernel.h> | 169 | #include <linux/kernel.h> |
175 | #include <linux/init.h> | 170 | #include <linux/init.h> |
176 | #include <linux/errno.h> | 171 | #include <linux/errno.h> |
177 | #include <linux/major.h> | 172 | #include <linux/major.h> |
178 | #include <linux/version.h> | 173 | #include <linux/version.h> |
179 | #endif | 174 | #endif |
180 | 175 | ||
181 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt | 176 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt |
182 | // #include <string.h> | 177 | // #include <string.h> |
183 | 178 | ||
184 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); | 179 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); |
185 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); | 180 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); |
186 | |||
187 | #ifndef __KERNEL__ | ||
188 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) | ||
189 | #define EPL_FREE(ptr) free((void *)ptr) | ||
190 | #else | ||
191 | #define EPL_MALLOC(siz) kmalloc((size_t)(siz), GFP_KERNEL) | ||
192 | #define EPL_FREE(ptr) kfree((void *)ptr) | ||
193 | #endif | ||
194 | |||
195 | #ifndef PRINTF0 | ||
196 | #define PRINTF TRACE | ||
197 | #define PRINTF0(arg) TRACE0(arg) | ||
198 | #define PRINTF1(arg,p1) TRACE1(arg,p1) | ||
199 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) | ||
200 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) | ||
201 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) | ||
202 | //#define PRINTF printf | ||
203 | //#define PRINTF0(arg) PRINTF(arg) | ||
204 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) | ||
205 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) | ||
206 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) | ||
207 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | ||
208 | #endif | ||
209 | 181 | ||
182 | #ifndef __KERNEL__ | ||
183 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) | ||
184 | #define EPL_FREE(ptr) free((void *)ptr) | ||
185 | #else | ||
186 | #define EPL_MALLOC(siz) kmalloc((size_t)(siz), GFP_KERNEL) | ||
187 | #define EPL_FREE(ptr) kfree((void *)ptr) | ||
188 | #endif | ||
210 | 189 | ||
190 | #ifndef PRINTF0 | ||
191 | #define PRINTF TRACE | ||
192 | #define PRINTF0(arg) TRACE0(arg) | ||
193 | #define PRINTF1(arg,p1) TRACE1(arg,p1) | ||
194 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) | ||
195 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) | ||
196 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) | ||
197 | //#define PRINTF printf | ||
198 | //#define PRINTF0(arg) PRINTF(arg) | ||
199 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) | ||
200 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) | ||
201 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) | ||
202 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | ||
211 | #endif | 203 | #endif |
212 | 204 | ||
213 | #define EPL_TGT_INTMASK_ETH 0x0001 // ethernet interrupt | 205 | #endif |
214 | #define EPL_TGT_INTMASK_DMA 0x0002 // DMA interrupt | 206 | |
207 | #define EPL_TGT_INTMASK_ETH 0x0001 // ethernet interrupt | ||
208 | #define EPL_TGT_INTMASK_DMA 0x0002 // DMA interrupt | ||
215 | 209 | ||
216 | //--------------------------------------------------------------------------- | 210 | //--------------------------------------------------------------------------- |
217 | // typedef | 211 | // typedef |
218 | //--------------------------------------------------------------------------- | 212 | //--------------------------------------------------------------------------- |
219 | 213 | ||
220 | |||
221 | //--------------------------------------------------------------------------- | 214 | //--------------------------------------------------------------------------- |
222 | // function prototypes | 215 | // function prototypes |
223 | //--------------------------------------------------------------------------- | 216 | //--------------------------------------------------------------------------- |
@@ -231,10 +224,10 @@ | |||
231 | // functions for ethernet driver | 224 | // functions for ethernet driver |
232 | tEplKernel PUBLIC TgtInitEthIsr(void); | 225 | tEplKernel PUBLIC TgtInitEthIsr(void); |
233 | void PUBLIC TgtFreeEthIsr(void); | 226 | void PUBLIC TgtFreeEthIsr(void); |
234 | void PUBLIC TgtEnableGlobalInterrupt(BYTE fEnable_p); | 227 | void PUBLIC TgtEnableGlobalInterrupt(BYTE fEnable_p); |
235 | void PUBLIC TgtEnableEthInterrupt0(BYTE fEnable_p, unsigned int uiInterruptMask_p); | 228 | void PUBLIC TgtEnableEthInterrupt0(BYTE fEnable_p, |
236 | void PUBLIC TgtEnableEthInterrupt1(BYTE fEnable_p, unsigned int uiInterruptMask_p); | 229 | unsigned int uiInterruptMask_p); |
237 | 230 | void PUBLIC TgtEnableEthInterrupt1(BYTE fEnable_p, | |
238 | #endif // #ifndef _EPLTARGET_H_ | 231 | unsigned int uiInterruptMask_p); |
239 | |||
240 | 232 | ||
233 | #endif // #ifndef _EPLTARGET_H_ | ||
diff --git a/drivers/staging/epl/EplTimer.h b/drivers/staging/epl/EplTimer.h index 6dbb53baa766..facbfd8740e6 100644 --- a/drivers/staging/epl/EplTimer.h +++ b/drivers/staging/epl/EplTimer.h | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | 2006/07/06 k.t.: start of the implementation | 67 | 2006/07/06 k.t.: start of the implementation |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | #include "EplInc.h" | 71 | #include "EplInc.h" |
@@ -75,12 +74,10 @@ | |||
75 | #ifndef _EPLTIMER_H_ | 74 | #ifndef _EPLTIMER_H_ |
76 | #define _EPLTIMER_H_ | 75 | #define _EPLTIMER_H_ |
77 | 76 | ||
78 | |||
79 | //--------------------------------------------------------------------------- | 77 | //--------------------------------------------------------------------------- |
80 | // const defines | 78 | // const defines |
81 | //--------------------------------------------------------------------------- | 79 | //--------------------------------------------------------------------------- |
82 | 80 | ||
83 | |||
84 | //--------------------------------------------------------------------------- | 81 | //--------------------------------------------------------------------------- |
85 | // typedef | 82 | // typedef |
86 | //--------------------------------------------------------------------------- | 83 | //--------------------------------------------------------------------------- |
@@ -88,38 +85,33 @@ | |||
88 | // type for timer handle | 85 | // type for timer handle |
89 | typedef unsigned long tEplTimerHdl; | 86 | typedef unsigned long tEplTimerHdl; |
90 | 87 | ||
91 | typedef struct | 88 | typedef struct { |
92 | { | 89 | tEplEventSink m_EventSink; |
93 | tEplEventSink m_EventSink; | 90 | unsigned long m_ulArg; // d.k.: converted to unsigned long because |
94 | unsigned long m_ulArg; // d.k.: converted to unsigned long because | 91 | // it is never accessed as a pointer by the |
95 | // it is never accessed as a pointer by the | 92 | // timer module and the data the |
96 | // timer module and the data the | 93 | // pointer points to is not saved in any way. |
97 | // pointer points to is not saved in any way. | 94 | // It is just a value. The user is responsible |
98 | // It is just a value. The user is responsible | 95 | // to store the data statically and convert |
99 | // to store the data statically and convert | 96 | // the pointer between address spaces. |
100 | // the pointer between address spaces. | ||
101 | 97 | ||
102 | } tEplTimerArg; | 98 | } tEplTimerArg; |
103 | 99 | ||
104 | typedef struct | 100 | typedef struct { |
105 | { | 101 | tEplTimerHdl m_TimerHdl; |
106 | tEplTimerHdl m_TimerHdl; | 102 | unsigned long m_ulArg; // d.k.: converted to unsigned long because |
107 | unsigned long m_ulArg; // d.k.: converted to unsigned long because | 103 | // it is never accessed as a pointer by the |
108 | // it is never accessed as a pointer by the | 104 | // timer module and the data the |
109 | // timer module and the data the | 105 | // pointer points to is not saved in any way. |
110 | // pointer points to is not saved in any way. | 106 | // It is just a value. |
111 | // It is just a value. | ||
112 | 107 | ||
113 | } tEplTimerEventArg; | 108 | } tEplTimerEventArg; |
114 | 109 | ||
115 | typedef tEplKernel (PUBLIC * tEplTimerkCallback) ( | 110 | typedef tEplKernel(PUBLIC * tEplTimerkCallback) (tEplTimerEventArg * |
116 | tEplTimerEventArg* pEventArg_p); | 111 | pEventArg_p); |
117 | 112 | ||
118 | //--------------------------------------------------------------------------- | 113 | //--------------------------------------------------------------------------- |
119 | // function prototypes | 114 | // function prototypes |
120 | //--------------------------------------------------------------------------- | 115 | //--------------------------------------------------------------------------- |
121 | 116 | ||
122 | 117 | #endif // #ifndef _EPLTIMER_H_ | |
123 | #endif // #ifndef _EPLTIMER_H_ | ||
124 | |||
125 | |||
diff --git a/drivers/staging/epl/EplVersion.h b/drivers/staging/epl/EplVersion.h index 4f477616d78a..75570d56b865 100644 --- a/drivers/staging/epl/EplVersion.h +++ b/drivers/staging/epl/EplVersion.h | |||
@@ -70,7 +70,6 @@ | |||
70 | #ifndef _EPL_VERSION_H_ | 70 | #ifndef _EPL_VERSION_H_ |
71 | #define _EPL_VERSION_H_ | 71 | #define _EPL_VERSION_H_ |
72 | 72 | ||
73 | |||
74 | // NOTE: | 73 | // NOTE: |
75 | // All version macros should contain the same version number. But do not use | 74 | // All version macros should contain the same version number. But do not use |
76 | // defines instead of the numbers. Because the macro EPL_STRING_VERSION() can not | 75 | // defines instead of the numbers. Because the macro EPL_STRING_VERSION() can not |
@@ -85,14 +84,13 @@ | |||
85 | #define DEFINED_OBJ1018_VERSION EPL_OBJ1018_VERSION (1, 3, 0) | 84 | #define DEFINED_OBJ1018_VERSION EPL_OBJ1018_VERSION (1, 3, 0) |
86 | #define DEFINED_STRING_VERSION EPL_STRING_VERSION (1, 3, 0) | 85 | #define DEFINED_STRING_VERSION EPL_STRING_VERSION (1, 3, 0) |
87 | 86 | ||
88 | |||
89 | // ----------------------------------------------------------------------------- | 87 | // ----------------------------------------------------------------------------- |
90 | #define EPL_PRODUCT_NAME "EPL V2" | 88 | #define EPL_PRODUCT_NAME "EPL V2" |
91 | #define EPL_PRODUCT_VERSION DEFINED_STRING_VERSION | 89 | #define EPL_PRODUCT_VERSION DEFINED_STRING_VERSION |
92 | #define EPL_PRODUCT_MANUFACTURER "SYS TEC electronic GmbH" | 90 | #define EPL_PRODUCT_MANUFACTURER "SYS TEC electronic GmbH" |
93 | 91 | ||
94 | #define EPL_PRODUCT_KEY "SO-1083" | 92 | #define EPL_PRODUCT_KEY "SO-1083" |
95 | #define EPL_PRODUCT_DESCRIPTION "openPOWERLINK Protocol Stack Source" | 93 | #define EPL_PRODUCT_DESCRIPTION "openPOWERLINK Protocol Stack Source" |
96 | 94 | ||
97 | #endif // _EPL_VERSION_H_ | 95 | #endif // _EPL_VERSION_H_ |
98 | 96 | ||
diff --git a/drivers/staging/epl/SharedBuff.h b/drivers/staging/epl/SharedBuff.h index 9b5d2868bc15..0ec1b4b9e6ae 100644 --- a/drivers/staging/epl/SharedBuff.h +++ b/drivers/staging/epl/SharedBuff.h | |||
@@ -57,60 +57,50 @@ | |||
57 | #ifndef _SHAREDBUFF_H_ | 57 | #ifndef _SHAREDBUFF_H_ |
58 | #define _SHAREDBUFF_H_ | 58 | #define _SHAREDBUFF_H_ |
59 | 59 | ||
60 | |||
61 | |||
62 | //--------------------------------------------------------------------------- | 60 | //--------------------------------------------------------------------------- |
63 | // Type definitions | 61 | // Type definitions |
64 | //--------------------------------------------------------------------------- | 62 | //--------------------------------------------------------------------------- |
65 | 63 | ||
66 | typedef enum | 64 | typedef enum { |
67 | { | 65 | kShbOk = 0, |
68 | kShbOk = 0, | 66 | kShbNoReadableData = 1, |
69 | kShbNoReadableData = 1, | 67 | kShbDataTruncated = 2, |
70 | kShbDataTruncated = 2, | 68 | kShbBufferFull = 3, |
71 | kShbBufferFull = 3, | 69 | kShbDataOutsideBufferArea = 4, |
72 | kShbDataOutsideBufferArea = 4, | 70 | kShbBufferAlreadyCompleted = 5, |
73 | kShbBufferAlreadyCompleted = 5, | 71 | kShbMemUsedByOtherProcs = 6, |
74 | kShbMemUsedByOtherProcs = 6, | 72 | kShbOpenMismatch = 7, |
75 | kShbOpenMismatch = 7, | 73 | kShbInvalidBufferType = 8, |
76 | kShbInvalidBufferType = 8, | 74 | kShbInvalidArg = 9, |
77 | kShbInvalidArg = 9, | 75 | kShbBufferInvalid = 10, |
78 | kShbBufferInvalid = 10, | 76 | kShbOutOfMem = 11, |
79 | kShbOutOfMem = 11, | 77 | kShbAlreadyReseting = 12, |
80 | kShbAlreadyReseting = 12, | 78 | kShbAlreadySignaling = 13, |
81 | kShbAlreadySignaling = 13, | 79 | kShbExceedDataSizeLimit = 14, |
82 | kShbExceedDataSizeLimit = 14, | ||
83 | 80 | ||
84 | } tShbError; | 81 | } tShbError; |
85 | 82 | ||
86 | |||
87 | // 2006/08/24 d.k.: Priority for threads (new data, job signaling) | 83 | // 2006/08/24 d.k.: Priority for threads (new data, job signaling) |
88 | typedef enum | 84 | typedef enum { |
89 | { | 85 | kShbPriorityLow = 0, |
90 | kShbPriorityLow = 0, | 86 | kShbPriorityNormal = 1, |
91 | kShbPriorityNormal = 1, | 87 | kshbPriorityHigh = 2 |
92 | kshbPriorityHigh = 2 | ||
93 | |||
94 | } tShbPriority; | 88 | } tShbPriority; |
95 | 89 | ||
96 | 90 | typedef struct { | |
97 | typedef struct | 91 | unsigned int m_uiFullBlockSize; // real size of allocated block (incl. alignment fill bytes) |
98 | { | 92 | unsigned long m_ulAvailableSize; // still available size for data |
99 | unsigned int m_uiFullBlockSize; // real size of allocated block (incl. alignment fill bytes) | 93 | unsigned long m_ulWrIndex; // current write index |
100 | unsigned long m_ulAvailableSize; // still available size for data | 94 | unsigned int m_fBufferCompleted; // TRUE if allocated block is complete filled with data |
101 | unsigned long m_ulWrIndex; // current write index | ||
102 | unsigned int m_fBufferCompleted; // TRUE if allocated block is complete filled with data | ||
103 | 95 | ||
104 | } tShbCirChunk; | 96 | } tShbCirChunk; |
105 | 97 | ||
98 | typedef void *tShbInstance; | ||
106 | 99 | ||
107 | typedef void* tShbInstance; | 100 | typedef void (*tShbCirSigHndlrNewData) (tShbInstance pShbInstance_p, |
108 | 101 | unsigned long ulDataBlockSize_p); | |
109 | 102 | typedef void (*tShbCirSigHndlrReset) (tShbInstance pShbInstance_p, | |
110 | typedef void (*tShbCirSigHndlrNewData) (tShbInstance pShbInstance_p, unsigned long ulDataBlockSize_p); | 103 | unsigned int fTimeOut_p); |
111 | typedef void (*tShbCirSigHndlrReset) (tShbInstance pShbInstance_p, unsigned int fTimeOut_p); | ||
112 | |||
113 | |||
114 | 104 | ||
115 | //--------------------------------------------------------------------------- | 105 | //--------------------------------------------------------------------------- |
116 | // Prototypes | 106 | // Prototypes |
@@ -129,55 +119,86 @@ extern "C" { | |||
129 | #endif | 119 | #endif |
130 | */ | 120 | */ |
131 | 121 | ||
132 | tShbError ShbInit (void); | 122 | tShbError ShbInit(void); |
133 | tShbError ShbExit (void); | 123 | tShbError ShbExit(void); |
134 | 124 | ||
135 | // Circular Shared Buffer | 125 | // Circular Shared Buffer |
136 | tShbError ShbCirAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); | 126 | tShbError ShbCirAllocBuffer(unsigned long ulBufferSize_p, |
137 | tShbError ShbCirReleaseBuffer (tShbInstance pShbInstance_p); | 127 | const char *pszBufferID_p, |
128 | tShbInstance * ppShbInstance_p, | ||
129 | unsigned int *pfShbNewCreated_p); | ||
130 | tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p); | ||
138 | 131 | ||
139 | #if !defined(INLINE_ENABLED) | 132 | #if !defined(INLINE_ENABLED) |
140 | 133 | ||
141 | tShbError ShbCirResetBuffer (tShbInstance pShbInstance_p, unsigned long ulTimeOut_p, tShbCirSigHndlrReset pfnSignalHandlerReset_p); | 134 | tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, |
142 | tShbError ShbCirWriteDataBlock (tShbInstance pShbInstance_p, const void* pSrcDataBlock_p, unsigned long ulDataBlockSize_p); | 135 | unsigned long ulTimeOut_p, |
143 | tShbError ShbCirAllocDataBlock (tShbInstance pShbInstance_p, tShbCirChunk* pShbCirChunk_p, unsigned long ulDataBufferSize_p); | 136 | tShbCirSigHndlrReset |
144 | tShbError ShbCirWriteDataChunk (tShbInstance pShbInstance_p, tShbCirChunk* pShbCirChunk_p, const void* pSrcDataChunk_p, unsigned long ulDataChunkSize_p, unsigned int* pfBufferCompleted_p); | 137 | pfnSignalHandlerReset_p); |
145 | tShbError ShbCirReadDataBlock (tShbInstance pShbInstance_p, void* pDstDataBlock_p, unsigned long ulRdBuffSize_p, unsigned long* pulDataBlockSize_p); | 138 | tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, |
146 | tShbError ShbCirGetReadDataSize (tShbInstance pShbInstance_p, unsigned long* pulDataBlockSize_p); | 139 | const void *pSrcDataBlock_p, |
147 | tShbError ShbCirGetReadBlockCount (tShbInstance pShbInstance_p, unsigned long* pulDataBlockCount_p); | 140 | unsigned long ulDataBlockSize_p); |
148 | tShbError ShbCirSetSignalHandlerNewData (tShbInstance pShbInstance_p, tShbCirSigHndlrNewData pfnShbSignalHandlerNewData_p, tShbPriority ShbPriority_p); | 141 | tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, |
142 | tShbCirChunk * pShbCirChunk_p, | ||
143 | unsigned long ulDataBufferSize_p); | ||
144 | tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, | ||
145 | tShbCirChunk * pShbCirChunk_p, | ||
146 | const void *pSrcDataChunk_p, | ||
147 | unsigned long ulDataChunkSize_p, | ||
148 | unsigned int *pfBufferCompleted_p); | ||
149 | tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, | ||
150 | void *pDstDataBlock_p, | ||
151 | unsigned long ulRdBuffSize_p, | ||
152 | unsigned long *pulDataBlockSize_p); | ||
153 | tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, | ||
154 | unsigned long *pulDataBlockSize_p); | ||
155 | tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, | ||
156 | unsigned long *pulDataBlockCount_p); | ||
157 | tShbError ShbCirSetSignalHandlerNewData(tShbInstance pShbInstance_p, | ||
158 | tShbCirSigHndlrNewData | ||
159 | pfnShbSignalHandlerNewData_p, | ||
160 | tShbPriority ShbPriority_p); | ||
149 | 161 | ||
150 | #endif | 162 | #endif |
151 | 163 | ||
152 | // Linear Shared Buffer | 164 | // Linear Shared Buffer |
153 | tShbError ShbLinAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); | 165 | tShbError ShbLinAllocBuffer(unsigned long ulBufferSize_p, |
154 | tShbError ShbLinReleaseBuffer (tShbInstance pShbInstance_p); | 166 | const char *pszBufferID_p, |
167 | tShbInstance * ppShbInstance_p, | ||
168 | unsigned int *pfShbNewCreated_p); | ||
169 | tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p); | ||
155 | 170 | ||
156 | #if !defined(INLINE_ENABLED) | 171 | #if !defined(INLINE_ENABLED) |
157 | 172 | ||
158 | tShbError ShbLinWriteDataBlock (tShbInstance pShbInstance_p, unsigned long ulDstBufferOffs_p, const void* pSrcDataBlock_p, unsigned long ulDataBlockSize_p); | 173 | tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, |
159 | tShbError ShbLinReadDataBlock (tShbInstance pShbInstance_p, void* pDstDataBlock_p, unsigned long ulSrcBufferOffs_p, unsigned long ulDataBlockSize_p); | 174 | unsigned long ulDstBufferOffs_p, |
175 | const void *pSrcDataBlock_p, | ||
176 | unsigned long ulDataBlockSize_p); | ||
177 | tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, | ||
178 | void *pDstDataBlock_p, | ||
179 | unsigned long ulSrcBufferOffs_p, | ||
180 | unsigned long ulDataBlockSize_p); | ||
160 | 181 | ||
161 | #endif | 182 | #endif |
162 | 183 | ||
163 | #ifndef NDEBUG | 184 | #ifndef NDEBUG |
164 | tShbError ShbCirTraceBuffer (tShbInstance pShbInstance_p); | 185 | tShbError ShbCirTraceBuffer(tShbInstance pShbInstance_p); |
165 | tShbError ShbLinTraceBuffer (tShbInstance pShbInstance_p); | 186 | tShbError ShbLinTraceBuffer(tShbInstance pShbInstance_p); |
166 | tShbError ShbTraceDump (const unsigned char* pabStartAddr_p, unsigned long ulDataSize_p, unsigned long ulAddrOffset_p, const char* pszInfoText_p); | 187 | tShbError ShbTraceDump(const unsigned char *pabStartAddr_p, |
188 | unsigned long ulDataSize_p, | ||
189 | unsigned long ulAddrOffset_p, | ||
190 | const char *pszInfoText_p); | ||
167 | #else | 191 | #else |
168 | #define ShbCirTraceBuffer(p0) | 192 | #define ShbCirTraceBuffer(p0) |
169 | #define ShbLinTraceBuffer(p0) | 193 | #define ShbLinTraceBuffer(p0) |
170 | #define ShbTraceDump(p0, p1, p2, p3) | 194 | #define ShbTraceDump(p0, p1, p2, p3) |
171 | #endif | 195 | #endif |
172 | 196 | ||
173 | #undef INLINE_ENABLED // disable actual inlining of functions | 197 | #undef INLINE_ENABLED // disable actual inlining of functions |
174 | #undef INLINE_FUNCTION | 198 | #undef INLINE_FUNCTION |
175 | #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing | 199 | #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing |
176 | 200 | ||
177 | #ifdef __cplusplus | 201 | #ifdef __cplusplus |
178 | } | 202 | } |
179 | #endif | 203 | #endif |
180 | 204 | #endif // #ifndef _SHAREDBUFF_H_ | |
181 | |||
182 | #endif // #ifndef _SHAREDBUFF_H_ | ||
183 | |||
diff --git a/drivers/staging/epl/ShbIpc.h b/drivers/staging/epl/ShbIpc.h index 7840b0309628..cad8846a0824 100644 --- a/drivers/staging/epl/ShbIpc.h +++ b/drivers/staging/epl/ShbIpc.h | |||
@@ -57,64 +57,69 @@ | |||
57 | #ifndef _SHBIPC_H_ | 57 | #ifndef _SHBIPC_H_ |
58 | #define _SHBIPC_H_ | 58 | #define _SHBIPC_H_ |
59 | 59 | ||
60 | |||
61 | |||
62 | //--------------------------------------------------------------------------- | 60 | //--------------------------------------------------------------------------- |
63 | // Type definitions | 61 | // Type definitions |
64 | //--------------------------------------------------------------------------- | 62 | //--------------------------------------------------------------------------- |
65 | 63 | ||
66 | typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); | 64 | typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); |
67 | typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, unsigned int fTimeOut_p); | 65 | typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, |
68 | 66 | unsigned int fTimeOut_p); | |
69 | 67 | ||
70 | #if (TARGET_SYSTEM == _WIN32_) | 68 | #if (TARGET_SYSTEM == _WIN32_) |
71 | #if defined(INLINE_FUNCTION_DEF) | 69 | #if defined(INLINE_FUNCTION_DEF) |
72 | #undef INLINE_FUNCTION | 70 | #undef INLINE_FUNCTION |
73 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | 71 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF |
74 | #define SHBIPC_INLINE_ENABLED TRUE | 72 | #define SHBIPC_INLINE_ENABLED TRUE |
75 | #define SHBIPC_INLINED | 73 | #define SHBIPC_INLINED |
76 | #include "ShbIpc-Win32.c" | 74 | #include "ShbIpc-Win32.c" |
77 | #endif | 75 | #endif |
78 | 76 | ||
79 | #elif (TARGET_SYSTEM == _LINUX_) | 77 | #elif (TARGET_SYSTEM == _LINUX_) |
80 | #if defined(INLINE_FUNCTION_DEF) | 78 | #if defined(INLINE_FUNCTION_DEF) |
81 | #undef INLINE_FUNCTION | 79 | #undef INLINE_FUNCTION |
82 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | 80 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF |
83 | #define SHBIPC_INLINE_ENABLED TRUE | 81 | #define SHBIPC_INLINE_ENABLED TRUE |
84 | #define SHBIPC_INLINED | 82 | #define SHBIPC_INLINED |
85 | #include "ShbIpc-LinuxKernel.c" | 83 | #include "ShbIpc-LinuxKernel.c" |
86 | #endif | 84 | #endif |
87 | #endif | 85 | #endif |
88 | |||
89 | 86 | ||
90 | //--------------------------------------------------------------------------- | 87 | //--------------------------------------------------------------------------- |
91 | // Prototypes | 88 | // Prototypes |
92 | //--------------------------------------------------------------------------- | 89 | //--------------------------------------------------------------------------- |
93 | 90 | ||
94 | tShbError ShbIpcInit (void); | 91 | tShbError ShbIpcInit(void); |
95 | tShbError ShbIpcExit (void); | 92 | tShbError ShbIpcExit(void); |
96 | 93 | ||
97 | tShbError ShbIpcAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); | 94 | tShbError ShbIpcAllocBuffer(unsigned long ulBufferSize_p, |
98 | tShbError ShbIpcReleaseBuffer (tShbInstance pShbInstance_p); | 95 | const char *pszBufferID_p, |
96 | tShbInstance * ppShbInstance_p, | ||
97 | unsigned int *pfShbNewCreated_p); | ||
98 | tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p); | ||
99 | 99 | ||
100 | #if !defined(SHBIPC_INLINE_ENABLED) | 100 | #if !defined(SHBIPC_INLINE_ENABLED) |
101 | 101 | ||
102 | tShbError ShbIpcEnterAtomicSection (tShbInstance pShbInstance_p); | 102 | tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p); |
103 | tShbError ShbIpcLeaveAtomicSection (tShbInstance pShbInstance_p); | 103 | tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p); |
104 | 104 | ||
105 | tShbError ShbIpcStartSignalingNewData (tShbInstance pShbInstance_p, tSigHndlrNewData pfnSignalHandlerNewData_p, tShbPriority ShbPriority_p); | 105 | tShbError ShbIpcStartSignalingNewData(tShbInstance pShbInstance_p, |
106 | tShbError ShbIpcStopSignalingNewData (tShbInstance pShbInstance_p); | 106 | tSigHndlrNewData |
107 | tShbError ShbIpcSignalNewData (tShbInstance pShbInstance_p); | 107 | pfnSignalHandlerNewData_p, |
108 | tShbPriority ShbPriority_p); | ||
109 | tShbError ShbIpcStopSignalingNewData(tShbInstance pShbInstance_p); | ||
110 | tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p); | ||
108 | 111 | ||
109 | tShbError ShbIpcStartSignalingJobReady (tShbInstance pShbInstance_p, unsigned long ulTimeOut_p, tSigHndlrJobReady pfnSignalHandlerJobReady_p); | 112 | tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p, |
110 | tShbError ShbIpcSignalJobReady (tShbInstance pShbInstance_p); | 113 | unsigned long ulTimeOut_p, |
114 | tSigHndlrJobReady | ||
115 | pfnSignalHandlerJobReady_p); | ||
116 | tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p); | ||
111 | 117 | ||
112 | void* ShbIpcGetShMemPtr (tShbInstance pShbInstance_p); | 118 | void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p); |
113 | #endif | 119 | #endif |
114 | 120 | ||
115 | #undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions | 121 | #undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions |
116 | #undef INLINE_FUNCTION | 122 | #undef INLINE_FUNCTION |
117 | #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing | 123 | #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing |
118 | 124 | ||
119 | #endif // #ifndef _SHBIPC_H_ | 125 | #endif // #ifndef _SHBIPC_H_ |
120 | |||
diff --git a/drivers/staging/epl/ShbLinuxKernel.h b/drivers/staging/epl/ShbLinuxKernel.h index 30b5faf51541..812702add4f0 100644 --- a/drivers/staging/epl/ShbLinuxKernel.h +++ b/drivers/staging/epl/ShbLinuxKernel.h | |||
@@ -57,10 +57,10 @@ | |||
57 | #ifndef _SHBLINUXKERNEL_H_ | 57 | #ifndef _SHBLINUXKERNEL_H_ |
58 | #define _SHBLINUXKERNEL_H_ | 58 | #define _SHBLINUXKERNEL_H_ |
59 | 59 | ||
60 | struct sShbMemTable{ | 60 | struct sShbMemTable { |
61 | int m_iBufferId; | 61 | int m_iBufferId; |
62 | void* m_pBuffer; | 62 | void *m_pBuffer; |
63 | struct sShbMemTable *m_psNextMemTableElement; | 63 | struct sShbMemTable *m_psNextMemTableElement; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | extern struct sShbMemTable *psMemTableElementFirst_g; | 66 | extern struct sShbMemTable *psMemTableElementFirst_g; |
diff --git a/drivers/staging/epl/SocketLinuxKernel.h b/drivers/staging/epl/SocketLinuxKernel.h index c248a7831f23..6e1d61989607 100644 --- a/drivers/staging/epl/SocketLinuxKernel.h +++ b/drivers/staging/epl/SocketLinuxKernel.h | |||
@@ -66,17 +66,14 @@ | |||
66 | 66 | ||
67 | 2006/08/25 d.k.: start of the implementation | 67 | 2006/08/25 d.k.: start of the implementation |
68 | 68 | ||
69 | |||
70 | ****************************************************************************/ | 69 | ****************************************************************************/ |
71 | 70 | ||
72 | |||
73 | #ifndef _SOCKETLINUXKERNEL_H_ | 71 | #ifndef _SOCKETLINUXKERNEL_H_ |
74 | #define _SOCKETLINUXKERNEL_H_ | 72 | #define _SOCKETLINUXKERNEL_H_ |
75 | 73 | ||
76 | #include <linux/net.h> | 74 | #include <linux/net.h> |
77 | #include <linux/in.h> | 75 | #include <linux/in.h> |
78 | 76 | ||
79 | |||
80 | //--------------------------------------------------------------------------- | 77 | //--------------------------------------------------------------------------- |
81 | // const defines | 78 | // const defines |
82 | //--------------------------------------------------------------------------- | 79 | //--------------------------------------------------------------------------- |
@@ -87,7 +84,7 @@ | |||
87 | // typedef | 84 | // typedef |
88 | //--------------------------------------------------------------------------- | 85 | //--------------------------------------------------------------------------- |
89 | 86 | ||
90 | typedef struct socket* SOCKET; | 87 | typedef struct socket *SOCKET; |
91 | 88 | ||
92 | //--------------------------------------------------------------------------- | 89 | //--------------------------------------------------------------------------- |
93 | // function prototypes | 90 | // function prototypes |
@@ -97,12 +94,12 @@ int bind(SOCKET s, const struct sockaddr *addr, int addrlen); | |||
97 | 94 | ||
98 | int closesocket(SOCKET s); | 95 | int closesocket(SOCKET s); |
99 | 96 | ||
100 | int recvfrom(SOCKET s, char* buf, int len, int flags, struct sockaddr *from, int * fromlen); | 97 | int recvfrom(SOCKET s, char *buf, int len, int flags, struct sockaddr *from, |
98 | int *fromlen); | ||
101 | 99 | ||
102 | int sendto(SOCKET s, const char* buf, int len, int flags, const struct sockaddr *to, int tolen); | 100 | int sendto(SOCKET s, const char *buf, int len, int flags, |
101 | const struct sockaddr *to, int tolen); | ||
103 | 102 | ||
104 | SOCKET socket(int af, int type, int protocol); | 103 | SOCKET socket(int af, int type, int protocol); |
105 | 104 | ||
106 | #endif // #ifndef _SOCKETLINUXKERNEL_H_ | 105 | #endif // #ifndef _SOCKETLINUXKERNEL_H_ |
107 | |||
108 | |||
diff --git a/drivers/staging/epl/edrv.h b/drivers/staging/epl/edrv.h index 139523c66613..a45984dfb092 100644 --- a/drivers/staging/epl/edrv.h +++ b/drivers/staging/epl/edrv.h | |||
@@ -81,103 +81,87 @@ | |||
81 | #define MAX_ETH_DATA_SIZE 1500 | 81 | #define MAX_ETH_DATA_SIZE 1500 |
82 | #define MIN_ETH_DATA_SIZE 46 | 82 | #define MIN_ETH_DATA_SIZE 46 |
83 | 83 | ||
84 | #define ETH_HDR_OFFSET 0 // Ethernet header at the top of the frame | 84 | #define ETH_HDR_OFFSET 0 // Ethernet header at the top of the frame |
85 | #define ETH_HDR_SIZE 14 // size of Ethernet header | 85 | #define ETH_HDR_SIZE 14 // size of Ethernet header |
86 | #define MIN_ETH_SIZE (MIN_ETH_DATA_SIZE + ETH_HDR_SIZE) // without CRC | 86 | #define MIN_ETH_SIZE (MIN_ETH_DATA_SIZE + ETH_HDR_SIZE) // without CRC |
87 | |||
88 | #define ETH_CRC_SIZE 4 // size of Ethernet CRC, i.e. FCS | ||
89 | |||
90 | 87 | ||
88 | #define ETH_CRC_SIZE 4 // size of Ethernet CRC, i.e. FCS | ||
91 | 89 | ||
92 | //--------------------------------------------------------------------------- | 90 | //--------------------------------------------------------------------------- |
93 | // types | 91 | // types |
94 | //--------------------------------------------------------------------------- | 92 | //--------------------------------------------------------------------------- |
95 | 93 | ||
96 | // position of a buffer in an ethernet-frame | 94 | // position of a buffer in an ethernet-frame |
97 | typedef enum | 95 | typedef enum { |
98 | { | 96 | kEdrvBufferFirstInFrame = 0x01, // first data buffer in an ethernet frame |
99 | kEdrvBufferFirstInFrame = 0x01, // first data buffer in an ethernet frame | 97 | kEdrvBufferMiddleInFrame = 0x02, // a middle data buffer in an ethernet frame |
100 | kEdrvBufferMiddleInFrame = 0x02, // a middle data buffer in an ethernet frame | 98 | kEdrvBufferLastInFrame = 0x04 // last data buffer in an ethernet frame |
101 | kEdrvBufferLastInFrame = 0x04 // last data buffer in an ethernet frame | ||
102 | } tEdrvBufferInFrame; | 99 | } tEdrvBufferInFrame; |
103 | 100 | ||
104 | |||
105 | // format of a tx-buffer | 101 | // format of a tx-buffer |
106 | typedef struct _tEdrvTxBuffer | 102 | typedef struct _tEdrvTxBuffer { |
107 | { | 103 | tEplMsgType m_EplMsgType; // IN: type of EPL message, set by calling function |
108 | tEplMsgType m_EplMsgType; // IN: type of EPL message, set by calling function | 104 | unsigned int m_uiTxMsgLen; // IN: length of message to be send (set for each transmit call) |
109 | unsigned int m_uiTxMsgLen; // IN: length of message to be send (set for each transmit call) | 105 | // ---------------------- |
110 | // ---------------------- | 106 | unsigned int m_uiBufferNumber; // OUT: number of the buffer, set by ethernetdriver |
111 | unsigned int m_uiBufferNumber; // OUT: number of the buffer, set by ethernetdriver | 107 | BYTE *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver |
112 | BYTE * m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver | 108 | tEplNetTime m_NetTime; // OUT: Timestamp of end of transmission, set by ethernetdriver |
113 | tEplNetTime m_NetTime; // OUT: Timestamp of end of transmission, set by ethernetdriver | 109 | // ---------------------- |
114 | // ---------------------- | 110 | unsigned int m_uiMaxBufferLen; // IN/OUT: maximum length of the buffer |
115 | unsigned int m_uiMaxBufferLen; // IN/OUT: maximum length of the buffer | ||
116 | } tEdrvTxBuffer; | 111 | } tEdrvTxBuffer; |
117 | 112 | ||
118 | // format of a rx-buffer | 113 | // format of a rx-buffer |
119 | typedef struct _tEdrvRxBuffer | 114 | typedef struct _tEdrvRxBuffer { |
120 | { | 115 | tEdrvBufferInFrame m_BufferInFrame; // OUT position of received buffer in an ethernet-frame |
121 | tEdrvBufferInFrame m_BufferInFrame; // OUT position of received buffer in an ethernet-frame | 116 | unsigned int m_uiRxMsgLen; // OUT: length of received buffer (without CRC) |
122 | unsigned int m_uiRxMsgLen; // OUT: length of received buffer (without CRC) | 117 | BYTE *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver |
123 | BYTE * m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver | 118 | tEplNetTime m_NetTime; // OUT: Timestamp of end of receiption |
124 | tEplNetTime m_NetTime; // OUT: Timestamp of end of receiption | ||
125 | 119 | ||
126 | } tEdrvRxBuffer; | 120 | } tEdrvRxBuffer; |
127 | 121 | ||
128 | |||
129 | |||
130 | //typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, tBufferDescr * pbBuffer_p); | 122 | //typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, tBufferDescr * pbBuffer_p); |
131 | //typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); | 123 | //typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); |
132 | typedef void (*tEdrvRxHandler) (tEdrvRxBuffer * pRxBuffer_p); | 124 | typedef void (*tEdrvRxHandler) (tEdrvRxBuffer * pRxBuffer_p); |
133 | typedef void (*tEdrvTxHandler) (tEdrvTxBuffer * pTxBuffer_p); | 125 | typedef void (*tEdrvTxHandler) (tEdrvTxBuffer * pTxBuffer_p); |
134 | 126 | ||
135 | |||
136 | // format of init structure | 127 | // format of init structure |
137 | typedef struct | 128 | typedef struct { |
138 | { | 129 | BYTE m_abMyMacAddr[6]; // the own MAC address |
139 | BYTE m_abMyMacAddr[6]; // the own MAC address | ||
140 | 130 | ||
141 | // BYTE m_bNoOfRxBuffDescr; // number of entries in rx bufferdescriptor table | 131 | // BYTE m_bNoOfRxBuffDescr; // number of entries in rx bufferdescriptor table |
142 | // tBufferDescr * m_pRxBuffDescrTable; // rx bufferdescriptor table | 132 | // tBufferDescr * m_pRxBuffDescrTable; // rx bufferdescriptor table |
143 | // WORD m_wRxBufferSize; // size of the whole rx buffer | 133 | // WORD m_wRxBufferSize; // size of the whole rx buffer |
144 | 134 | ||
145 | tEdrvRxHandler m_pfnRxHandler; | 135 | tEdrvRxHandler m_pfnRxHandler; |
146 | tEdrvTxHandler m_pfnTxHandler; | 136 | tEdrvTxHandler m_pfnTxHandler; |
147 | 137 | ||
148 | } tEdrvInitParam; | 138 | } tEdrvInitParam; |
149 | 139 | ||
150 | |||
151 | //--------------------------------------------------------------------------- | 140 | //--------------------------------------------------------------------------- |
152 | // function prototypes | 141 | // function prototypes |
153 | //--------------------------------------------------------------------------- | 142 | //--------------------------------------------------------------------------- |
154 | 143 | ||
144 | tEplKernel EdrvInit(tEdrvInitParam * pEdrvInitParam_p); | ||
155 | 145 | ||
156 | tEplKernel EdrvInit (tEdrvInitParam* pEdrvInitParam_p); | 146 | tEplKernel EdrvShutdown(void); |
157 | |||
158 | tEplKernel EdrvShutdown (void); | ||
159 | 147 | ||
160 | tEplKernel EdrvDefineRxMacAddrEntry (BYTE * pbMacAddr_p); | 148 | tEplKernel EdrvDefineRxMacAddrEntry(BYTE * pbMacAddr_p); |
161 | tEplKernel EdrvUndefineRxMacAddrEntry (BYTE * pbMacAddr_p); | 149 | tEplKernel EdrvUndefineRxMacAddrEntry(BYTE * pbMacAddr_p); |
162 | 150 | ||
163 | //tEplKernel EdrvDefineUnicastEntry (BYTE * pbUCEntry_p); | 151 | //tEplKernel EdrvDefineUnicastEntry (BYTE * pbUCEntry_p); |
164 | //tEplKernel EdrvUndfineUnicastEntry (BYTE * pbUCEntry_p); | 152 | //tEplKernel EdrvUndfineUnicastEntry (BYTE * pbUCEntry_p); |
165 | 153 | ||
166 | tEplKernel EdrvAllocTxMsgBuffer (tEdrvTxBuffer * pBuffer_p); | 154 | tEplKernel EdrvAllocTxMsgBuffer(tEdrvTxBuffer * pBuffer_p); |
167 | tEplKernel EdrvReleaseTxMsgBuffer (tEdrvTxBuffer * pBuffer_p); | 155 | tEplKernel EdrvReleaseTxMsgBuffer(tEdrvTxBuffer * pBuffer_p); |
168 | 156 | ||
169 | //tEplKernel EdrvWriteMsg (tBufferDescr * pbBuffer_p); | 157 | //tEplKernel EdrvWriteMsg (tBufferDescr * pbBuffer_p); |
170 | tEplKernel EdrvSendTxMsg (tEdrvTxBuffer * pBuffer_p); | 158 | tEplKernel EdrvSendTxMsg(tEdrvTxBuffer * pBuffer_p); |
171 | tEplKernel EdrvTxMsgReady (tEdrvTxBuffer * pBuffer_p); | 159 | tEplKernel EdrvTxMsgReady(tEdrvTxBuffer * pBuffer_p); |
172 | tEplKernel EdrvTxMsgStart (tEdrvTxBuffer * pBuffer_p); | 160 | tEplKernel EdrvTxMsgStart(tEdrvTxBuffer * pBuffer_p); |
173 | 161 | ||
174 | //tEplKernel EdrvReadMsg (void); | 162 | //tEplKernel EdrvReadMsg (void); |
175 | 163 | ||
176 | // interrupt handler called by target specific interrupt handler | 164 | // interrupt handler called by target specific interrupt handler |
177 | void EdrvInterruptHandler (void); | 165 | void EdrvInterruptHandler(void); |
178 | |||
179 | |||
180 | |||
181 | #endif // #ifndef _EDRV_H_ | ||
182 | |||
183 | 166 | ||
167 | #endif // #ifndef _EDRV_H_ | ||
diff --git a/drivers/staging/epl/global.h b/drivers/staging/epl/global.h index 797e1f27835c..fe167165a836 100644 --- a/drivers/staging/epl/global.h +++ b/drivers/staging/epl/global.h | |||
@@ -22,50 +22,49 @@ | |||
22 | #ifndef _GLOBAL_H_ | 22 | #ifndef _GLOBAL_H_ |
23 | #define _GLOBAL_H_ | 23 | #define _GLOBAL_H_ |
24 | 24 | ||
25 | |||
26 | //--------------------------------------------------------------------------- | 25 | //--------------------------------------------------------------------------- |
27 | // elements of defines for development system | 26 | // elements of defines for development system |
28 | //--------------------------------------------------------------------------- | 27 | //--------------------------------------------------------------------------- |
29 | 28 | ||
30 | // these defines are necessary to check some of characteristics of the development system | 29 | // these defines are necessary to check some of characteristics of the development system |
31 | #define _DEV_BIGEND_ 0x80000000L // big endian (motorolla format) | 30 | #define _DEV_BIGEND_ 0x80000000L // big endian (motorolla format) |
32 | #define _DEV_ALIGNMENT_4_ 0x00400000L // the CPU needs alignment of 4 bytes | 31 | #define _DEV_ALIGNMENT_4_ 0x00400000L // the CPU needs alignment of 4 bytes |
33 | #define _DEV_ONLY_INT_MAIN_ 0x00004000L // the compiler needs "int main(int)" instead of "void main(void)" | 32 | #define _DEV_ONLY_INT_MAIN_ 0x00004000L // the compiler needs "int main(int)" instead of "void main(void)" |
34 | #define _DEV_COMMA_EXT_ 0x00002000L // support of last comma in struct predefinition | 33 | #define _DEV_COMMA_EXT_ 0x00002000L // support of last comma in struct predefinition |
35 | #define _DEV_64BIT_SUPPORT_ 0x00001000L // support of 64 bit operations | 34 | #define _DEV_64BIT_SUPPORT_ 0x00001000L // support of 64 bit operations |
36 | #define _DEV_BIT64_ 0x00000400L // count of bits: 64 bit | 35 | #define _DEV_BIT64_ 0x00000400L // count of bits: 64 bit |
37 | #define _DEV_BIT32_ 0x00000300L // 32 bit | 36 | #define _DEV_BIT32_ 0x00000300L // 32 bit |
38 | #define _DEV_BIT16_ 0x00000200L // 16 bit | 37 | #define _DEV_BIT16_ 0x00000200L // 16 bit |
39 | #define _DEV_BIT8_ 0x00000100L // 8 bit | 38 | #define _DEV_BIT8_ 0x00000100L // 8 bit |
40 | #define _DEV_RVCT_ARM_ 0x0000001CL // RealView ARM | 39 | #define _DEV_RVCT_ARM_ 0x0000001CL // RealView ARM |
41 | #define _DEV_RENESASM32C 0x0000001BL // compiler from: Renesas | 40 | #define _DEV_RENESASM32C 0x0000001BL // compiler from: Renesas |
42 | #define _DEV_GNUC_MIPS2_ 0x0000001AL // GNU for MIPS2 | 41 | #define _DEV_GNUC_MIPS2_ 0x0000001AL // GNU for MIPS2 |
43 | #define _DEV_MPLAB_C30_ 0x00000019L // MPLAB C30 for Microchip dsPIC33F series | 42 | #define _DEV_MPLAB_C30_ 0x00000019L // MPLAB C30 for Microchip dsPIC33F series |
44 | #define _DEV_GNUC_TC_ 0x00000018L // GNU for Infineon TriCore | 43 | #define _DEV_GNUC_TC_ 0x00000018L // GNU for Infineon TriCore |
45 | #define _DEV_GNUC_X86_ 0x00000017L // GNU for I386 | 44 | #define _DEV_GNUC_X86_ 0x00000017L // GNU for I386 |
46 | #define _DEV_IAR_ARM_ 0x00000016L // ARM IAR C/C++ Compiler | 45 | #define _DEV_IAR_ARM_ 0x00000016L // ARM IAR C/C++ Compiler |
47 | #define _DEV_PARADGM_X86 0x00000015L // Paradigm C/C++ for Beck 1x3 | 46 | #define _DEV_PARADGM_X86 0x00000015L // Paradigm C/C++ for Beck 1x3 |
48 | #define _DEV_GNUC_CF_ 0x00000014L // GNU for Coldfire | 47 | #define _DEV_GNUC_CF_ 0x00000014L // GNU for Coldfire |
49 | #define _DEV_KEIL_ARM_ 0x00000013L // Keil ARM | 48 | #define _DEV_KEIL_ARM_ 0x00000013L // Keil ARM |
50 | #define _DEV_MSEVC_ 0x00000012L // Microsoft embedded Visual C/C++ | 49 | #define _DEV_MSEVC_ 0x00000012L // Microsoft embedded Visual C/C++ |
51 | #define _DEV_HIGHTEC_GNUC_X86_ 0x00000011L // Hightec elf386 gcc | 50 | #define _DEV_HIGHTEC_GNUC_X86_ 0x00000011L // Hightec elf386 gcc |
52 | #define _DEV_MSVC_RTX_ 0x00000010L // VC600 + RTX | 51 | #define _DEV_MSVC_RTX_ 0x00000010L // VC600 + RTX |
53 | #define _DEV_MSVC_V1_5_ 0x0000000FL // Microsoft Visual C/C++ V1.5 | 52 | #define _DEV_MSVC_V1_5_ 0x0000000FL // Microsoft Visual C/C++ V1.5 |
54 | #define _DEV_GNUC_ARM7_ 0x0000000EL // GNU Compiler gcc for ARM7 | 53 | #define _DEV_GNUC_ARM7_ 0x0000000EL // GNU Compiler gcc for ARM7 |
55 | #define _DEV_METROWERKS_CW_ 0x0000000DL // Metrowerks Code Warrior | 54 | #define _DEV_METROWERKS_CW_ 0x0000000DL // Metrowerks Code Warrior |
56 | #define _DEV_MITSUBISHIM16C_ 0x0000000CL //compiler from: Mitsubishi | 55 | #define _DEV_MITSUBISHIM16C_ 0x0000000CL //compiler from: Mitsubishi |
57 | #define _DEV_GNUC_C16X_ 0x0000000BL // GNU Compiler gcc166 for Infineon C16x | 56 | #define _DEV_GNUC_C16X_ 0x0000000BL // GNU Compiler gcc166 for Infineon C16x |
58 | #define _DEV_LINUX_GCC_ 0x0000000AL // Linux GNU Compiler gcc | 57 | #define _DEV_LINUX_GCC_ 0x0000000AL // Linux GNU Compiler gcc |
59 | #define _DEV_GNUC_MPC5X5 0x00000009L // GNU for Motorola PPC5x5 | 58 | #define _DEV_GNUC_MPC5X5 0x00000009L // GNU for Motorola PPC5x5 |
60 | #define _DEV_TASKINGM16C_ 0x00000008L // Tasking for Mitsubishi M16C | 59 | #define _DEV_TASKINGM16C_ 0x00000008L // Tasking for Mitsubishi M16C |
61 | #define _DEV_FUJITSU_ 0x00000007L // Fujitsu | 60 | #define _DEV_FUJITSU_ 0x00000007L // Fujitsu |
62 | #define _DEV_TASKING8_ 0x00000006L // Tasking 8051 | 61 | #define _DEV_TASKING8_ 0x00000006L // Tasking 8051 |
63 | #define _DEV_TASKING16_ 0x00000005L // Tasking 166 | 62 | #define _DEV_TASKING16_ 0x00000005L // Tasking 166 |
64 | #define _DEV_KEIL8_ 0x00000004L // Keil C51 | 63 | #define _DEV_KEIL8_ 0x00000004L // Keil C51 |
65 | #define _DEV_KEIL16_ 0x00000003L // Keil C166 | 64 | #define _DEV_KEIL16_ 0x00000003L // Keil C166 |
66 | #define _DEV_BORLANDC_ 0x00000002L // Borland C/C++ | 65 | #define _DEV_BORLANDC_ 0x00000002L // Borland C/C++ |
67 | #define _DEV_MSVC16_ 0x00000001L // Microsoft Visual C/C++ | 66 | #define _DEV_MSVC16_ 0x00000001L // Microsoft Visual C/C++ |
68 | #define _DEV_MSVC32_ 0x00000000L // Microsoft Visual C/C++ | 67 | #define _DEV_MSVC32_ 0x00000000L // Microsoft Visual C/C++ |
69 | 68 | ||
70 | // these defines can be used to mask previous elements | 69 | // these defines can be used to mask previous elements |
71 | #define _DEV_MASK_COMPILER 0x000000FFL | 70 | #define _DEV_MASK_COMPILER 0x000000FFL |
@@ -73,7 +72,6 @@ | |||
73 | #define _DEV_MASK_ADDSUPPORT 0x0000F000L | 72 | #define _DEV_MASK_ADDSUPPORT 0x0000F000L |
74 | #define _DEV_MASK_ALIGNMENT 0x00F00000L | 73 | #define _DEV_MASK_ALIGNMENT 0x00F00000L |
75 | 74 | ||
76 | |||
77 | //--------------------------------------------------------------------------- | 75 | //--------------------------------------------------------------------------- |
78 | // defines for development system (DEV_SYSTEM) including previous elements | 76 | // defines for development system (DEV_SYSTEM) including previous elements |
79 | //--------------------------------------------------------------------------- | 77 | //--------------------------------------------------------------------------- |
@@ -81,34 +79,34 @@ | |||
81 | #define _DEV_WIN16_ (_DEV_BIT16_ | _DEV_MSVC16_ ) | 79 | #define _DEV_WIN16_ (_DEV_BIT16_ | _DEV_MSVC16_ ) |
82 | #define _DEV_WIN32_ (_DEV_BIT32_ | _DEV_MSVC32_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 80 | #define _DEV_WIN32_ (_DEV_BIT32_ | _DEV_MSVC32_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
83 | #define _DEV_MSVC_DOS_ (_DEV_BIT32_ | _DEV_MSVC_V1_5_ ) | 81 | #define _DEV_MSVC_DOS_ (_DEV_BIT32_ | _DEV_MSVC_V1_5_ ) |
84 | #define _DEV_BORLAND_DOS_ (_DEV_BIT32_ | _DEV_BORLANDC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 82 | #define _DEV_BORLAND_DOS_ (_DEV_BIT32_ | _DEV_BORLANDC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
85 | #define _DEV_KEIL_C51X_ (_DEV_BIT8_ | _DEV_KEIL8_ | _DEV_BIGEND_ | _DEV_COMMA_EXT_) // at least C51 version 7.05 supports comma extension | 83 | #define _DEV_KEIL_C51X_ (_DEV_BIT8_ | _DEV_KEIL8_ | _DEV_BIGEND_ | _DEV_COMMA_EXT_) // at least C51 version 7.05 supports comma extension |
86 | #define _DEV_KEIL_C16X_ (_DEV_BIT16_ | _DEV_KEIL16_ | _DEV_COMMA_EXT_) // at least C166 version 5.03 supports comma extension | 84 | #define _DEV_KEIL_C16X_ (_DEV_BIT16_ | _DEV_KEIL16_ | _DEV_COMMA_EXT_) // at least C166 version 5.03 supports comma extension |
87 | #define _DEV_TASKING_C51X_ (_DEV_BIT8_ | _DEV_TASKING8_ | _DEV_BIGEND_) | 85 | #define _DEV_TASKING_C51X_ (_DEV_BIT8_ | _DEV_TASKING8_ | _DEV_BIGEND_) |
88 | #define _DEV_TASKING_C16X_ (_DEV_BIT16_ | _DEV_TASKING16_ ) | 86 | #define _DEV_TASKING_C16X_ (_DEV_BIT16_ | _DEV_TASKING16_ ) |
89 | #define _DEV_FUJITSU_F590_ (_DEV_BIT8_ | _DEV_FUJITSU_ | _DEV_COMMA_EXT_) // softune is not able to support 64 bit variables QWORD !!! | 87 | #define _DEV_FUJITSU_F590_ (_DEV_BIT8_ | _DEV_FUJITSU_ | _DEV_COMMA_EXT_) // softune is not able to support 64 bit variables QWORD !!! |
90 | //f.j.29.04.03 M16C kann effektiv mit Bytes umgehen | 88 | //f.j.29.04.03 M16C kann effektiv mit Bytes umgehen |
91 | //#define _DEV_TASKING_M16C_ (_DEV_BIT16_ | _DEV_TASKINGM16C_ ) | 89 | //#define _DEV_TASKING_M16C_ (_DEV_BIT16_ | _DEV_TASKINGM16C_ ) |
92 | #define _DEV_TASKING_M16C_ (_DEV_BIT8_ | _DEV_TASKINGM16C_ ) | 90 | #define _DEV_TASKING_M16C_ (_DEV_BIT8_ | _DEV_TASKINGM16C_ ) |
93 | #define _DEV_MITSUBISHI_M16C_ (_DEV_BIT8_ | _DEV_MITSUBISHIM16C_ ) | 91 | #define _DEV_MITSUBISHI_M16C_ (_DEV_BIT8_ | _DEV_MITSUBISHIM16C_ ) |
94 | #define _DEV_GNU_MPC5X5_ (_DEV_BIT32_ | _DEV_GNUC_MPC5X5| _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 92 | #define _DEV_GNU_MPC5X5_ (_DEV_BIT32_ | _DEV_GNUC_MPC5X5| _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
95 | #define _DEV_LINUX_ (_DEV_BIT32_ | _DEV_LINUX_GCC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 93 | #define _DEV_LINUX_ (_DEV_BIT32_ | _DEV_LINUX_GCC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
96 | #define _DEV_GNU_C16X_ (_DEV_BIT16_ | _DEV_GNUC_C16X_ ) //| _DEV_COMMA_EXT_) | 94 | #define _DEV_GNU_C16X_ (_DEV_BIT16_ | _DEV_GNUC_C16X_ ) //| _DEV_COMMA_EXT_) |
97 | #define _DEV_MCW_MPC5X5_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 95 | #define _DEV_MCW_MPC5X5_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
98 | #define _DEV_GNU_ARM7_ (_DEV_BIT32_ | _DEV_GNUC_ARM7_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) | 96 | #define _DEV_GNU_ARM7_ (_DEV_BIT32_ | _DEV_GNUC_ARM7_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) |
99 | #define _DEV_WIN32_RTX_ (_DEV_BIT32_ | _DEV_MSVC_RTX_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 97 | #define _DEV_WIN32_RTX_ (_DEV_BIT32_ | _DEV_MSVC_RTX_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
100 | #define _DEV_HIGHTEC_X86_ (_DEV_BIT32_ | _DEV_HIGHTEC_GNUC_X86_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 98 | #define _DEV_HIGHTEC_X86_ (_DEV_BIT32_ | _DEV_HIGHTEC_GNUC_X86_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
101 | #define _DEV_WIN_CE_ (_DEV_BIT32_ | _DEV_MSEVC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 99 | #define _DEV_WIN_CE_ (_DEV_BIT32_ | _DEV_MSEVC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
102 | #define _DEV_KEIL_CARM_ (_DEV_BIT32_ | _DEV_KEIL_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 100 | #define _DEV_KEIL_CARM_ (_DEV_BIT32_ | _DEV_KEIL_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
103 | #define _DEV_IAR_CARM_ (_DEV_BIT32_ | _DEV_IAR_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 101 | #define _DEV_IAR_CARM_ (_DEV_BIT32_ | _DEV_IAR_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
104 | #define _DEV_RVCT_CARM_ (_DEV_BIT32_ | _DEV_RVCT_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) | 102 | #define _DEV_RVCT_CARM_ (_DEV_BIT32_ | _DEV_RVCT_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) |
105 | #define _DEV_MCW_MCF5XXX_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 103 | #define _DEV_MCW_MCF5XXX_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
106 | #define _DEV_GNU_CF5282_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_) | 104 | #define _DEV_GNU_CF5282_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_) |
107 | #define _DEV_PAR_BECK1X3_ (_DEV_BIT16_ | _DEV_PARADGM_X86) | 105 | #define _DEV_PAR_BECK1X3_ (_DEV_BIT16_ | _DEV_PARADGM_X86) |
108 | #define _DEV_GNU_CF548X_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) | 106 | #define _DEV_GNU_CF548X_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) |
109 | #define _DEV_GNU_I386_ (_DEV_BIT32_ | _DEV_GNUC_X86_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) | 107 | #define _DEV_GNU_I386_ (_DEV_BIT32_ | _DEV_GNUC_X86_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) |
110 | #define _DEV_GNU_TRICORE_ (_DEV_BIT32_ | _DEV_GNUC_TC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_ | _DEV_ALIGNMENT_4_) | 108 | #define _DEV_GNU_TRICORE_ (_DEV_BIT32_ | _DEV_GNUC_TC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_ | _DEV_ALIGNMENT_4_) |
111 | #define _DEV_MPLAB_DSPIC33F_ (_DEV_BIT16_ | _DEV_MPLAB_C30_ ) //| _DEV_COMMA_EXT_) | 109 | #define _DEV_MPLAB_DSPIC33F_ (_DEV_BIT16_ | _DEV_MPLAB_C30_ ) //| _DEV_COMMA_EXT_) |
112 | #define _DEV_GNU_MIPSEL_ (_DEV_BIT32_ | _DEV_GNUC_MIPS2_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) | 110 | #define _DEV_GNU_MIPSEL_ (_DEV_BIT32_ | _DEV_GNUC_MIPS2_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) |
113 | 111 | ||
114 | #define _DEV_RENESAS_M32C_ (_DEV_BIT32_ | _DEV_RENESASM32C) | 112 | #define _DEV_RENESAS_M32C_ (_DEV_BIT32_ | _DEV_RENESASM32C) |
@@ -120,7 +118,6 @@ | |||
120 | #define CHECK_IF_ONLY_INT_MAIN() (DEV_SYSTEM & _DEV_ONLY_INT_MAIN_) | 118 | #define CHECK_IF_ONLY_INT_MAIN() (DEV_SYSTEM & _DEV_ONLY_INT_MAIN_) |
121 | #define CHECK_MEMORY_ALINMENT() (DEV_SYSTEM & _DEV_MASK_ALIGNMENT) | 119 | #define CHECK_MEMORY_ALINMENT() (DEV_SYSTEM & _DEV_MASK_ALIGNMENT) |
122 | 120 | ||
123 | |||
124 | //--------------------------------------------------------------------------- | 121 | //--------------------------------------------------------------------------- |
125 | // defines for target system (TARGET_SYSTEM) | 122 | // defines for target system (TARGET_SYSTEM) |
126 | //--------------------------------------------------------------------------- | 123 | //--------------------------------------------------------------------------- |
@@ -134,14 +131,13 @@ | |||
134 | #define _PXROS_ 2 | 131 | #define _PXROS_ 2 |
135 | #define _ECOSPRO_ 3 | 132 | #define _ECOSPRO_ 3 |
136 | 133 | ||
137 | |||
138 | //--------------------------------------------------------------------------- | 134 | //--------------------------------------------------------------------------- |
139 | // definitions for function inlining | 135 | // definitions for function inlining |
140 | //--------------------------------------------------------------------------- | 136 | //--------------------------------------------------------------------------- |
141 | 137 | ||
142 | #define INLINE_FUNCTION // empty define | 138 | #define INLINE_FUNCTION // empty define |
143 | #undef INLINE_ENABLED // disable actual inlining of functions | 139 | #undef INLINE_ENABLED // disable actual inlining of functions |
144 | #undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default | 140 | #undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default |
145 | 141 | ||
146 | //--------------------------------------------------------------------------- | 142 | //--------------------------------------------------------------------------- |
147 | // definitions for Keil C51 | 143 | // definitions for Keil C51 |
@@ -149,35 +145,34 @@ | |||
149 | 145 | ||
150 | #ifdef __C51__ | 146 | #ifdef __C51__ |
151 | 147 | ||
152 | #define TARGET_SYSTEM _NO_OS_ | 148 | #define TARGET_SYSTEM _NO_OS_ |
153 | #define DEV_SYSTEM _DEV_KEIL_C51X_ | 149 | #define DEV_SYSTEM _DEV_KEIL_C51X_ |
154 | 150 | ||
155 | #pragma DEBUG OBJECTEXTEND | 151 | #pragma DEBUG OBJECTEXTEND |
156 | #pragma WARNINGLEVEL(2) // maximum warning level | 152 | #pragma WARNINGLEVEL(2) // maximum warning level |
157 | 153 | ||
158 | #define NEAR idata // variables mapped to internal data storage location | 154 | #define NEAR idata // variables mapped to internal data storage location |
159 | #define FAR xdata // variables mapped to external data storage location | 155 | #define FAR xdata // variables mapped to external data storage location |
160 | #define CONST const // variables mapped to ROM (i.e. flash) | 156 | #define CONST const // variables mapped to ROM (i.e. flash) |
161 | #define ROM code // code or variables mapped to ROM (i.e. flash) | 157 | #define ROM code // code or variables mapped to ROM (i.e. flash) |
162 | // usage: CONST BYTE ROM foo = 0x00; | 158 | // usage: CONST BYTE ROM foo = 0x00; |
163 | #define HWACC xdata // hardware access through external memory (i.e. CAN) | 159 | #define HWACC xdata // hardware access through external memory (i.e. CAN) |
164 | #define LARGE large // functions set parameters to external data storage location | 160 | #define LARGE large // functions set parameters to external data storage location |
165 | 161 | ||
166 | // These types can be adjusted by users to match application requirements. The goal is to | 162 | // These types can be adjusted by users to match application requirements. The goal is to |
167 | // minimize code memory and maximize speed. | 163 | // minimize code memory and maximize speed. |
168 | #define GENERIC // generic pointer to point to application data | 164 | #define GENERIC // generic pointer to point to application data |
169 | // Variables with this attribute can be located in external | 165 | // Variables with this attribute can be located in external |
170 | // or internal data memory. | 166 | // or internal data memory. |
171 | #define MEM xdata // Memory attribute to optimize speed and code of pointer access. | 167 | #define MEM xdata // Memory attribute to optimize speed and code of pointer access. |
172 | 168 | ||
173 | #define REENTRANT reentrant | 169 | #define REENTRANT reentrant |
174 | #define PUBLIC | 170 | #define PUBLIC |
175 | |||
176 | #ifndef NDEBUG | ||
177 | #include <stdio.h> // prototype printf() (for TRACE) | ||
178 | #define TRACE printf | ||
179 | #endif | ||
180 | 171 | ||
172 | #ifndef NDEBUG | ||
173 | #include <stdio.h> // prototype printf() (for TRACE) | ||
174 | #define TRACE printf | ||
175 | #endif | ||
181 | 176 | ||
182 | //--------------------------------------------------------------------------- | 177 | //--------------------------------------------------------------------------- |
183 | // definitions for GNU Compiler for Infineon C16x | 178 | // definitions for GNU Compiler for Infineon C16x |
@@ -185,36 +180,36 @@ | |||
185 | //--------------------------------------------------------------------------- | 180 | //--------------------------------------------------------------------------- |
186 | #elif defined (__GNUC__) && defined (__C166__) | 181 | #elif defined (__GNUC__) && defined (__C166__) |
187 | 182 | ||
188 | #define TARGET_SYSTEM _NO_OS_ | 183 | #define TARGET_SYSTEM _NO_OS_ |
189 | #define DEV_SYSTEM _DEV_GNU_C16X_ | 184 | #define DEV_SYSTEM _DEV_GNU_C16X_ |
190 | 185 | ||
191 | // #define NEAR idata // variables mapped to internal data storage location | 186 | // #define NEAR idata // variables mapped to internal data storage location |
192 | #define NEAR near // variables mapped to internal data storage location | 187 | #define NEAR near // variables mapped to internal data storage location |
193 | // #define FAR xhuge // variables mapped to external data storage location | 188 | // #define FAR xhuge // variables mapped to external data storage location |
194 | #define FAR huge // variables mapped to external data storage location | 189 | #define FAR huge // variables mapped to external data storage location |
195 | #define CONST const // variables mapped to ROM (i.e. flash) | 190 | #define CONST const // variables mapped to ROM (i.e. flash) |
196 | #define ROM // code or variables mapped to ROM (i.e. flash) | 191 | #define ROM // code or variables mapped to ROM (i.e. flash) |
197 | // usage: CONST BYTE ROM foo = 0x00; | 192 | // usage: CONST BYTE ROM foo = 0x00; |
198 | // #define HWACC sdata // hardware access through external memory (i.e. CAN) | 193 | // #define HWACC sdata // hardware access through external memory (i.e. CAN) |
199 | #define HWACC huge // hardware access through external memory (i.e. CAN) | 194 | #define HWACC huge // hardware access through external memory (i.e. CAN) |
200 | #define LARGE // functions set parameters to external data storage location | 195 | #define LARGE // functions set parameters to external data storage location |
201 | 196 | ||
202 | // These types can be adjusted by users to match application requirements. The goal is to | 197 | // These types can be adjusted by users to match application requirements. The goal is to |
203 | // minimize code memory and maximize speed. | 198 | // minimize code memory and maximize speed. |
204 | // #define GENERIC xhuge // generic pointer to point to application data | 199 | // #define GENERIC xhuge // generic pointer to point to application data |
205 | #define GENERIC huge // generic pointer to point to application data | 200 | #define GENERIC huge // generic pointer to point to application data |
206 | // Variables with this attribute can be located in external | 201 | // Variables with this attribute can be located in external |
207 | // or internal data memory. | 202 | // or internal data memory. |
208 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 203 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
209 | 204 | ||
210 | #define REENTRANT | 205 | #define REENTRANT |
211 | #define PUBLIC | 206 | #define PUBLIC |
212 | 207 | ||
213 | #ifndef NDEBUG | 208 | #ifndef NDEBUG |
214 | #include <stdio.h> // prototype printf() (for TRACE) | 209 | #include <stdio.h> // prototype printf() (for TRACE) |
215 | #define TRACE printf | 210 | #define TRACE printf |
216 | 211 | ||
217 | #define ASSERT(p) \ | 212 | #define ASSERT(p) \ |
218 | if (p) \ | 213 | if (p) \ |
219 | { \ | 214 | { \ |
220 | ; \ | 215 | ; \ |
@@ -224,213 +219,213 @@ | |||
224 | PRINTF0("Assert failed: " #p " (file %s line %d)\n", __FILE__, (int) __LINE__ ); \ | 219 | PRINTF0("Assert failed: " #p " (file %s line %d)\n", __FILE__, (int) __LINE__ ); \ |
225 | while (1); \ | 220 | while (1); \ |
226 | } | 221 | } |
227 | #else | 222 | #else |
228 | #define ASSERT(p) | 223 | #define ASSERT(p) |
229 | #endif | 224 | #endif |
230 | 225 | ||
231 | //--------------------------------------------------------------------------- | 226 | //--------------------------------------------------------------------------- |
232 | // definitions for Keil C166 | 227 | // definitions for Keil C166 |
233 | //--------------------------------------------------------------------------- | 228 | //--------------------------------------------------------------------------- |
234 | #elif defined (__C166__) // 24.01.2005 r.d.: Keil ARM7 needs directive 'defined' | 229 | #elif defined (__C166__) // 24.01.2005 r.d.: Keil ARM7 needs directive 'defined' |
235 | 230 | ||
236 | #define TARGET_SYSTEM _NO_OS_ | 231 | #define TARGET_SYSTEM _NO_OS_ |
237 | #define DEV_SYSTEM _DEV_KEIL_C16X_ | 232 | #define DEV_SYSTEM _DEV_KEIL_C16X_ |
238 | 233 | ||
239 | #pragma CODE | 234 | #pragma CODE |
240 | #pragma MOD167 | 235 | #pragma MOD167 |
241 | #pragma NOINIT | 236 | #pragma NOINIT |
242 | #pragma DEBUG | 237 | #pragma DEBUG |
243 | #pragma WARNINGLEVEL(3) // maximum warning level | 238 | #pragma WARNINGLEVEL(3) // maximum warning level |
244 | #pragma WARNING DISABLE = 47 // warning <unreferenced parameter> = OFF | 239 | #pragma WARNING DISABLE = 47 // warning <unreferenced parameter> = OFF |
245 | #pragma WARNING DISABLE = 38 // warning <empty translation unit> = OFF | 240 | #pragma WARNING DISABLE = 38 // warning <empty translation unit> = OFF |
246 | // #pragma WARNING DISABLE = 102 // warning <different const/volatile qualifiers> = OFF | 241 | // #pragma WARNING DISABLE = 102 // warning <different const/volatile qualifiers> = OFF |
247 | #pragma WARNING DISABLE = 174 // warning <unreferenced 'static' function> = OFF | 242 | #pragma WARNING DISABLE = 174 // warning <unreferenced 'static' function> = OFF |
248 | #pragma WARNING DISABLE = 183 // warning <dead assignement eliminated> = OFF | 243 | #pragma WARNING DISABLE = 183 // warning <dead assignement eliminated> = OFF |
249 | 244 | ||
250 | #define NEAR idata // variables mapped to internal data storage location | 245 | #define NEAR idata // variables mapped to internal data storage location |
251 | #define FAR xhuge // variables mapped to external data storage location | 246 | #define FAR xhuge // variables mapped to external data storage location |
252 | #define CONST const // variables mapped to ROM (i.e. flash) | 247 | #define CONST const // variables mapped to ROM (i.e. flash) |
253 | #define ROM // code or variables mapped to ROM (i.e. flash) | 248 | #define ROM // code or variables mapped to ROM (i.e. flash) |
254 | // usage: CONST BYTE ROM foo = 0x00; | 249 | // usage: CONST BYTE ROM foo = 0x00; |
255 | // #define HWACC sdata // hardware access through external memory (i.e. CAN) | 250 | // #define HWACC sdata // hardware access through external memory (i.e. CAN) |
256 | #define HWACC huge // hardware access through external memory (i.e. CAN) | 251 | #define HWACC huge // hardware access through external memory (i.e. CAN) |
257 | #define LARGE // functions set parameters to external data storage location | 252 | #define LARGE // functions set parameters to external data storage location |
258 | 253 | ||
259 | // These types can be adjusted by users to match application requirements. The goal is to | 254 | // These types can be adjusted by users to match application requirements. The goal is to |
260 | // minimize code memory and maximize speed. | 255 | // minimize code memory and maximize speed. |
261 | #define GENERIC xhuge // generic pointer to point to application data | 256 | #define GENERIC xhuge // generic pointer to point to application data |
262 | // Variables with this attribute can be located in external | 257 | // Variables with this attribute can be located in external |
263 | // or internal data memory. | 258 | // or internal data memory. |
264 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 259 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
265 | 260 | ||
266 | #define REENTRANT | 261 | #define REENTRANT |
267 | #define PUBLIC | 262 | #define PUBLIC |
268 | 263 | ||
269 | #ifndef NDEBUG | 264 | #ifndef NDEBUG |
270 | #include <stdio.h> // prototype printf() (for TRACE) | 265 | #include <stdio.h> // prototype printf() (for TRACE) |
271 | #define TRACE printf | 266 | #define TRACE printf |
272 | #endif | 267 | #endif |
273 | 268 | ||
274 | //--------------------------------------------------------------------------- | 269 | //--------------------------------------------------------------------------- |
275 | // definitions for MPLAB C30 for dsPIC33F series | 270 | // definitions for MPLAB C30 for dsPIC33F series |
276 | //--------------------------------------------------------------------------- | 271 | //--------------------------------------------------------------------------- |
277 | #elif defined (__C30__) | 272 | #elif defined (__C30__) |
278 | 273 | ||
279 | #define TARGET_SYSTEM _NO_OS_ | 274 | #define TARGET_SYSTEM _NO_OS_ |
280 | #define DEV_SYSTEM _DEV_MPLAB_DSPIC33F_ | 275 | #define DEV_SYSTEM _DEV_MPLAB_DSPIC33F_ |
281 | 276 | ||
282 | #define NEAR // variables mapped to internal data storage location | 277 | #define NEAR // variables mapped to internal data storage location |
283 | #define FAR // variables mapped to external data storage location | 278 | #define FAR // variables mapped to external data storage location |
284 | #define CONST const // variables mapped to ROM (i.e. flash) | 279 | #define CONST const // variables mapped to ROM (i.e. flash) |
285 | #define ROM // code or variables mapped to ROM (i.e. flash) | 280 | #define ROM // code or variables mapped to ROM (i.e. flash) |
286 | // usage: CONST BYTE ROM foo = 0x00; | 281 | // usage: CONST BYTE ROM foo = 0x00; |
287 | #define HWACC // hardware access through external memory (i.e. CAN) | 282 | #define HWACC // hardware access through external memory (i.e. CAN) |
288 | #define LARGE // functions set parameters to external data storage location | 283 | #define LARGE // functions set parameters to external data storage location |
289 | 284 | ||
290 | // These types can be adjusted by users to match application requirements. The goal is to | 285 | // These types can be adjusted by users to match application requirements. The goal is to |
291 | // minimize code memory and maximize speed. | 286 | // minimize code memory and maximize speed. |
292 | #define GENERIC // generic pointer to point to application data | 287 | #define GENERIC // generic pointer to point to application data |
293 | // Variables with this attribute can be located in external | 288 | // Variables with this attribute can be located in external |
294 | // or internal data memory. | 289 | // or internal data memory. |
295 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 290 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
296 | 291 | ||
297 | #define REENTRANT | 292 | #define REENTRANT |
298 | #define PUBLIC | 293 | #define PUBLIC |
299 | 294 | ||
300 | // #ifndef QWORD | 295 | // #ifndef QWORD |
301 | // #define QWORD long long | 296 | // #define QWORD long long |
302 | // #endif | 297 | // #endif |
303 | 298 | ||
304 | #ifndef NDEBUG | 299 | #ifndef NDEBUG |
305 | #include <stdio.h> // prototype printf() (for TRACE) | 300 | #include <stdio.h> // prototype printf() (for TRACE) |
306 | #define TRACE printf | 301 | #define TRACE printf |
307 | #endif | 302 | #endif |
308 | 303 | ||
309 | //--------------------------------------------------------------------------- | 304 | //--------------------------------------------------------------------------- |
310 | // definitions for Keil ARM | 305 | // definitions for Keil ARM |
311 | //--------------------------------------------------------------------------- | 306 | //--------------------------------------------------------------------------- |
312 | #elif defined (__CA__) | 307 | #elif defined (__CA__) |
313 | 308 | ||
314 | #define TARGET_SYSTEM _NO_OS_ | 309 | #define TARGET_SYSTEM _NO_OS_ |
315 | #define DEV_SYSTEM _DEV_KEIL_CARM_ | 310 | #define DEV_SYSTEM _DEV_KEIL_CARM_ |
316 | 311 | ||
317 | #define NEAR // variables mapped to internal data storage location | 312 | #define NEAR // variables mapped to internal data storage location |
318 | #define FAR // variables mapped to external data storage location | 313 | #define FAR // variables mapped to external data storage location |
319 | #define CONST const // variables mapped to ROM (i.e. flash) | 314 | #define CONST const // variables mapped to ROM (i.e. flash) |
320 | #define ROM // code or variables mapped to ROM (i.e. flash) | 315 | #define ROM // code or variables mapped to ROM (i.e. flash) |
321 | // usage: CONST BYTE ROM foo = 0x00; | 316 | // usage: CONST BYTE ROM foo = 0x00; |
322 | #define HWACC // hardware access through external memory (i.e. CAN) | 317 | #define HWACC // hardware access through external memory (i.e. CAN) |
323 | #define LARGE // functions set parameters to external data storage location | 318 | #define LARGE // functions set parameters to external data storage location |
324 | 319 | ||
325 | // These types can be adjusted by users to match application requirements. The goal is to | 320 | // These types can be adjusted by users to match application requirements. The goal is to |
326 | // minimize code memory and maximize speed. | 321 | // minimize code memory and maximize speed. |
327 | #define GENERIC // generic pointer to point to application data | 322 | #define GENERIC // generic pointer to point to application data |
328 | // Variables with this attribute can be located in external | 323 | // Variables with this attribute can be located in external |
329 | // or internal data memory. | 324 | // or internal data memory. |
330 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 325 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
331 | 326 | ||
332 | #define REENTRANT | 327 | #define REENTRANT |
333 | #define PUBLIC | 328 | #define PUBLIC |
334 | 329 | ||
335 | #ifndef QWORD | 330 | #ifndef QWORD |
336 | #define QWORD long long | 331 | #define QWORD long long |
337 | #endif | 332 | #endif |
338 | 333 | ||
339 | #ifndef NDEBUG | 334 | #ifndef NDEBUG |
340 | #include <stdio.h> // prototype printf() (for TRACE) | 335 | #include <stdio.h> // prototype printf() (for TRACE) |
341 | #define TRACE printf | 336 | #define TRACE printf |
342 | #endif | 337 | #endif |
343 | 338 | ||
344 | //--------------------------------------------------------------------------- | 339 | //--------------------------------------------------------------------------- |
345 | // definitions for RealView ARM compilation tools (provided by recent Keil Microcontroller Development Kits) | 340 | // definitions for RealView ARM compilation tools (provided by recent Keil Microcontroller Development Kits) |
346 | //--------------------------------------------------------------------------- | 341 | //--------------------------------------------------------------------------- |
347 | #elif defined (__ARMCC_VERSION) | 342 | #elif defined (__ARMCC_VERSION) |
348 | 343 | ||
349 | #define TARGET_SYSTEM _NO_OS_ | 344 | #define TARGET_SYSTEM _NO_OS_ |
350 | #define DEV_SYSTEM _DEV_RVCT_CARM_ | 345 | #define DEV_SYSTEM _DEV_RVCT_CARM_ |
351 | 346 | ||
352 | #define NEAR // variables mapped to internal data storage location | 347 | #define NEAR // variables mapped to internal data storage location |
353 | #define FAR // variables mapped to external data storage location | 348 | #define FAR // variables mapped to external data storage location |
354 | #define CONST const // variables mapped to ROM (i.e. flash) | 349 | #define CONST const // variables mapped to ROM (i.e. flash) |
355 | #define ROM // code or variables mapped to ROM (i.e. flash) | 350 | #define ROM // code or variables mapped to ROM (i.e. flash) |
356 | // usage: CONST BYTE ROM foo = 0x00; | 351 | // usage: CONST BYTE ROM foo = 0x00; |
357 | #define HWACC // hardware access through external memory (i.e. CAN) | 352 | #define HWACC // hardware access through external memory (i.e. CAN) |
358 | #define LARGE // functions set parameters to external data storage location | 353 | #define LARGE // functions set parameters to external data storage location |
359 | 354 | ||
360 | // These types can be adjusted by users to match application requirements. The goal is to | 355 | // These types can be adjusted by users to match application requirements. The goal is to |
361 | // minimize code memory and maximize speed. | 356 | // minimize code memory and maximize speed. |
362 | #define GENERIC // generic pointer to point to application data | 357 | #define GENERIC // generic pointer to point to application data |
363 | // Variables with this attribute can be located in external | 358 | // Variables with this attribute can be located in external |
364 | // or internal data memory. | 359 | // or internal data memory. |
365 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 360 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
366 | 361 | ||
367 | #define REENTRANT | 362 | #define REENTRANT |
368 | #define PUBLIC | 363 | #define PUBLIC |
369 | 364 | ||
370 | #ifndef QWORD | 365 | #ifndef QWORD |
371 | #define QWORD long long | 366 | #define QWORD long long |
372 | #endif | 367 | #endif |
373 | 368 | ||
374 | #ifndef NDEBUG | 369 | #ifndef NDEBUG |
375 | #define ASSERT(expr) if (!(expr)) {\ | 370 | #define ASSERT(expr) if (!(expr)) {\ |
376 | TRACE0 ("Assertion failed: " #expr );\ | 371 | TRACE0 ("Assertion failed: " #expr );\ |
377 | while (1);} | 372 | while (1);} |
378 | #else | 373 | #else |
379 | #define ASSERT(expr) | 374 | #define ASSERT(expr) |
380 | #endif | 375 | #endif |
381 | 376 | ||
382 | #ifndef NDEBUG | 377 | #ifndef NDEBUG |
383 | #include <stdio.h> // prototype printf() (for TRACE) | 378 | #include <stdio.h> // prototype printf() (for TRACE) |
384 | #define TRACE printf | 379 | #define TRACE printf |
385 | #endif | 380 | #endif |
386 | 381 | ||
387 | //--------------------------------------------------------------------------- | 382 | //--------------------------------------------------------------------------- |
388 | // definitions for ARM IAR C Compiler | 383 | // definitions for ARM IAR C Compiler |
389 | //--------------------------------------------------------------------------- | 384 | //--------------------------------------------------------------------------- |
390 | #elif defined (__ICCARM__) | 385 | #elif defined (__ICCARM__) |
391 | 386 | ||
392 | #define TARGET_SYSTEM _NO_OS_ | 387 | #define TARGET_SYSTEM _NO_OS_ |
393 | #define DEV_SYSTEM _DEV_IAR_CARM_ | 388 | #define DEV_SYSTEM _DEV_IAR_CARM_ |
394 | 389 | ||
395 | #define NEAR // variables mapped to internal data storage location | 390 | #define NEAR // variables mapped to internal data storage location |
396 | #define FAR // variables mapped to external data storage location | 391 | #define FAR // variables mapped to external data storage location |
397 | #define CONST const // variables mapped to ROM (i.e. flash) | 392 | #define CONST const // variables mapped to ROM (i.e. flash) |
398 | #define ROM // code or variables mapped to ROM (i.e. flash) | 393 | #define ROM // code or variables mapped to ROM (i.e. flash) |
399 | // usage: CONST BYTE ROM foo = 0x00; | 394 | // usage: CONST BYTE ROM foo = 0x00; |
400 | #define HWACC // hardware access through external memory (i.e. CAN) | 395 | #define HWACC // hardware access through external memory (i.e. CAN) |
401 | #define LARGE // functions set parameters to external data storage location | 396 | #define LARGE // functions set parameters to external data storage location |
402 | 397 | ||
403 | // These types can be adjusted by users to match application requirements. The goal is to | 398 | // These types can be adjusted by users to match application requirements. The goal is to |
404 | // minimize code memory and maximize speed. | 399 | // minimize code memory and maximize speed. |
405 | #define GENERIC // generic pointer to point to application data | 400 | #define GENERIC // generic pointer to point to application data |
406 | // Variables with this attribute can be located in external | 401 | // Variables with this attribute can be located in external |
407 | // or internal data memory. | 402 | // or internal data memory. |
408 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 403 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
409 | 404 | ||
410 | #define REENTRANT | 405 | #define REENTRANT |
411 | #define PUBLIC | 406 | #define PUBLIC |
412 | 407 | ||
413 | #ifndef QWORD | 408 | #ifndef QWORD |
414 | #define QWORD long long | 409 | #define QWORD long long |
415 | #endif | 410 | #endif |
416 | 411 | ||
417 | // Workaround: | 412 | // Workaround: |
418 | // If we use IAR and want to debug but don't want to use C-Spy Debugger | 413 | // If we use IAR and want to debug but don't want to use C-Spy Debugger |
419 | // assert() doesn't work in debug mode because it needs support for FILE descriptors | 414 | // assert() doesn't work in debug mode because it needs support for FILE descriptors |
420 | // (_DLIB_FILE_DESCRIPTOR == 1). | 415 | // (_DLIB_FILE_DESCRIPTOR == 1). |
421 | #ifndef NDEBUG | 416 | #ifndef NDEBUG |
422 | #define ASSERT(expr) if (!(expr)) {\ | 417 | #define ASSERT(expr) if (!(expr)) {\ |
423 | TRACE0 ("Assertion failed: " #expr );\ | 418 | TRACE0 ("Assertion failed: " #expr );\ |
424 | while (1);} | 419 | while (1);} |
425 | #else | 420 | #else |
426 | #define ASSERT(expr) | 421 | #define ASSERT(expr) |
427 | #endif | 422 | #endif |
428 | 423 | ||
429 | #ifndef NDEBUG | 424 | #ifndef NDEBUG |
430 | #include <stdio.h> // prototype printf() (for TRACE) | 425 | #include <stdio.h> // prototype printf() (for TRACE) |
431 | #define TRACE printf | 426 | #define TRACE printf |
432 | // #define TRACE PRINTF4 | 427 | // #define TRACE PRINTF4 |
433 | #endif | 428 | #endif |
434 | 429 | ||
435 | //--------------------------------------------------------------------------- | 430 | //--------------------------------------------------------------------------- |
436 | // definitions for Tasking 8051 | 431 | // definitions for Tasking 8051 |
@@ -438,34 +433,33 @@ | |||
438 | 433 | ||
439 | #elif defined (_CC51) | 434 | #elif defined (_CC51) |
440 | 435 | ||
441 | #include <cc51.h> | 436 | #include <cc51.h> |
442 | 437 | ||
443 | #define TARGET_SYSTEM _NO_OS_ | 438 | #define TARGET_SYSTEM _NO_OS_ |
444 | #define DEV_SYSTEM _DEV_TASKING_C51X_ | 439 | #define DEV_SYSTEM _DEV_TASKING_C51X_ |
445 | 440 | ||
446 | #define NEAR _data // variables mapped to internal data storage location | 441 | #define NEAR _data // variables mapped to internal data storage location |
447 | #define FAR _xdat // variables mapped to external data storage location | 442 | #define FAR _xdat // variables mapped to external data storage location |
448 | #define CONST const // variables mapped to ROM (i.e. flash) | 443 | #define CONST const // variables mapped to ROM (i.e. flash) |
449 | #define ROM // code or variables mapped to ROM (i.e. flash) | 444 | #define ROM // code or variables mapped to ROM (i.e. flash) |
450 | // usage: CONST BYTE ROM foo = 0x00; | 445 | // usage: CONST BYTE ROM foo = 0x00; |
451 | #define HWACC _xdat // hardware access through external memory (i.e. CAN) | 446 | #define HWACC _xdat // hardware access through external memory (i.e. CAN) |
452 | #define LARGE // functions set parameters to external data storage location | 447 | #define LARGE // functions set parameters to external data storage location |
453 | 448 | ||
454 | // These types can be adjusted by users to match application requirements. The goal is to | 449 | // These types can be adjusted by users to match application requirements. The goal is to |
455 | // minimize code memory and maximize speed. | 450 | // minimize code memory and maximize speed. |
456 | #define GENERIC // generic pointer to point to application data | 451 | #define GENERIC // generic pointer to point to application data |
457 | // Variables with this attribute can be located in external | 452 | // Variables with this attribute can be located in external |
458 | // or internal data memory. | 453 | // or internal data memory. |
459 | #define MEM _xdat // Memory attribute to optimize speed and code of pointer access. | 454 | #define MEM _xdat // Memory attribute to optimize speed and code of pointer access. |
460 | |||
461 | #define REENTRANT _reentrant | ||
462 | #define PUBLIC | ||
463 | 455 | ||
464 | #ifndef NDEBUG | 456 | #define REENTRANT _reentrant |
465 | #include <stdio.h> // prototype printf() (for TRACE) | 457 | #define PUBLIC |
466 | #define TRACE printf | ||
467 | #endif | ||
468 | 458 | ||
459 | #ifndef NDEBUG | ||
460 | #include <stdio.h> // prototype printf() (for TRACE) | ||
461 | #define TRACE printf | ||
462 | #endif | ||
469 | 463 | ||
470 | //--------------------------------------------------------------------------- | 464 | //--------------------------------------------------------------------------- |
471 | // definitions for Tasking C167CR and C164CI | 465 | // definitions for Tasking C167CR and C164CI |
@@ -473,35 +467,34 @@ | |||
473 | 467 | ||
474 | #elif defined (_C166) | 468 | #elif defined (_C166) |
475 | 469 | ||
476 | #define TARGET_SYSTEM _NO_OS_ | 470 | #define TARGET_SYSTEM _NO_OS_ |
477 | #define DEV_SYSTEM _DEV_TASKING_C16X_ | 471 | #define DEV_SYSTEM _DEV_TASKING_C16X_ |
478 | 472 | ||
479 | #define NEAR near // variables mapped to internal data storage location | 473 | #define NEAR near // variables mapped to internal data storage location |
480 | #define FAR far // variables mapped to external data storage location | 474 | #define FAR far // variables mapped to external data storage location |
481 | #define CONST const // variables mapped to ROM (i.e. flash) | 475 | #define CONST const // variables mapped to ROM (i.e. flash) |
482 | #define ROM // code or variables mapped to ROM (i.e. flash) | 476 | #define ROM // code or variables mapped to ROM (i.e. flash) |
483 | // usage: CONST BYTE ROM foo = 0x00; | 477 | // usage: CONST BYTE ROM foo = 0x00; |
484 | #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) | 478 | #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) |
485 | #define LARGE // functions set parameters to external data storage location | 479 | #define LARGE // functions set parameters to external data storage location |
486 | 480 | ||
487 | // These types can be adjusted by users to match application requirements. The goal is to | 481 | // These types can be adjusted by users to match application requirements. The goal is to |
488 | // minimize code memory and maximize speed. | 482 | // minimize code memory and maximize speed. |
489 | #define GENERIC // generic pointer to point to application data | 483 | #define GENERIC // generic pointer to point to application data |
490 | // Variables with this attribute can be located in external | 484 | // Variables with this attribute can be located in external |
491 | // or internal data memory. | 485 | // or internal data memory. |
492 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 486 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
493 | 487 | ||
494 | #define REENTRANT | 488 | #define REENTRANT |
495 | #define PUBLIC | 489 | #define PUBLIC |
496 | 490 | ||
497 | // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL | 491 | // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL |
498 | // without checking if it is already included. So an error occurs while compiling. | 492 | // without checking if it is already included. So an error occurs while compiling. |
499 | // (r.d.) | 493 | // (r.d.) |
500 | #include <stdio.h> // prototype printf() (for TRACE) | 494 | #include <stdio.h> // prototype printf() (for TRACE) |
501 | #ifndef NDEBUG | 495 | #ifndef NDEBUG |
502 | #define TRACE printf | 496 | #define TRACE printf |
503 | #endif | 497 | #endif |
504 | |||
505 | 498 | ||
506 | //--------------------------------------------------------------------------- | 499 | //--------------------------------------------------------------------------- |
507 | // definitions for FUJITSU FFMC-16LX MB90590 | 500 | // definitions for FUJITSU FFMC-16LX MB90590 |
@@ -510,34 +503,33 @@ | |||
510 | //#elif (defined (F590) || defined (F543) || defined (F598) || defined (F495) || defined (F350)) | 503 | //#elif (defined (F590) || defined (F543) || defined (F598) || defined (F495) || defined (F350)) |
511 | #elif defined(__COMPILER_FCC907__) | 504 | #elif defined(__COMPILER_FCC907__) |
512 | 505 | ||
513 | #define TARGET_SYSTEM _NO_OS_ | 506 | #define TARGET_SYSTEM _NO_OS_ |
514 | #define DEV_SYSTEM _DEV_FUJITSU_F590_ | 507 | #define DEV_SYSTEM _DEV_FUJITSU_F590_ |
515 | 508 | ||
516 | #define NEAR /* to be defined */ // variables mapped to internal data storage location | 509 | #define NEAR /* to be defined */ // variables mapped to internal data storage location |
517 | #define FAR /* to be defined */ // variables mapped to external data storage location | 510 | #define FAR /* to be defined */ // variables mapped to external data storage location |
518 | #define CONST const // variables mapped to ROM (i.e. flash) | 511 | #define CONST const // variables mapped to ROM (i.e. flash) |
519 | #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) | 512 | #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) |
520 | // usage: CONST BYTE ROM foo = 0x00; | 513 | // usage: CONST BYTE ROM foo = 0x00; |
521 | #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) | 514 | #define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN) |
522 | #define LARGE // functions set parameters to external data storage location | 515 | #define LARGE // functions set parameters to external data storage location |
523 | 516 | ||
524 | // These types can be adjusted by users to match application requirements. The goal is to | 517 | // These types can be adjusted by users to match application requirements. The goal is to |
525 | // minimize code memory and maximize speed. | 518 | // minimize code memory and maximize speed. |
526 | #define GENERIC // generic pointer to point to application data | 519 | #define GENERIC // generic pointer to point to application data |
527 | // Variables with this attribute can be located in external | 520 | // Variables with this attribute can be located in external |
528 | // or internal data memory. | 521 | // or internal data memory. |
529 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 522 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
530 | 523 | ||
531 | // softune is not able to support 64 bit variables QWORD !!! | 524 | // softune is not able to support 64 bit variables QWORD !!! |
532 | 525 | ||
533 | #define REENTRANT | 526 | #define REENTRANT |
534 | #define PUBLIC | 527 | #define PUBLIC |
535 | |||
536 | #ifndef NDEBUG | ||
537 | #include <stdio.h> // prototype printf() (for TRACE) | ||
538 | #define TRACE printf | ||
539 | #endif | ||
540 | 528 | ||
529 | #ifndef NDEBUG | ||
530 | #include <stdio.h> // prototype printf() (for TRACE) | ||
531 | #define TRACE printf | ||
532 | #endif | ||
541 | 533 | ||
542 | //--------------------------------------------------------------------------- | 534 | //--------------------------------------------------------------------------- |
543 | // definitions for Mitsubishi M16C family for TASKING Compiler CM16 | 535 | // definitions for Mitsubishi M16C family for TASKING Compiler CM16 |
@@ -545,36 +537,35 @@ | |||
545 | 537 | ||
546 | #elif defined (_CM16C) | 538 | #elif defined (_CM16C) |
547 | 539 | ||
548 | #define TARGET_SYSTEM _NO_OS_ | 540 | #define TARGET_SYSTEM _NO_OS_ |
549 | #define DEV_SYSTEM _DEV_TASKING_M16C_ | 541 | #define DEV_SYSTEM _DEV_TASKING_M16C_ |
550 | 542 | ||
551 | #define NEAR _near // variables mapped to internal data storage location | 543 | #define NEAR _near // variables mapped to internal data storage location |
552 | #define FAR _far // variables mapped to external data storage location | 544 | #define FAR _far // variables mapped to external data storage location |
553 | #define CONST _farrom // variables mapped to ROM (i.e. flash) | 545 | #define CONST _farrom // variables mapped to ROM (i.e. flash) |
554 | #define ROM // code or variables mapped to ROM (i.e. flash) | 546 | #define ROM // code or variables mapped to ROM (i.e. flash) |
555 | // usage: CONST BYTE ROM foo = 0x00; | 547 | // usage: CONST BYTE ROM foo = 0x00; |
556 | #define HWACC _near // hardware access through external memory (i.e. CAN) | 548 | #define HWACC _near // hardware access through external memory (i.e. CAN) |
557 | #define LARGE // functions set parameters to external data storage location | 549 | #define LARGE // functions set parameters to external data storage location |
558 | 550 | ||
559 | // These types can be adjusted by users to match application requirements. The goal is to | 551 | // These types can be adjusted by users to match application requirements. The goal is to |
560 | // minimize code memory and maximize speed. | 552 | // minimize code memory and maximize speed. |
561 | #define GENERIC _far // generic pointer to point to application data | 553 | #define GENERIC _far // generic pointer to point to application data |
562 | // Variables with this attribute can be located in external | 554 | // Variables with this attribute can be located in external |
563 | // or internal data memory. | 555 | // or internal data memory. |
564 | // do you use memory model SMALL, than you have to set _far | 556 | // do you use memory model SMALL, than you have to set _far |
565 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 557 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
566 | 558 | ||
567 | #define REENTRANT | 559 | #define REENTRANT |
568 | #define PUBLIC | 560 | #define PUBLIC |
569 | 561 | ||
570 | // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL | 562 | // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL |
571 | // without checking if it is already included. So an error occurs while compiling. | 563 | // without checking if it is already included. So an error occurs while compiling. |
572 | // (r.d.) | 564 | // (r.d.) |
573 | #include <stdio.h> // prototype printf() (for TRACE) | 565 | #include <stdio.h> // prototype printf() (for TRACE) |
574 | #ifndef NDEBUG | 566 | #ifndef NDEBUG |
575 | #define TRACE printf | 567 | #define TRACE printf |
576 | #endif | 568 | #endif |
577 | |||
578 | 569 | ||
579 | //--------------------------------------------------------------------------- | 570 | //--------------------------------------------------------------------------- |
580 | // definitions for Mitsubishi M16C family for Mitsubishi Compiler NC30 | 571 | // definitions for Mitsubishi M16C family for Mitsubishi Compiler NC30 |
@@ -582,61 +573,61 @@ | |||
582 | // name NC30, andere Form will der Compiler nicht !! | 573 | // name NC30, andere Form will der Compiler nicht !! |
583 | #elif defined (NC30) | 574 | #elif defined (NC30) |
584 | 575 | ||
585 | #define TARGET_SYSTEM _NO_OS_ | 576 | #define TARGET_SYSTEM _NO_OS_ |
586 | #define DEV_SYSTEM _DEV_MITSUBISHI_M16C_ | 577 | #define DEV_SYSTEM _DEV_MITSUBISHI_M16C_ |
587 | 578 | ||
588 | #define NEAR near // variables mapped to internal data storage location | 579 | #define NEAR near // variables mapped to internal data storage location |
589 | #define FAR far // variables mapped to external data storage location | 580 | #define FAR far // variables mapped to external data storage location |
590 | #define CONST const // variables mapped to ROM (i.e. flash) | 581 | #define CONST const // variables mapped to ROM (i.e. flash) |
591 | #define ROM // code or variables mapped to ROM (i.e. flash) | 582 | #define ROM // code or variables mapped to ROM (i.e. flash) |
592 | // usage: CONST BYTE ROM foo = 0x00; | 583 | // usage: CONST BYTE ROM foo = 0x00; |
593 | #define HWACC near // hardware access through external memory (i.e. CAN) | 584 | #define HWACC near // hardware access through external memory (i.e. CAN) |
594 | #define LARGE // functions set parameters to external data storage location | 585 | #define LARGE // functions set parameters to external data storage location |
595 | 586 | ||
596 | // These types can be adjusted by users to match application requirements. The goal is to | 587 | // These types can be adjusted by users to match application requirements. The goal is to |
597 | // minimize code memory and maximize speed. | 588 | // minimize code memory and maximize speed. |
598 | #define GENERIC far // generic pointer to point to application data | 589 | #define GENERIC far // generic pointer to point to application data |
599 | // Variables with this attribute can be located in external | 590 | // Variables with this attribute can be located in external |
600 | // or internal data memory. | 591 | // or internal data memory. |
601 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 592 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
602 | 593 | ||
603 | #define REENTRANT | 594 | #define REENTRANT |
604 | #define PUBLIC | 595 | #define PUBLIC |
605 | 596 | ||
606 | #ifndef NDEBUG | 597 | #ifndef NDEBUG |
607 | #include <stdio.h> // prototype printf() (for TRACE) | 598 | #include <stdio.h> // prototype printf() (for TRACE) |
608 | #define TRACE printf | 599 | #define TRACE printf |
609 | #endif | 600 | #endif |
610 | 601 | ||
611 | //--------------------------------------------------------------------------- | 602 | //--------------------------------------------------------------------------- |
612 | // definitions for Renesas M32C family for Renesas Compiler | 603 | // definitions for Renesas M32C family for Renesas Compiler |
613 | //--------------------------------------------------------------------------- | 604 | //--------------------------------------------------------------------------- |
614 | #elif defined (NC308) | 605 | #elif defined (NC308) |
615 | 606 | ||
616 | #define TARGET_SYSTEM _NO_OS_ | 607 | #define TARGET_SYSTEM _NO_OS_ |
617 | #define DEV_SYSTEM _DEV_RENESAS_M32C_ | 608 | #define DEV_SYSTEM _DEV_RENESAS_M32C_ |
618 | 609 | ||
619 | #define NEAR near // variables mapped to internal data storage location | 610 | #define NEAR near // variables mapped to internal data storage location |
620 | #define FAR far // variables mapped to external data storage location | 611 | #define FAR far // variables mapped to external data storage location |
621 | #define CONST const // variables mapped to ROM (i.e. flash) | 612 | #define CONST const // variables mapped to ROM (i.e. flash) |
622 | #define ROM // code or variables mapped to ROM (i.e. flash) | 613 | #define ROM // code or variables mapped to ROM (i.e. flash) |
623 | #define HWACC // hardware access through external memory (i.e. CAN) | 614 | #define HWACC // hardware access through external memory (i.e. CAN) |
624 | #define LARGE // functions set parameters to external data storage location | 615 | #define LARGE // functions set parameters to external data storage location |
625 | 616 | ||
626 | // These types can be adjusted by users to match application requirements. The goal is to | 617 | // These types can be adjusted by users to match application requirements. The goal is to |
627 | // minimize code memory and maximize speed. | 618 | // minimize code memory and maximize speed. |
628 | #define GENERIC // generic pointer to point to application data | 619 | #define GENERIC // generic pointer to point to application data |
629 | // Variables with this attribute can be located in external | 620 | // Variables with this attribute can be located in external |
630 | // or internal data memory. | 621 | // or internal data memory. |
631 | #define MEM far // Memory attribute to optimize speed and code of pointer access. | 622 | #define MEM far // Memory attribute to optimize speed and code of pointer access. |
632 | 623 | ||
633 | #define REENTRANT | 624 | #define REENTRANT |
634 | #define PUBLIC | 625 | #define PUBLIC |
635 | 626 | ||
636 | #ifndef NDEBUG | 627 | #ifndef NDEBUG |
637 | #include <stdio.h> // prototype printf() (for TRACE) | 628 | #include <stdio.h> // prototype printf() (for TRACE) |
638 | #define TRACE printf | 629 | #define TRACE printf |
639 | #endif | 630 | #endif |
640 | 631 | ||
641 | // #error ("RENESAS o.k.") | 632 | // #error ("RENESAS o.k.") |
642 | 633 | ||
@@ -646,37 +637,36 @@ | |||
646 | 637 | ||
647 | #elif defined(__GNUC__) && defined(__arm__) && !defined(__LINUX_ARM_ARCH__) | 638 | #elif defined(__GNUC__) && defined(__arm__) && !defined(__LINUX_ARM_ARCH__) |
648 | 639 | ||
649 | #define TARGET_SYSTEM _NO_OS_ | 640 | #define TARGET_SYSTEM _NO_OS_ |
650 | #define DEV_SYSTEM _DEV_GNU_ARM7_ | 641 | #define DEV_SYSTEM _DEV_GNU_ARM7_ |
651 | 642 | ||
652 | #define NEAR // variables mapped to internal data storage location | 643 | #define NEAR // variables mapped to internal data storage location |
653 | #define FAR // variables mapped to external data storage location | 644 | #define FAR // variables mapped to external data storage location |
654 | #define CONST const // variables mapped to ROM (i.e. flash) | 645 | #define CONST const // variables mapped to ROM (i.e. flash) |
655 | #define ROM // code or variables mapped to ROM (i.e. flash) | 646 | #define ROM // code or variables mapped to ROM (i.e. flash) |
656 | // usage: CONST BYTE ROM foo = 0x00; | 647 | // usage: CONST BYTE ROM foo = 0x00; |
657 | #define HWACC // hardware access through external memory (i.e. CAN) | 648 | #define HWACC // hardware access through external memory (i.e. CAN) |
658 | #define LARGE // functions set parameters to external data storage location | 649 | #define LARGE // functions set parameters to external data storage location |
659 | 650 | ||
660 | // These types can be adjusted by users to match application requirements. The goal is to | 651 | // These types can be adjusted by users to match application requirements. The goal is to |
661 | // minimize code memory and maximize speed. | 652 | // minimize code memory and maximize speed. |
662 | #define GENERIC // generic pointer to point to application data | 653 | #define GENERIC // generic pointer to point to application data |
663 | // Variables with this attribute can be located in external | 654 | // Variables with this attribute can be located in external |
664 | // or internal data memory. | 655 | // or internal data memory. |
665 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 656 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
666 | #define HWACC // hardware access through external memory (i.e. CAN) | 657 | #define HWACC // hardware access through external memory (i.e. CAN) |
667 | |||
668 | #define REENTRANT | ||
669 | #define PUBLIC | ||
670 | 658 | ||
671 | #ifndef QWORD | 659 | #define REENTRANT |
672 | #define QWORD long long // i.A. durch Herr Kuschel | 660 | #define PUBLIC |
673 | #endif | ||
674 | 661 | ||
675 | #ifndef NDEBUG | 662 | #ifndef QWORD |
676 | #include <stdio.h> // prototype printf() (for TRACE) | 663 | #define QWORD long long // i.A. durch Herr Kuschel |
677 | #define TRACE printf | 664 | #endif |
678 | #endif | ||
679 | 665 | ||
666 | #ifndef NDEBUG | ||
667 | #include <stdio.h> // prototype printf() (for TRACE) | ||
668 | #define TRACE printf | ||
669 | #endif | ||
680 | 670 | ||
681 | //--------------------------------------------------------------------------- | 671 | //--------------------------------------------------------------------------- |
682 | // definitions for Motorola PowerPC family 5x5 (555/565) | 672 | // definitions for Motorola PowerPC family 5x5 (555/565) |
@@ -685,261 +675,253 @@ | |||
685 | 675 | ||
686 | #elif defined (__GNUC__) | 676 | #elif defined (__GNUC__) |
687 | 677 | ||
688 | #if defined (LINUX) || defined (linux) || defined (__linux__) | 678 | #if defined (LINUX) || defined (linux) || defined (__linux__) |
689 | #define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems | 679 | #define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems |
690 | // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: | 680 | // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: |
691 | // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). | 681 | // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). |
692 | // But Linux for PC does not need the definitions for embedded Linux. | 682 | // But Linux for PC does not need the definitions for embedded Linux. |
693 | #endif | 683 | #endif |
694 | 684 | ||
695 | // GNU C compiler supports function inlining | 685 | // GNU C compiler supports function inlining |
696 | #define INLINE_FUNCTION_DEF extern inline | 686 | #define INLINE_FUNCTION_DEF extern inline |
697 | 687 | ||
698 | // to actually enable inlining just include the following three lines | 688 | // to actually enable inlining just include the following three lines |
699 | // #undef INLINE_FUNCTION | 689 | // #undef INLINE_FUNCTION |
700 | // #define INLINE_FUNCTION INLINE_FUNCTION_DEF | 690 | // #define INLINE_FUNCTION INLINE_FUNCTION_DEF |
701 | // #define INLINE_ENABLED TRUE | 691 | // #define INLINE_ENABLED TRUE |
702 | 692 | ||
703 | #ifdef PXROS | 693 | #ifdef PXROS |
704 | #define TARGET_SYSTEM _PXROS_ | 694 | #define TARGET_SYSTEM _PXROS_ |
705 | #ifdef __i386__ | 695 | #ifdef __i386__ |
706 | #undef LINUX // this define seems to be set from compiler | 696 | #undef LINUX // this define seems to be set from compiler |
707 | #define DEV_SYSTEM _DEV_HIGHTEC_X86_ | 697 | #define DEV_SYSTEM _DEV_HIGHTEC_X86_ |
708 | #elif defined (__tricore__) | 698 | #elif defined (__tricore__) |
709 | #define DEV_SYSTEM _DEV_GNU_TRICORE_ | 699 | #define DEV_SYSTEM _DEV_GNU_TRICORE_ |
710 | #else // MPC5x5 | 700 | #else // MPC5x5 |
711 | #define DEV_SYSTEM _DEV_GNU_MPC5X5_ | 701 | #define DEV_SYSTEM _DEV_GNU_MPC5X5_ |
712 | #endif | 702 | #endif |
713 | |||
714 | #elif defined (LINUX) || defined (__linux__) | ||
715 | #define TARGET_SYSTEM _LINUX_ // Linux definition | ||
716 | #define DEV_SYSTEM _DEV_LINUX_ | ||
717 | |||
718 | #elif defined (GNU_CF5282) | ||
719 | #define TARGET_SYSTEM _NO_OS_ | ||
720 | #define DEV_SYSTEM _DEV_GNU_CF5282_ | ||
721 | 703 | ||
722 | #elif defined (ECOSPRO_I386_PEAK_PCI) | 704 | #elif defined (LINUX) || defined (__linux__) |
723 | #define TARGET_SYSTEM _ECOSPRO_ | 705 | #define TARGET_SYSTEM _LINUX_ // Linux definition |
724 | #define DEV_SYSTEM _DEV_GNU_I386_ | 706 | #define DEV_SYSTEM _DEV_LINUX_ |
725 | 707 | ||
726 | #elif defined (GNU_CF548X) | 708 | #elif defined (GNU_CF5282) |
727 | #define TARGET_SYSTEM _NO_OS_ | 709 | #define TARGET_SYSTEM _NO_OS_ |
728 | #define DEV_SYSTEM _DEV_GNU_CF548X_ | 710 | #define DEV_SYSTEM _DEV_GNU_CF5282_ |
729 | #else | ||
730 | #error 'ERROR: DEV_SYSTEM not found!' | ||
731 | #endif | ||
732 | 711 | ||
712 | #elif defined (ECOSPRO_I386_PEAK_PCI) | ||
713 | #define TARGET_SYSTEM _ECOSPRO_ | ||
714 | #define DEV_SYSTEM _DEV_GNU_I386_ | ||
733 | 715 | ||
734 | #ifndef QWORD | 716 | #elif defined (GNU_CF548X) |
735 | #define QWORD long long int | 717 | #define TARGET_SYSTEM _NO_OS_ |
736 | #endif | 718 | #define DEV_SYSTEM _DEV_GNU_CF548X_ |
719 | #else | ||
720 | #error 'ERROR: DEV_SYSTEM not found!' | ||
721 | #endif | ||
737 | 722 | ||
738 | #if (TARGET_SYSTEM == _PXROS_) | 723 | #ifndef QWORD |
724 | #define QWORD long long int | ||
725 | #endif | ||
739 | 726 | ||
740 | #ifndef __KERNEL__ | 727 | #if (TARGET_SYSTEM == _PXROS_) |
741 | #include <string.h> | ||
742 | #endif | ||
743 | 728 | ||
729 | #ifndef __KERNEL__ | ||
730 | #include <string.h> | ||
731 | #endif | ||
744 | 732 | ||
745 | #define NEAR // variables mapped to internal data storage location | 733 | #define NEAR // variables mapped to internal data storage location |
746 | #define FAR // variables mapped to external data storage location | 734 | #define FAR // variables mapped to external data storage location |
747 | #define CONST const // variables mapped to ROM (i.e. flash) | 735 | #define CONST const // variables mapped to ROM (i.e. flash) |
748 | #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) | 736 | #define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash) |
749 | // usage: CONST BYTE ROM foo = 0x00; | 737 | // usage: CONST BYTE ROM foo = 0x00; |
750 | #define LARGE // functions set parameters to external data storage location | 738 | #define LARGE // functions set parameters to external data storage location |
751 | 739 | ||
752 | // These types can be adjusted by users to match application requirements. The goal is to | 740 | // These types can be adjusted by users to match application requirements. The goal is to |
753 | // minimize code memory and maximize speed. | 741 | // minimize code memory and maximize speed. |
754 | #define GENERIC // generic pointer to point to application data | 742 | #define GENERIC // generic pointer to point to application data |
755 | // Variables with this attribute can be located in external | 743 | // Variables with this attribute can be located in external |
756 | // or internal data memory. | 744 | // or internal data memory. |
757 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 745 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
758 | 746 | ||
759 | #define HWACC // hardware access through external memory (i.e. CAN) | 747 | #define HWACC // hardware access through external memory (i.e. CAN) |
760 | 748 | ||
761 | #define REENTRANT | 749 | #define REENTRANT |
762 | #define PUBLIC | 750 | #define PUBLIC |
763 | 751 | ||
764 | #ifndef QWORD | 752 | #ifndef QWORD |
765 | #define QWORD long long int | 753 | #define QWORD long long int |
766 | #endif | 754 | #endif |
767 | 755 | ||
768 | #ifndef NDEBUG | 756 | #ifndef NDEBUG |
769 | #include <stdio.h> // prototype printf() (for TRACE) | 757 | #include <stdio.h> // prototype printf() (for TRACE) |
770 | #define TRACE printf | 758 | #define TRACE printf |
771 | #endif | 759 | #endif |
772 | 760 | ||
773 | #endif | 761 | #endif |
774 | 762 | ||
775 | // ------------------ GNUC for I386 --------------------------------------------- | 763 | // ------------------ GNUC for I386 --------------------------------------------- |
776 | 764 | ||
777 | #if (TARGET_SYSTEM == _LINUX_) || (TARGET_SYSTEM == _ECOSPRO_) | 765 | #if (TARGET_SYSTEM == _LINUX_) || (TARGET_SYSTEM == _ECOSPRO_) |
778 | 766 | ||
779 | #ifndef __KERNEL__ | 767 | #ifndef __KERNEL__ |
780 | #include <string.h> | 768 | #include <string.h> |
781 | #endif | 769 | #endif |
782 | 770 | ||
783 | #define ROM // code or variables mapped to ROM (i.e. flash) | 771 | #define ROM // code or variables mapped to ROM (i.e. flash) |
784 | // usage: CONST BYTE ROM foo = 0x00; | 772 | // usage: CONST BYTE ROM foo = 0x00; |
785 | #define HWACC // hardware access through external memory (i.e. CAN) | 773 | #define HWACC // hardware access through external memory (i.e. CAN) |
786 | 774 | ||
787 | // These types can be adjusted by users to match application requirements. The goal is to | 775 | // These types can be adjusted by users to match application requirements. The goal is to |
788 | // minimize code memory and maximize speed. | 776 | // minimize code memory and maximize speed. |
789 | #define GENERIC // generic pointer to point to application data | 777 | #define GENERIC // generic pointer to point to application data |
790 | // Variables with this attribute can be located in external | 778 | // Variables with this attribute can be located in external |
791 | // or internal data memory. | 779 | // or internal data memory. |
792 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 780 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
793 | 781 | ||
794 | #ifndef NEAR | 782 | #ifndef NEAR |
795 | #define NEAR // variables mapped to internal data storage location | 783 | #define NEAR // variables mapped to internal data storage location |
796 | #endif | 784 | #endif |
797 | 785 | ||
798 | #ifndef FAR | 786 | #ifndef FAR |
799 | #define FAR // variables mapped to external data storage location | 787 | #define FAR // variables mapped to external data storage location |
800 | #endif | 788 | #endif |
801 | 789 | ||
802 | #ifndef CONST | 790 | #ifndef CONST |
803 | #define CONST const // variables mapped to ROM (i.e. flash) | 791 | #define CONST const // variables mapped to ROM (i.e. flash) |
804 | #endif | 792 | #endif |
805 | 793 | ||
806 | #define LARGE | 794 | #define LARGE |
807 | 795 | ||
808 | #define REENTRANT | 796 | #define REENTRANT |
809 | #define PUBLIC | 797 | #define PUBLIC |
810 | 798 | ||
811 | #ifndef NDEBUG | 799 | #ifndef NDEBUG |
812 | #ifndef __KERNEL__ | 800 | #ifndef __KERNEL__ |
813 | #include <stdio.h> // prototype printf() (for TRACE) | 801 | #include <stdio.h> // prototype printf() (for TRACE) |
814 | #define TRACE printf | 802 | #define TRACE printf |
815 | #else | 803 | #else |
816 | #define TRACE printk | 804 | #define TRACE printk |
817 | #endif | 805 | #endif |
818 | #endif | 806 | #endif |
819 | #endif | 807 | #endif |
820 | 808 | ||
821 | // ------------------ GNU without OS --------------------------------------------- | 809 | // ------------------ GNU without OS --------------------------------------------- |
822 | 810 | ||
823 | #if (TARGET_SYSTEM == _NO_OS_) | 811 | #if (TARGET_SYSTEM == _NO_OS_) |
824 | 812 | ||
825 | #define ROM // code or variables mapped to ROM (i.e. flash) | 813 | #define ROM // code or variables mapped to ROM (i.e. flash) |
826 | // usage: CONST BYTE ROM foo = 0x00; | 814 | // usage: CONST BYTE ROM foo = 0x00; |
827 | #define HWACC // hardware access through external memory (i.e. CAN) | 815 | #define HWACC // hardware access through external memory (i.e. CAN) |
828 | 816 | ||
829 | // These types can be adjusted by users to match application requirements. The goal is to | 817 | // These types can be adjusted by users to match application requirements. The goal is to |
830 | // minimize code memory and maximize speed. | 818 | // minimize code memory and maximize speed. |
831 | #define GENERIC // generic pointer to point to application data | 819 | #define GENERIC // generic pointer to point to application data |
832 | // Variables with this attribute can be located in external | 820 | // Variables with this attribute can be located in external |
833 | // or internal data memory. | 821 | // or internal data memory. |
834 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 822 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
835 | 823 | ||
836 | #ifndef NEAR | 824 | #ifndef NEAR |
837 | #define NEAR // variables mapped to internal data storage location | 825 | #define NEAR // variables mapped to internal data storage location |
838 | #endif | 826 | #endif |
839 | 827 | ||
840 | #ifndef FAR | 828 | #ifndef FAR |
841 | #define FAR // variables mapped to external data storage location | 829 | #define FAR // variables mapped to external data storage location |
842 | #endif | 830 | #endif |
843 | 831 | ||
844 | #ifndef CONST | 832 | #ifndef CONST |
845 | #define CONST const // variables mapped to ROM (i.e. flash) | 833 | #define CONST const // variables mapped to ROM (i.e. flash) |
846 | #endif | 834 | #endif |
847 | 835 | ||
848 | #define LARGE | 836 | #define LARGE |
849 | 837 | ||
850 | #define REENTRANT | 838 | #define REENTRANT |
851 | #define PUBLIC | 839 | #define PUBLIC |
852 | 840 | ||
853 | #ifndef NDEBUG | 841 | #ifndef NDEBUG |
854 | // #include "xuartdrv.h" | 842 | // #include "xuartdrv.h" |
855 | // #include <stdio.h> // prototype printf() (for TRACE) | 843 | // #include <stdio.h> // prototype printf() (for TRACE) |
856 | #define TRACE printf | 844 | #define TRACE printf |
857 | // #define TRACE mprintf | 845 | // #define TRACE mprintf |
858 | // #ifndef TRACE | 846 | // #ifndef TRACE |
859 | // #define TRACE trace | 847 | // #define TRACE trace |
860 | // void trace (char *fmt, ...); | 848 | // void trace (char *fmt, ...); |
861 | // #endif | 849 | // #endif |
862 | #endif | 850 | #endif |
863 | 851 | ||
864 | #endif | 852 | #endif |
865 | 853 | ||
866 | //--------------------------------------------------------------------------- | 854 | //--------------------------------------------------------------------------- |
867 | // definitions for MPC565 | 855 | // definitions for MPC565 |
868 | //--------------------------------------------------------------------------- | 856 | //--------------------------------------------------------------------------- |
869 | #elif __MWERKS__ | 857 | #elif __MWERKS__ |
870 | 858 | ||
871 | |||
872 | #ifdef __MC68K__ | 859 | #ifdef __MC68K__ |
873 | 860 | ||
874 | #define TARGET_SYSTEM = _MCF548X_ | 861 | #define TARGET_SYSTEM = _MCF548X_ |
875 | #define DEV_SYSTEM _DEV_MCW_MCF5XXX_ | 862 | #define DEV_SYSTEM _DEV_MCW_MCF5XXX_ |
876 | 863 | ||
877 | #else | 864 | #else |
878 | #define TARGET_SYSTEM = _MPC565_ | 865 | #define TARGET_SYSTEM = _MPC565_ |
879 | #define DEV_SYSTEM _DEV_MCW_MPC5X5_ | 866 | #define DEV_SYSTEM _DEV_MCW_MPC5X5_ |
880 | #endif | 867 | #endif |
881 | 868 | ||
882 | #define NEAR // variables mapped to internal data storage location | 869 | #define NEAR // variables mapped to internal data storage location |
883 | #define FAR // variables mapped to external data storage location | 870 | #define FAR // variables mapped to external data storage location |
884 | #define CONST const // variables mapped to ROM (i.e. flash) | 871 | #define CONST const // variables mapped to ROM (i.e. flash) |
885 | #define ROM // code or variables mapped to ROM (i.e. flash) | 872 | #define ROM // code or variables mapped to ROM (i.e. flash) |
886 | // usage: CONST BYTE ROM foo = 0x00; | 873 | // usage: CONST BYTE ROM foo = 0x00; |
887 | #define LARGE // functions set parameters to external data storage location | 874 | #define LARGE // functions set parameters to external data storage location |
888 | 875 | ||
889 | // These types can be adjusted by users to match application requirements. The goal is to | 876 | // These types can be adjusted by users to match application requirements. The goal is to |
890 | // minimize code memory and maximize speed. | 877 | // minimize code memory and maximize speed. |
891 | #define GENERIC // generic pointer to point to application data | 878 | #define GENERIC // generic pointer to point to application data |
892 | // Variables with this attribute can be located in external | 879 | // Variables with this attribute can be located in external |
893 | // or internal data memory. | 880 | // or internal data memory. |
894 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 881 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
895 | 882 | ||
896 | #define HWACC // hardware access through external memory (i.e. CAN) | 883 | #define HWACC // hardware access through external memory (i.e. CAN) |
897 | 884 | ||
898 | #define REENTRANT | 885 | #define REENTRANT |
899 | #define PUBLIC | 886 | #define PUBLIC |
900 | 887 | ||
901 | #ifndef NDEBUG | 888 | #ifndef NDEBUG |
902 | #include <stdio.h> // prototype printf() (for TRACE) | 889 | #include <stdio.h> // prototype printf() (for TRACE) |
903 | #define TRACE printf | 890 | #define TRACE printf |
904 | #endif | 891 | #endif |
905 | 892 | ||
906 | //--------------------------------------------------------------------------- | 893 | //--------------------------------------------------------------------------- |
907 | // definitions for BECK 1x3 | 894 | // definitions for BECK 1x3 |
908 | //--------------------------------------------------------------------------- | 895 | //--------------------------------------------------------------------------- |
909 | #elif defined (__BORLANDC__) && defined (__PARADIGM__) | 896 | #elif defined (__BORLANDC__) && defined (__PARADIGM__) |
910 | 897 | ||
898 | #define TARGET_SYSTEM _NO_OS_ | ||
899 | #define DEV_SYSTEM _DEV_PAR_BECK1X3_ | ||
911 | 900 | ||
912 | #define TARGET_SYSTEM _NO_OS_ | 901 | #define ROM // code or variables mapped to ROM (i.e. flash) |
913 | #define DEV_SYSTEM _DEV_PAR_BECK1X3_ | 902 | // usage: CONST BYTE ROM foo = 0x00; |
914 | 903 | #define HWACC // hardware access through external memory (i.e. CAN) | |
915 | |||
916 | |||
917 | #define ROM // code or variables mapped to ROM (i.e. flash) | ||
918 | // usage: CONST BYTE ROM foo = 0x00; | ||
919 | #define HWACC // hardware access through external memory (i.e. CAN) | ||
920 | 904 | ||
921 | // These types can be adjusted by users to match application requirements. The goal is to | 905 | // These types can be adjusted by users to match application requirements. The goal is to |
922 | // minimize code memory and maximize speed. | 906 | // minimize code memory and maximize speed. |
923 | #define GENERIC // generic pointer to point to application data | 907 | #define GENERIC // generic pointer to point to application data |
924 | // Variables with this attribute can be located in external | 908 | // Variables with this attribute can be located in external |
925 | // or internal data memory. | 909 | // or internal data memory. |
926 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 910 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
927 | #define NEAR __near // variables mapped to internal data storage location | 911 | #define NEAR __near // variables mapped to internal data storage location |
928 | #define FAR __far // variables mapped to external data storage location | 912 | #define FAR __far // variables mapped to external data storage location |
929 | #define CONST const // variables mapped to ROM (i.e. flash) | 913 | #define CONST const // variables mapped to ROM (i.e. flash) |
930 | #define LARGE | 914 | #define LARGE |
931 | 915 | ||
932 | #define REENTRANT | 916 | #define REENTRANT |
933 | #define PUBLIC | 917 | #define PUBLIC |
934 | |||
935 | #ifndef NDEBUG | ||
936 | #ifndef TRACE | ||
937 | #include <stdio.h> | ||
938 | #define TRACE printf | ||
939 | #endif | ||
940 | #endif | ||
941 | |||
942 | 918 | ||
919 | #ifndef NDEBUG | ||
920 | #ifndef TRACE | ||
921 | #include <stdio.h> | ||
922 | #define TRACE printf | ||
923 | #endif | ||
924 | #endif | ||
943 | 925 | ||
944 | //--------------------------------------------------------------------------- | 926 | //--------------------------------------------------------------------------- |
945 | // definitions for PC | 927 | // definitions for PC |
@@ -949,113 +931,111 @@ | |||
949 | 931 | ||
950 | // ------------------ definition target system -------------------------- | 932 | // ------------------ definition target system -------------------------- |
951 | 933 | ||
952 | #ifdef _WIN32 | 934 | #ifdef _WIN32 |
953 | #define TARGET_SYSTEM _WIN32_ // WIN32 definition | 935 | #define TARGET_SYSTEM _WIN32_ // WIN32 definition |
954 | #define DEV_SYSTEM _DEV_WIN32_ | 936 | #define DEV_SYSTEM _DEV_WIN32_ |
955 | #else | 937 | #else |
956 | #define TARGET_SYSTEM _DOS_ | 938 | #define TARGET_SYSTEM _DOS_ |
957 | #define DEV_SYSTEM _DEV_BORLAND_DOS_ | 939 | #define DEV_SYSTEM _DEV_BORLAND_DOS_ |
958 | #endif | 940 | #endif |
959 | |||
960 | 941 | ||
961 | // ------------------ WIN32 --------------------------------------------- | 942 | // ------------------ WIN32 --------------------------------------------- |
962 | 943 | ||
963 | #if (TARGET_SYSTEM == _WIN32_) | 944 | #if (TARGET_SYSTEM == _WIN32_) |
964 | 945 | ||
965 | #define ROM // code or variables mapped to ROM (i.e. flash) | 946 | #define ROM // code or variables mapped to ROM (i.e. flash) |
966 | // usage: CONST BYTE ROM foo = 0x00; | 947 | // usage: CONST BYTE ROM foo = 0x00; |
967 | #define HWACC // hardware access through external memory (i.e. CAN) | 948 | #define HWACC // hardware access through external memory (i.e. CAN) |
968 | 949 | ||
969 | // These types can be adjusted by users to match application requirements. The goal is to | 950 | // These types can be adjusted by users to match application requirements. The goal is to |
970 | // minimize code memory and maximize speed. | 951 | // minimize code memory and maximize speed. |
971 | #define GENERIC // generic pointer to point to application data | 952 | #define GENERIC // generic pointer to point to application data |
972 | // Variables with this attribute can be located in external | 953 | // Variables with this attribute can be located in external |
973 | // or internal data memory. | 954 | // or internal data memory. |
974 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 955 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
975 | 956 | ||
976 | #ifndef NEAR | 957 | #ifndef NEAR |
977 | #define NEAR // variables mapped to internal data storage location | 958 | #define NEAR // variables mapped to internal data storage location |
978 | #endif | 959 | #endif |
979 | 960 | ||
980 | #ifndef FAR | 961 | #ifndef FAR |
981 | #define FAR // variables mapped to external data storage location | 962 | #define FAR // variables mapped to external data storage location |
982 | #endif | 963 | #endif |
983 | 964 | ||
984 | #ifndef CONST | 965 | #ifndef CONST |
985 | #define CONST const // variables mapped to ROM (i.e. flash) | 966 | #define CONST const // variables mapped to ROM (i.e. flash) |
986 | #endif | 967 | #endif |
987 | 968 | ||
988 | #define LARGE | 969 | #define LARGE |
989 | 970 | ||
990 | #define REENTRANT | 971 | #define REENTRANT |
991 | #define PUBLIC __stdcall | 972 | #define PUBLIC __stdcall |
992 | 973 | ||
993 | #ifndef NDEBUG | 974 | #ifndef NDEBUG |
994 | #ifndef TRACE | 975 | #ifndef TRACE |
995 | #include <stdio.h> | 976 | #include <stdio.h> |
996 | #define TRACE printf | 977 | #define TRACE printf |
997 | #endif | 978 | #endif |
998 | #endif | 979 | #endif |
999 | 980 | ||
1000 | #elif (TARGET_SYSTEM == _DOS_) | 981 | #elif (TARGET_SYSTEM == _DOS_) |
1001 | 982 | ||
1002 | #define ROM // code or variables mapped to ROM (i.e. flash) | 983 | #define ROM // code or variables mapped to ROM (i.e. flash) |
1003 | // usage: CONST BYTE ROM foo = 0x00; | 984 | // usage: CONST BYTE ROM foo = 0x00; |
1004 | #define HWACC // hardware access through external memory (i.e. CAN) | 985 | #define HWACC // hardware access through external memory (i.e. CAN) |
1005 | 986 | ||
1006 | // These types can be adjusted by users to match application requirements. The goal is to | 987 | // These types can be adjusted by users to match application requirements. The goal is to |
1007 | // minimize code memory and maximize speed. | 988 | // minimize code memory and maximize speed. |
1008 | #define GENERIC // generic pointer to point to application data | 989 | #define GENERIC // generic pointer to point to application data |
1009 | // Variables with this attribute can be located in external | 990 | // Variables with this attribute can be located in external |
1010 | // or internal data memory. | 991 | // or internal data memory. |
1011 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 992 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
1012 | #define NEAR near // variables mapped to internal data storage location | 993 | #define NEAR near // variables mapped to internal data storage location |
1013 | #define FAR far // variables mapped to external data storage location | 994 | #define FAR far // variables mapped to external data storage location |
1014 | #define CONST const // variables mapped to ROM (i.e. flash) | 995 | #define CONST const // variables mapped to ROM (i.e. flash) |
1015 | #define LARGE | 996 | #define LARGE |
1016 | 997 | ||
1017 | #define REENTRANT | 998 | #define REENTRANT |
1018 | #define PUBLIC | 999 | #define PUBLIC |
1019 | 1000 | ||
1020 | #ifndef NDEBUG | 1001 | #ifndef NDEBUG |
1021 | #ifndef TRACE | 1002 | #ifndef TRACE |
1022 | #include <stdio.h> | 1003 | #include <stdio.h> |
1023 | #define TRACE printf | 1004 | #define TRACE printf |
1024 | #endif | 1005 | #endif |
1025 | #endif | 1006 | #endif |
1026 | 1007 | ||
1027 | #endif | 1008 | #endif |
1028 | 1009 | ||
1029 | #elif (_MSC_VER == 800) // PC MS Visual C/C++ for DOS applications | 1010 | #elif (_MSC_VER == 800) // PC MS Visual C/C++ for DOS applications |
1030 | 1011 | ||
1031 | #define TARGET_SYSTEM _DOS_ | 1012 | #define TARGET_SYSTEM _DOS_ |
1032 | #define DEV_SYSTEM _DEV_MSVC_DOS_ | 1013 | #define DEV_SYSTEM _DEV_MSVC_DOS_ |
1033 | 1014 | ||
1034 | #define ROM // code or variables mapped to ROM (i.e. flash) | 1015 | #define ROM // code or variables mapped to ROM (i.e. flash) |
1035 | // usage: CONST BYTE ROM foo = 0x00; | 1016 | // usage: CONST BYTE ROM foo = 0x00; |
1036 | #define HWACC near // hardware access through external memory (i.e. CAN) | 1017 | #define HWACC near // hardware access through external memory (i.e. CAN) |
1037 | 1018 | ||
1038 | // These types can be adjusted by users to match application requirements. The goal is to | 1019 | // These types can be adjusted by users to match application requirements. The goal is to |
1039 | // minimize code memory and maximize speed. | 1020 | // minimize code memory and maximize speed. |
1040 | #define GENERIC // generic pointer to point to application data | 1021 | #define GENERIC // generic pointer to point to application data |
1041 | // Variables with this attribute can be located in external | 1022 | // Variables with this attribute can be located in external |
1042 | // or internal data memory. | 1023 | // or internal data memory. |
1043 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 1024 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
1044 | #define NEAR near // variables mapped to internal data storage location | 1025 | #define NEAR near // variables mapped to internal data storage location |
1045 | #define FAR far // variables mapped to external data storage location | 1026 | #define FAR far // variables mapped to external data storage location |
1046 | #define CONST const // variables mapped to ROM (i.e. flash) | 1027 | #define CONST const // variables mapped to ROM (i.e. flash) |
1047 | #define LARGE | 1028 | #define LARGE |
1048 | 1029 | ||
1049 | #define REENTRANT | 1030 | #define REENTRANT |
1050 | #define PUBLIC | 1031 | #define PUBLIC |
1051 | |||
1052 | #ifndef NDEBUG | ||
1053 | #ifndef TRACE | ||
1054 | #include <stdio.h> | ||
1055 | #define TRACE printf | ||
1056 | #endif | ||
1057 | #endif | ||
1058 | 1032 | ||
1033 | #ifndef NDEBUG | ||
1034 | #ifndef TRACE | ||
1035 | #include <stdio.h> | ||
1036 | #define TRACE printf | ||
1037 | #endif | ||
1038 | #endif | ||
1059 | 1039 | ||
1060 | //--------------------------------------------------------------------------- | 1040 | //--------------------------------------------------------------------------- |
1061 | // definitions for RTX under WIN32 | 1041 | // definitions for RTX under WIN32 |
@@ -1063,42 +1043,42 @@ | |||
1063 | #elif (defined (UNDER_RTSS) && defined (WIN32)) | 1043 | #elif (defined (UNDER_RTSS) && defined (WIN32)) |
1064 | 1044 | ||
1065 | // ------------------ definition target system -------------------------- | 1045 | // ------------------ definition target system -------------------------- |
1066 | #define TARGET_SYSTEM _WIN32_RTX_ | 1046 | #define TARGET_SYSTEM _WIN32_RTX_ |
1067 | #define DEV_SYSTEM _DEV_WIN32_RTX_ | 1047 | #define DEV_SYSTEM _DEV_WIN32_RTX_ |
1068 | 1048 | ||
1069 | #define ROM // code or variables mapped to ROM (i.e. flash) | 1049 | #define ROM // code or variables mapped to ROM (i.e. flash) |
1070 | // usage: CONST BYTE ROM foo = 0x00; | 1050 | // usage: CONST BYTE ROM foo = 0x00; |
1071 | #define HWACC // hardware access through external memory (i.e. CAN) | 1051 | #define HWACC // hardware access through external memory (i.e. CAN) |
1072 | 1052 | ||
1073 | // These types can be adjusted by users to match application requirements. The goal is to | 1053 | // These types can be adjusted by users to match application requirements. The goal is to |
1074 | // minimize code memory and maximize speed. | 1054 | // minimize code memory and maximize speed. |
1075 | #define GENERIC // generic pointer to point to application data | 1055 | #define GENERIC // generic pointer to point to application data |
1076 | // Variables with this attribute can be located in external | 1056 | // Variables with this attribute can be located in external |
1077 | // or internal data memory. | 1057 | // or internal data memory. |
1078 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 1058 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
1079 | 1059 | ||
1080 | #ifndef NEAR | 1060 | #ifndef NEAR |
1081 | #define NEAR // variables mapped to internal data storage location | 1061 | #define NEAR // variables mapped to internal data storage location |
1082 | #endif | 1062 | #endif |
1083 | 1063 | ||
1084 | #ifndef FAR | 1064 | #ifndef FAR |
1085 | #define FAR // variables mapped to external data storage location | 1065 | #define FAR // variables mapped to external data storage location |
1086 | #endif | 1066 | #endif |
1087 | 1067 | ||
1088 | #ifndef CONST | 1068 | #ifndef CONST |
1089 | #define CONST const // variables mapped to ROM (i.e. flash) | 1069 | #define CONST const // variables mapped to ROM (i.e. flash) |
1090 | #endif | 1070 | #endif |
1091 | 1071 | ||
1092 | #define LARGE | 1072 | #define LARGE |
1093 | 1073 | ||
1094 | #define REENTRANT | 1074 | #define REENTRANT |
1095 | #define PUBLIC __stdcall | 1075 | #define PUBLIC __stdcall |
1096 | 1076 | ||
1097 | #ifndef NDEBUG | 1077 | #ifndef NDEBUG |
1098 | #ifndef TRACE | 1078 | #ifndef TRACE |
1099 | #define TRACE RtPrintf | 1079 | #define TRACE RtPrintf |
1100 | #endif | 1080 | #endif |
1101 | #endif | 1081 | #endif |
1102 | 1082 | ||
1103 | //--------------------------------------------------------------------------- | 1083 | //--------------------------------------------------------------------------- |
1104 | // definitions for WinCE | 1084 | // definitions for WinCE |
@@ -1106,341 +1086,288 @@ | |||
1106 | #elif defined (_WIN32_WCE) | 1086 | #elif defined (_WIN32_WCE) |
1107 | 1087 | ||
1108 | // ------------------ definition target system -------------------------- | 1088 | // ------------------ definition target system -------------------------- |
1109 | #define TARGET_SYSTEM _WINCE_ | 1089 | #define TARGET_SYSTEM _WINCE_ |
1110 | #define DEV_SYSTEM _DEV_WIN_CE_ | 1090 | #define DEV_SYSTEM _DEV_WIN_CE_ |
1111 | 1091 | ||
1112 | #define ROM // code or variables mapped to ROM (i.e. flash) | 1092 | #define ROM // code or variables mapped to ROM (i.e. flash) |
1113 | // usage: CONST BYTE ROM foo = 0x00; | 1093 | // usage: CONST BYTE ROM foo = 0x00; |
1114 | #define HWACC // hardware access through external memory (i.e. CAN) | 1094 | #define HWACC // hardware access through external memory (i.e. CAN) |
1115 | 1095 | ||
1116 | // These types can be adjusted by users to match application requirements. The goal is to | 1096 | // These types can be adjusted by users to match application requirements. The goal is to |
1117 | // minimize code memory and maximize speed. | 1097 | // minimize code memory and maximize speed. |
1118 | #define GENERIC // generic pointer to point to application data | 1098 | #define GENERIC // generic pointer to point to application data |
1119 | // Variables with this attribute can be located in external | 1099 | // Variables with this attribute can be located in external |
1120 | // or internal data memory. | 1100 | // or internal data memory. |
1121 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 1101 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
1122 | 1102 | ||
1123 | #ifndef NEAR | 1103 | #ifndef NEAR |
1124 | #define NEAR // variables mapped to internal data storage location | 1104 | #define NEAR // variables mapped to internal data storage location |
1125 | #endif | 1105 | #endif |
1126 | 1106 | ||
1127 | #ifndef FAR | 1107 | #ifndef FAR |
1128 | #define FAR // variables mapped to external data storage location | 1108 | #define FAR // variables mapped to external data storage location |
1129 | #endif | 1109 | #endif |
1130 | 1110 | ||
1131 | #ifndef CONST | 1111 | #ifndef CONST |
1132 | #define CONST const // variables mapped to ROM (i.e. flash) | 1112 | #define CONST const // variables mapped to ROM (i.e. flash) |
1133 | #endif | 1113 | #endif |
1134 | 1114 | ||
1135 | #define LARGE | 1115 | #define LARGE |
1136 | 1116 | ||
1137 | #ifndef QWORD | 1117 | #ifndef QWORD |
1138 | //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) | 1118 | //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) |
1139 | #define QWORD __int64 | 1119 | #define QWORD __int64 |
1140 | #endif | 1120 | #endif |
1141 | 1121 | ||
1142 | #define REENTRANT | 1122 | #define REENTRANT |
1143 | #define PUBLIC __cdecl | 1123 | #define PUBLIC __cdecl |
1144 | 1124 | ||
1145 | #ifdef ASSERTMSG | 1125 | #ifdef ASSERTMSG |
1146 | #undef ASSERTMSG | 1126 | #undef ASSERTMSG |
1147 | #endif | 1127 | #endif |
1148 | 1128 | ||
1149 | #ifndef NDEBUG | 1129 | #ifndef NDEBUG |
1150 | #ifndef TRACE | 1130 | #ifndef TRACE |
1151 | #define TRACE printf | 1131 | #define TRACE printf |
1152 | // void trace (char *fmt, ...); | 1132 | // void trace (char *fmt, ...); |
1153 | #endif | 1133 | #endif |
1154 | #endif | 1134 | #endif |
1155 | 1135 | ||
1156 | #else // ===> PC MS Visual C/C++ | 1136 | #else // ===> PC MS Visual C/C++ |
1157 | 1137 | ||
1158 | // ------------------ definition target system -------------------------- | 1138 | // ------------------ definition target system -------------------------- |
1159 | 1139 | ||
1160 | #ifdef _WIN32 | 1140 | #ifdef _WIN32 |
1161 | #define TARGET_SYSTEM _WIN32_ // WIN32 definition | 1141 | #define TARGET_SYSTEM _WIN32_ // WIN32 definition |
1162 | #define DEV_SYSTEM _DEV_WIN32_ | 1142 | #define DEV_SYSTEM _DEV_WIN32_ |
1163 | #else | 1143 | #else |
1164 | #define TARGET_SYSTEM _WIN16_ // WIN16 definition | 1144 | #define TARGET_SYSTEM _WIN16_ // WIN16 definition |
1165 | #define DEV_SYSTEM _DEV_WIN16_ | 1145 | #define DEV_SYSTEM _DEV_WIN16_ |
1166 | #endif | 1146 | #endif |
1167 | |||
1168 | 1147 | ||
1169 | // ------------------ WIN16 --------------------------------------------- | 1148 | // ------------------ WIN16 --------------------------------------------- |
1170 | 1149 | ||
1171 | #if (TARGET_SYSTEM == _WIN16_) | 1150 | #if (TARGET_SYSTEM == _WIN16_) |
1172 | |||
1173 | #define ROM // code or variables mapped to ROM (i.e. flash) | ||
1174 | // usage: CONST BYTE ROM foo = 0x00; | ||
1175 | #define HWACC // hardware access through external memory (i.e. CAN) | ||
1176 | |||
1177 | // These types can be adjusted by users to match application requirements. The goal is to | ||
1178 | // minimize code memory and maximize speed. | ||
1179 | #define GENERIC // generic pointer to point to application data | ||
1180 | // Variables with this attribute can be located in external | ||
1181 | // or internal data memory. | ||
1182 | #define MEM // Memory attribute to optimize speed and code of pointer access. | ||
1183 | |||
1184 | #ifndef NEAR | ||
1185 | #define NEAR // variables mapped to internal data storage location | ||
1186 | #endif | ||
1187 | 1151 | ||
1188 | #ifndef FAR | 1152 | #define ROM // code or variables mapped to ROM (i.e. flash) |
1189 | #define FAR far // variables mapped to external data storage location | 1153 | // usage: CONST BYTE ROM foo = 0x00; |
1190 | #endif | 1154 | #define HWACC // hardware access through external memory (i.e. CAN) |
1191 | 1155 | ||
1192 | #ifndef CONST | 1156 | // These types can be adjusted by users to match application requirements. The goal is to |
1193 | #define CONST const // variables mapped to ROM (i.e. flash) | 1157 | // minimize code memory and maximize speed. |
1194 | #endif | 1158 | #define GENERIC // generic pointer to point to application data |
1159 | // Variables with this attribute can be located in external | ||
1160 | // or internal data memory. | ||
1161 | #define MEM // Memory attribute to optimize speed and code of pointer access. | ||
1195 | 1162 | ||
1196 | #define LARGE | 1163 | #ifndef NEAR |
1164 | #define NEAR // variables mapped to internal data storage location | ||
1165 | #endif | ||
1197 | 1166 | ||
1198 | #define REENTRANT | 1167 | #ifndef FAR |
1199 | #define PUBLIC _far _pascal _export | 1168 | #define FAR far // variables mapped to external data storage location |
1169 | #endif | ||
1200 | 1170 | ||
1201 | #ifndef NDEBUG | 1171 | #ifndef CONST |
1202 | #ifndef TRACE | 1172 | #define CONST const // variables mapped to ROM (i.e. flash) |
1203 | #define TRACE trace | 1173 | #endif |
1204 | #ifdef __cplusplus | ||
1205 | extern "C" | ||
1206 | { | ||
1207 | #endif | ||
1208 | void trace (const char *fmt, ...); | ||
1209 | #ifdef __cplusplus | ||
1210 | } | ||
1211 | #endif | ||
1212 | #endif | ||
1213 | #endif | ||
1214 | 1174 | ||
1215 | #endif | 1175 | #define LARGE |
1216 | 1176 | ||
1177 | #define REENTRANT | ||
1178 | #define PUBLIC _far _pascal _export | ||
1217 | 1179 | ||
1180 | #ifndef NDEBUG | ||
1181 | #ifndef TRACE | ||
1182 | #define TRACE trace | ||
1183 | #ifdef __cplusplus | ||
1184 | extern "C" { | ||
1185 | #endif | ||
1186 | void trace(const char *fmt, ...); | ||
1187 | #ifdef __cplusplus | ||
1188 | } | ||
1189 | #endif | ||
1190 | #endif | ||
1191 | #endif | ||
1192 | #endif | ||
1218 | // ------------------ WIN32 --------------------------------------------- | 1193 | // ------------------ WIN32 --------------------------------------------- |
1219 | 1194 | #if (TARGET_SYSTEM == _WIN32_) | |
1220 | #if (TARGET_SYSTEM == _WIN32_) | 1195 | #define ROM // code or variables mapped to ROM (i.e. flash) |
1221 | 1196 | // usage: CONST BYTE ROM foo = 0x00; | |
1222 | #define ROM // code or variables mapped to ROM (i.e. flash) | 1197 | #define HWACC // hardware access through external memory (i.e. CAN) |
1223 | // usage: CONST BYTE ROM foo = 0x00; | 1198 | // These types can be adjusted by users to match application requirements. The goal is to// minimize code memory and maximize speed. |
1224 | #define HWACC // hardware access through external memory (i.e. CAN) | 1199 | #define GENERIC // generic pointer to point to application data |
1225 | 1200 | // Variables with this attribute can be located in external// or internal data memory. | |
1226 | // These types can be adjusted by users to match application requirements. The goal is to | 1201 | #define MEM // Memory attribute to optimize speed and code of pointer access. |
1227 | // minimize code memory and maximize speed. | 1202 | #ifndef NEAR |
1228 | #define GENERIC // generic pointer to point to application data | 1203 | #define NEAR // variables mapped to internal data storage location |
1229 | // Variables with this attribute can be located in external | 1204 | #endif |
1230 | // or internal data memory. | 1205 | #ifndef FAR |
1231 | #define MEM // Memory attribute to optimize speed and code of pointer access. | 1206 | #define FAR // variables mapped to external data storage location |
1232 | 1207 | #endif | |
1233 | #ifndef NEAR | 1208 | #ifndef CONST |
1234 | #define NEAR // variables mapped to internal data storage location | 1209 | #define CONST const // variables mapped to ROM (i.e. flash) |
1235 | #endif | 1210 | #endif |
1236 | 1211 | #define LARGE | |
1237 | #ifndef FAR | 1212 | #define REENTRANT |
1238 | #define FAR // variables mapped to external data storage location | 1213 | #define PUBLIC __stdcall |
1239 | #endif | 1214 | #ifndef QWORD |
1240 | 1215 | //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) | |
1241 | #ifndef CONST | 1216 | #define QWORD __int64 |
1242 | #define CONST const // variables mapped to ROM (i.e. flash) | 1217 | #endif |
1243 | #endif | 1218 | #ifndef NDEBUG |
1244 | 1219 | #ifndef TRACE | |
1245 | #define LARGE | 1220 | #define TRACE trace |
1246 | 1221 | #ifdef __cplusplus | |
1247 | #define REENTRANT | 1222 | extern "C" { |
1248 | #define PUBLIC __stdcall | 1223 | #endif |
1249 | 1224 | void trace(const char *fmt, ...); | |
1250 | #ifndef QWORD | 1225 | #ifdef __cplusplus |
1251 | //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU) | 1226 | } |
1252 | #define QWORD __int64 | 1227 | #endif |
1253 | #endif | 1228 | #endif |
1254 | 1229 | #endif | |
1255 | #ifndef NDEBUG | 1230 | // MS Visual C++ compiler supports function inlining |
1256 | #ifndef TRACE | 1231 | #define INLINE_FUNCTION_DEF __forceinline |
1257 | #define TRACE trace | 1232 | // to actually enable inlining just include the following two lines// #define INLINE_FUNCTION INLINE_FUNCTION_DEF// #define INLINE_ENABLED TRUE |
1258 | #ifdef __cplusplus | 1233 | #endif |
1259 | extern "C" | 1234 | #endif // ===> PC |
1260 | { | 1235 | //---------------------------------------------------------------------------// definitions of basic types//--------------------------------------------------------------------------- |
1261 | #endif | 1236 | #ifndef _WINDEF_ // defined in WINDEF.H, included by <windows.h> |
1262 | void trace (const char *fmt, ...); | ||
1263 | #ifdef __cplusplus | ||
1264 | } | ||
1265 | #endif | ||
1266 | #endif | ||
1267 | #endif | ||
1268 | |||
1269 | // MS Visual C++ compiler supports function inlining | ||
1270 | #define INLINE_FUNCTION_DEF __forceinline | ||
1271 | |||
1272 | // to actually enable inlining just include the following two lines | ||
1273 | // #define INLINE_FUNCTION INLINE_FUNCTION_DEF | ||
1274 | // #define INLINE_ENABLED TRUE | ||
1275 | |||
1276 | #endif | ||
1277 | |||
1278 | #endif // ===> PC | ||
1279 | |||
1280 | |||
1281 | //--------------------------------------------------------------------------- | ||
1282 | // definitions of basic types | ||
1283 | //--------------------------------------------------------------------------- | ||
1284 | |||
1285 | #ifndef _WINDEF_ // defined in WINDEF.H, included by <windows.h> | ||
1286 | |||
1287 | // --- arithmetic types --- | 1237 | // --- arithmetic types --- |
1288 | #ifndef SHORT | 1238 | #ifndef SHORT |
1289 | #define SHORT short int | 1239 | #define SHORT short int |
1290 | #endif | 1240 | #endif |
1291 | 1241 | #ifndef USHORT | |
1292 | #ifndef USHORT | 1242 | #define USHORT unsigned short int |
1293 | #define USHORT unsigned short int | 1243 | #endif |
1294 | #endif | 1244 | #ifndef INT |
1295 | 1245 | #define INT int | |
1296 | #ifndef INT | 1246 | #endif |
1297 | #define INT int | 1247 | #ifndef UINT |
1298 | #endif | 1248 | #define UINT unsigned int |
1299 | 1249 | #endif | |
1300 | #ifndef UINT | 1250 | #ifndef LONG |
1301 | #define UINT unsigned int | 1251 | #define LONG long int |
1302 | #endif | 1252 | #endif |
1303 | 1253 | #ifndef ULONG | |
1304 | #ifndef LONG | 1254 | #define ULONG unsigned long int |
1305 | #define LONG long int | 1255 | #endif |
1306 | #endif | ||
1307 | |||
1308 | #ifndef ULONG | ||
1309 | #define ULONG unsigned long int | ||
1310 | #endif | ||
1311 | |||
1312 | |||
1313 | // --- logic types --- | 1256 | // --- logic types --- |
1314 | #ifndef BYTE | 1257 | #ifndef BYTE |
1315 | #define BYTE unsigned char | 1258 | #define BYTE unsigned char |
1316 | #endif | 1259 | #endif |
1317 | 1260 | #ifndef WORD | |
1318 | #ifndef WORD | 1261 | #define WORD unsigned short int |
1319 | #define WORD unsigned short int | 1262 | #endif |
1320 | #endif | 1263 | #ifndef DWORD |
1321 | 1264 | #define DWORD unsigned long int | |
1322 | #ifndef DWORD | 1265 | #endif |
1323 | #define DWORD unsigned long int | 1266 | #ifndef BOOL |
1324 | #endif | 1267 | #define BOOL unsigned char |
1325 | 1268 | #endif | |
1326 | #ifndef BOOL | ||
1327 | #define BOOL unsigned char | ||
1328 | #endif | ||
1329 | |||
1330 | |||
1331 | // --- alias types --- | 1269 | // --- alias types --- |
1332 | #ifndef TRUE | 1270 | #ifndef TRUE |
1333 | #define TRUE 0xFF | 1271 | #define TRUE 0xFF |
1334 | #endif | 1272 | #endif |
1335 | 1273 | #ifndef FALSE | |
1336 | #ifndef FALSE | 1274 | #define FALSE 0x00 |
1337 | #define FALSE 0x00 | 1275 | #endif |
1338 | #endif | 1276 | #ifndef NULL |
1339 | 1277 | #define NULL ((void *) 0) | |
1340 | #ifndef NULL | 1278 | #endif |
1341 | #define NULL ((void *) 0) | ||
1342 | #endif | ||
1343 | |||
1344 | #endif | 1279 | #endif |
1345 | |||
1346 | |||
1347 | #ifndef _TIME_OF_DAY_DEFINED_ | 1280 | #ifndef _TIME_OF_DAY_DEFINED_ |
1281 | typedef struct { | ||
1282 | unsigned long int m_dwMs; | ||
1283 | unsigned short int m_wDays; | ||
1348 | 1284 | ||
1349 | typedef struct | 1285 | } tTimeOfDay; |
1350 | { | ||
1351 | unsigned long int m_dwMs; | ||
1352 | unsigned short int m_wDays; | ||
1353 | 1286 | ||
1354 | } tTimeOfDay; | 1287 | #define _TIME_OF_DAY_DEFINED_ |
1355 | |||
1356 | #define _TIME_OF_DAY_DEFINED_ | ||
1357 | 1288 | ||
1358 | #endif | 1289 | #endif |
1359 | 1290 | ||
1360 | |||
1361 | //--------------------------------------------------------------------------- | 1291 | //--------------------------------------------------------------------------- |
1362 | // Definition von TRACE | 1292 | // Definition von TRACE |
1363 | //--------------------------------------------------------------------------- | 1293 | //--------------------------------------------------------------------------- |
1364 | 1294 | ||
1365 | #ifndef NDEBUG | 1295 | #ifndef NDEBUG |
1366 | 1296 | ||
1367 | #ifndef TRACE0 | 1297 | #ifndef TRACE0 |
1368 | #define TRACE0(p0) TRACE(p0) | 1298 | #define TRACE0(p0) TRACE(p0) |
1369 | #endif | 1299 | #endif |
1370 | 1300 | ||
1371 | #ifndef TRACE1 | 1301 | #ifndef TRACE1 |
1372 | #define TRACE1(p0, p1) TRACE(p0, p1) | 1302 | #define TRACE1(p0, p1) TRACE(p0, p1) |
1373 | #endif | 1303 | #endif |
1374 | 1304 | ||
1375 | #ifndef TRACE2 | 1305 | #ifndef TRACE2 |
1376 | #define TRACE2(p0, p1, p2) TRACE(p0, p1, p2) | 1306 | #define TRACE2(p0, p1, p2) TRACE(p0, p1, p2) |
1377 | #endif | 1307 | #endif |
1378 | 1308 | ||
1379 | #ifndef TRACE3 | 1309 | #ifndef TRACE3 |
1380 | #define TRACE3(p0, p1, p2, p3) TRACE(p0, p1, p2, p3) | 1310 | #define TRACE3(p0, p1, p2, p3) TRACE(p0, p1, p2, p3) |
1381 | #endif | 1311 | #endif |
1382 | 1312 | ||
1383 | #ifndef TRACE4 | 1313 | #ifndef TRACE4 |
1384 | #define TRACE4(p0, p1, p2, p3, p4) TRACE(p0, p1, p2, p3, p4) | 1314 | #define TRACE4(p0, p1, p2, p3, p4) TRACE(p0, p1, p2, p3, p4) |
1385 | #endif | 1315 | #endif |
1386 | 1316 | ||
1387 | #ifndef TRACE5 | 1317 | #ifndef TRACE5 |
1388 | #define TRACE5(p0, p1, p2, p3, p4, p5) TRACE(p0, p1, p2, p3, p4, p5) | 1318 | #define TRACE5(p0, p1, p2, p3, p4, p5) TRACE(p0, p1, p2, p3, p4, p5) |
1389 | #endif | 1319 | #endif |
1390 | 1320 | ||
1391 | #ifndef TRACE6 | 1321 | #ifndef TRACE6 |
1392 | #define TRACE6(p0, p1, p2, p3, p4, p5, p6) TRACE(p0, p1, p2, p3, p4, p5, p6) | 1322 | #define TRACE6(p0, p1, p2, p3, p4, p5, p6) TRACE(p0, p1, p2, p3, p4, p5, p6) |
1393 | #endif | 1323 | #endif |
1394 | 1324 | ||
1395 | #else | 1325 | #else |
1396 | 1326 | ||
1397 | #ifndef TRACE0 | 1327 | #ifndef TRACE0 |
1398 | #define TRACE0(p0) | 1328 | #define TRACE0(p0) |
1399 | #endif | 1329 | #endif |
1400 | |||
1401 | #ifndef TRACE1 | ||
1402 | #define TRACE1(p0, p1) | ||
1403 | #endif | ||
1404 | |||
1405 | #ifndef TRACE2 | ||
1406 | #define TRACE2(p0, p1, p2) | ||
1407 | #endif | ||
1408 | 1330 | ||
1409 | #ifndef TRACE3 | 1331 | #ifndef TRACE1 |
1410 | #define TRACE3(p0, p1, p2, p3) | 1332 | #define TRACE1(p0, p1) |
1411 | #endif | 1333 | #endif |
1412 | 1334 | ||
1413 | #ifndef TRACE4 | 1335 | #ifndef TRACE2 |
1414 | #define TRACE4(p0, p1, p2, p3, p4) | 1336 | #define TRACE2(p0, p1, p2) |
1415 | #endif | 1337 | #endif |
1416 | 1338 | ||
1417 | #ifndef TRACE5 | 1339 | #ifndef TRACE3 |
1418 | #define TRACE5(p0, p1, p2, p3, p4, p5) | 1340 | #define TRACE3(p0, p1, p2, p3) |
1419 | #endif | 1341 | #endif |
1420 | 1342 | ||
1421 | #ifndef TRACE6 | 1343 | #ifndef TRACE4 |
1422 | #define TRACE6(p0, p1, p2, p3, p4, p5, p6) | 1344 | #define TRACE4(p0, p1, p2, p3, p4) |
1423 | #endif | 1345 | #endif |
1424 | 1346 | ||
1347 | #ifndef TRACE5 | ||
1348 | #define TRACE5(p0, p1, p2, p3, p4, p5) | ||
1425 | #endif | 1349 | #endif |
1426 | 1350 | ||
1351 | #ifndef TRACE6 | ||
1352 | #define TRACE6(p0, p1, p2, p3, p4, p5, p6) | ||
1353 | #endif | ||
1427 | 1354 | ||
1355 | #endif | ||
1428 | 1356 | ||
1429 | //--------------------------------------------------------------------------- | 1357 | //--------------------------------------------------------------------------- |
1430 | // definition of ASSERT | 1358 | // definition of ASSERT |
1431 | //--------------------------------------------------------------------------- | 1359 | //--------------------------------------------------------------------------- |
1432 | 1360 | ||
1433 | #ifndef ASSERT | 1361 | #ifndef ASSERT |
1434 | #if !defined (__linux__) && !defined (__KERNEL__) | 1362 | #if !defined (__linux__) && !defined (__KERNEL__) |
1435 | #include <assert.h> | 1363 | #include <assert.h> |
1436 | #ifndef ASSERT | 1364 | #ifndef ASSERT |
1437 | #define ASSERT(p) assert(p) | 1365 | #define ASSERT(p) assert(p) |
1438 | #endif | 1366 | #endif |
1439 | #else | 1367 | #else |
1440 | #define ASSERT(p) | 1368 | #define ASSERT(p) |
1441 | #endif | 1369 | #endif |
1442 | #endif | 1370 | #endif |
1443 | |||
1444 | 1371 | ||
1445 | //--------------------------------------------------------------------------- | 1372 | //--------------------------------------------------------------------------- |
1446 | // SYS TEC extensions | 1373 | // SYS TEC extensions |
@@ -1450,19 +1377,15 @@ | |||
1450 | // but a string, which exactly names the mistake. | 1377 | // but a string, which exactly names the mistake. |
1451 | #ifndef NDEBUG | 1378 | #ifndef NDEBUG |
1452 | 1379 | ||
1453 | #define ASSERTMSG(expr,string) if (!(expr)) {\ | 1380 | #define ASSERTMSG(expr,string) if (!(expr)) {\ |
1454 | PRINTF0 ("Assertion failed: " string );\ | 1381 | PRINTF0 ("Assertion failed: " string );\ |
1455 | while (1);} | 1382 | while (1);} |
1456 | #else | 1383 | #else |
1457 | #define ASSERTMSG(expr,string) | 1384 | #define ASSERTMSG(expr,string) |
1458 | #endif | 1385 | #endif |
1459 | 1386 | ||
1460 | |||
1461 | |||
1462 | |||
1463 | //--------------------------------------------------------------------------- | 1387 | //--------------------------------------------------------------------------- |
1464 | 1388 | ||
1465 | #endif // #ifndef _GLOBAL_H_ | 1389 | #endif // #ifndef _GLOBAL_H_ |
1466 | 1390 | ||
1467 | // Please keep an empty line at the end of this file. | 1391 | // Please keep an empty line at the end of this file. |
1468 | |||
diff --git a/drivers/staging/epl/proc_fs.h b/drivers/staging/epl/proc_fs.h index 5af2d3a00d62..0586f499553a 100644 --- a/drivers/staging/epl/proc_fs.h +++ b/drivers/staging/epl/proc_fs.h | |||
@@ -71,7 +71,6 @@ | |||
71 | #ifndef _EPLPROCFS_H_ | 71 | #ifndef _EPLPROCFS_H_ |
72 | #define _EPLPROCFS_H_ | 72 | #define _EPLPROCFS_H_ |
73 | 73 | ||
74 | |||
75 | //--------------------------------------------------------------------------- | 74 | //--------------------------------------------------------------------------- |
76 | // const defines | 75 | // const defines |
77 | //--------------------------------------------------------------------------- | 76 | //--------------------------------------------------------------------------- |
@@ -80,7 +79,6 @@ | |||
80 | // types | 79 | // types |
81 | //--------------------------------------------------------------------------- | 80 | //--------------------------------------------------------------------------- |
82 | 81 | ||
83 | |||
84 | //--------------------------------------------------------------------------- | 82 | //--------------------------------------------------------------------------- |
85 | // function prototypes | 83 | // function prototypes |
86 | //--------------------------------------------------------------------------- | 84 | //--------------------------------------------------------------------------- |
@@ -88,7 +86,4 @@ | |||
88 | tEplKernel EplLinProcInit(void); | 86 | tEplKernel EplLinProcInit(void); |
89 | tEplKernel EplLinProcFree(void); | 87 | tEplKernel EplLinProcFree(void); |
90 | 88 | ||
91 | 89 | #endif // #ifndef _EPLPROCFS_H_ | |
92 | #endif // #ifndef _EPLPROCFS_H_ | ||
93 | |||
94 | |||