aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-03-23 12:31:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 17:54:18 -0400
commitb4a4d56898aac07ac98488c1bc3193fe4f2e126d (patch)
tree3c5a83bc68de8cd4db87a8303a12f4ba9468f3e8 /drivers/staging
parent06c86229b04ca6909d2815da9db0ae2ae5ecee1e (diff)
Staging: epl: remove complier macros from global.h
As we are only building within the Linux kernel, remove all of the different system types from global.h, they are not needed at all. First step of many to clean up the code to match the kernel coding style rules. 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/staging')
-rw-r--r--drivers/staging/epl/global.h1052
1 files changed, 0 insertions, 1052 deletions
diff --git a/drivers/staging/epl/global.h b/drivers/staging/epl/global.h
index fe167165a83..11b75e4ef6b 100644
--- a/drivers/staging/epl/global.h
+++ b/drivers/staging/epl/global.h
@@ -121,15 +121,9 @@
121//--------------------------------------------------------------------------- 121//---------------------------------------------------------------------------
122// defines for target system (TARGET_SYSTEM) 122// defines for target system (TARGET_SYSTEM)
123//--------------------------------------------------------------------------- 123//---------------------------------------------------------------------------
124
125#define _DOS_ (16 + 0x10000)
126#define _WIN16_ 16
127#define _WIN32_ 32 124#define _WIN32_ 32
128#define _WINCE_ (32 + 0x20000)
129#define _NO_OS_ 0 125#define _NO_OS_ 0
130#define _LINUX_ 1 126#define _LINUX_ 1
131#define _PXROS_ 2
132#define _ECOSPRO_ 3
133 127
134//--------------------------------------------------------------------------- 128//---------------------------------------------------------------------------
135// definitions for function inlining 129// definitions for function inlining
@@ -139,548 +133,11 @@
139#undef INLINE_ENABLED // disable actual inlining of functions 133#undef INLINE_ENABLED // disable actual inlining of functions
140#undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default 134#undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default
141 135
142//---------------------------------------------------------------------------
143// definitions for Keil C51
144//---------------------------------------------------------------------------
145
146#ifdef __C51__
147
148#define TARGET_SYSTEM _NO_OS_
149#define DEV_SYSTEM _DEV_KEIL_C51X_
150
151#pragma DEBUG OBJECTEXTEND
152#pragma WARNINGLEVEL(2) // maximum warning level
153
154#define NEAR idata // variables mapped to internal data storage location
155#define FAR xdata // variables mapped to external data storage location
156#define CONST const // variables mapped to ROM (i.e. flash)
157#define ROM code // code or variables mapped to ROM (i.e. flash)
158 // usage: CONST BYTE ROM foo = 0x00;
159#define HWACC xdata // hardware access through external memory (i.e. CAN)
160#define LARGE large // functions set parameters to external data storage location
161
162 // These types can be adjusted by users to match application requirements. The goal is to
163 // minimize code memory and maximize speed.
164#define GENERIC // generic pointer to point to application data
165 // Variables with this attribute can be located in external
166 // or internal data memory.
167#define MEM xdata // Memory attribute to optimize speed and code of pointer access.
168
169#define REENTRANT reentrant
170#define PUBLIC
171
172#ifndef NDEBUG
173#include <stdio.h> // prototype printf() (for TRACE)
174#define TRACE printf
175#endif
176
177//---------------------------------------------------------------------------
178// definitions for GNU Compiler for Infineon C16x
179// - it have to be befor Keil (it has __C166__ too)
180//---------------------------------------------------------------------------
181#elif defined (__GNUC__) && defined (__C166__)
182
183#define TARGET_SYSTEM _NO_OS_
184#define DEV_SYSTEM _DEV_GNU_C16X_
185
186// #define NEAR idata // variables mapped to internal data storage location
187#define NEAR near // variables mapped to internal data storage location
188// #define FAR xhuge // variables mapped to external data storage location
189#define FAR huge // variables mapped to external data storage location
190#define CONST const // variables mapped to ROM (i.e. flash)
191#define ROM // code or variables mapped to ROM (i.e. flash)
192 // usage: CONST BYTE ROM foo = 0x00;
193// #define HWACC sdata // hardware access through external memory (i.e. CAN)
194#define HWACC huge // hardware access through external memory (i.e. CAN)
195#define LARGE // functions set parameters to external data storage location
196
197 // These types can be adjusted by users to match application requirements. The goal is to
198 // minimize code memory and maximize speed.
199// #define GENERIC xhuge // generic pointer to point to application data
200#define GENERIC huge // generic pointer to point to application data
201 // Variables with this attribute can be located in external
202 // or internal data memory.
203#define MEM // Memory attribute to optimize speed and code of pointer access.
204
205#define REENTRANT
206#define PUBLIC
207
208#ifndef NDEBUG
209#include <stdio.h> // prototype printf() (for TRACE)
210#define TRACE printf
211
212#define ASSERT(p) \
213 if (p) \
214 { \
215 ; \
216 } \
217 else \
218 { \
219 PRINTF0("Assert failed: " #p " (file %s line %d)\n", __FILE__, (int) __LINE__ ); \
220 while (1); \
221 }
222#else
223#define ASSERT(p)
224#endif
225
226//---------------------------------------------------------------------------
227// definitions for Keil C166
228//---------------------------------------------------------------------------
229#elif defined (__C166__) // 24.01.2005 r.d.: Keil ARM7 needs directive 'defined'
230
231#define TARGET_SYSTEM _NO_OS_
232#define DEV_SYSTEM _DEV_KEIL_C16X_
233
234#pragma CODE
235#pragma MOD167
236#pragma NOINIT
237#pragma DEBUG
238#pragma WARNINGLEVEL(3) // maximum warning level
239#pragma WARNING DISABLE = 47 // warning <unreferenced parameter> = OFF
240#pragma WARNING DISABLE = 38 // warning <empty translation unit> = OFF
241// #pragma WARNING DISABLE = 102 // warning <different const/volatile qualifiers> = OFF
242#pragma WARNING DISABLE = 174 // warning <unreferenced 'static' function> = OFF
243#pragma WARNING DISABLE = 183 // warning <dead assignement eliminated> = OFF
244
245#define NEAR idata // variables mapped to internal data storage location
246#define FAR xhuge // variables mapped to external data storage location
247#define CONST const // variables mapped to ROM (i.e. flash)
248#define ROM // code or variables mapped to ROM (i.e. flash)
249 // usage: CONST BYTE ROM foo = 0x00;
250// #define HWACC sdata // hardware access through external memory (i.e. CAN)
251#define HWACC huge // hardware access through external memory (i.e. CAN)
252#define LARGE // functions set parameters to external data storage location
253
254 // These types can be adjusted by users to match application requirements. The goal is to
255 // minimize code memory and maximize speed.
256#define GENERIC xhuge // generic pointer to point to application data
257 // Variables with this attribute can be located in external
258 // or internal data memory.
259#define MEM // Memory attribute to optimize speed and code of pointer access.
260
261#define REENTRANT
262#define PUBLIC
263
264#ifndef NDEBUG
265#include <stdio.h> // prototype printf() (for TRACE)
266#define TRACE printf
267#endif
268
269//---------------------------------------------------------------------------
270// definitions for MPLAB C30 for dsPIC33F series
271//---------------------------------------------------------------------------
272#elif defined (__C30__)
273
274#define TARGET_SYSTEM _NO_OS_
275#define DEV_SYSTEM _DEV_MPLAB_DSPIC33F_
276 136
277#define NEAR // variables mapped to internal data storage location
278#define FAR // variables mapped to external data storage location
279#define CONST const // variables mapped to ROM (i.e. flash)
280#define ROM // code or variables mapped to ROM (i.e. flash)
281 // usage: CONST BYTE ROM foo = 0x00;
282#define HWACC // hardware access through external memory (i.e. CAN)
283#define LARGE // functions set parameters to external data storage location
284
285 // These types can be adjusted by users to match application requirements. The goal is to
286 // minimize code memory and maximize speed.
287#define GENERIC // generic pointer to point to application data
288 // Variables with this attribute can be located in external
289 // or internal data memory.
290#define MEM // Memory attribute to optimize speed and code of pointer access.
291
292#define REENTRANT
293#define PUBLIC
294
295// #ifndef QWORD
296// #define QWORD long long
297// #endif
298
299#ifndef NDEBUG
300#include <stdio.h> // prototype printf() (for TRACE)
301#define TRACE printf
302#endif
303
304//---------------------------------------------------------------------------
305// definitions for Keil ARM
306//---------------------------------------------------------------------------
307#elif defined (__CA__)
308
309#define TARGET_SYSTEM _NO_OS_
310#define DEV_SYSTEM _DEV_KEIL_CARM_
311
312#define NEAR // variables mapped to internal data storage location
313#define FAR // variables mapped to external data storage location
314#define CONST const // variables mapped to ROM (i.e. flash)
315#define ROM // code or variables mapped to ROM (i.e. flash)
316 // usage: CONST BYTE ROM foo = 0x00;
317#define HWACC // hardware access through external memory (i.e. CAN)
318#define LARGE // functions set parameters to external data storage location
319
320 // These types can be adjusted by users to match application requirements. The goal is to
321 // minimize code memory and maximize speed.
322#define GENERIC // generic pointer to point to application data
323 // Variables with this attribute can be located in external
324 // or internal data memory.
325#define MEM // Memory attribute to optimize speed and code of pointer access.
326
327#define REENTRANT
328#define PUBLIC
329
330#ifndef QWORD
331#define QWORD long long
332#endif
333
334#ifndef NDEBUG
335#include <stdio.h> // prototype printf() (for TRACE)
336#define TRACE printf
337#endif
338
339//---------------------------------------------------------------------------
340// definitions for RealView ARM compilation tools (provided by recent Keil Microcontroller Development Kits)
341//---------------------------------------------------------------------------
342#elif defined (__ARMCC_VERSION)
343
344#define TARGET_SYSTEM _NO_OS_
345#define DEV_SYSTEM _DEV_RVCT_CARM_
346
347#define NEAR // variables mapped to internal data storage location
348#define FAR // variables mapped to external data storage location
349#define CONST const // variables mapped to ROM (i.e. flash)
350#define ROM // code or variables mapped to ROM (i.e. flash)
351 // usage: CONST BYTE ROM foo = 0x00;
352#define HWACC // hardware access through external memory (i.e. CAN)
353#define LARGE // functions set parameters to external data storage location
354
355 // These types can be adjusted by users to match application requirements. The goal is to
356 // minimize code memory and maximize speed.
357#define GENERIC // generic pointer to point to application data
358 // Variables with this attribute can be located in external
359 // or internal data memory.
360#define MEM // Memory attribute to optimize speed and code of pointer access.
361
362#define REENTRANT
363#define PUBLIC
364
365#ifndef QWORD
366#define QWORD long long
367#endif
368
369#ifndef NDEBUG
370#define ASSERT(expr) if (!(expr)) {\
371 TRACE0 ("Assertion failed: " #expr );\
372 while (1);}
373#else
374#define ASSERT(expr)
375#endif
376
377#ifndef NDEBUG
378#include <stdio.h> // prototype printf() (for TRACE)
379#define TRACE printf
380#endif
381
382//---------------------------------------------------------------------------
383// definitions for ARM IAR C Compiler
384//---------------------------------------------------------------------------
385#elif defined (__ICCARM__)
386
387#define TARGET_SYSTEM _NO_OS_
388#define DEV_SYSTEM _DEV_IAR_CARM_
389
390#define NEAR // variables mapped to internal data storage location
391#define FAR // variables mapped to external data storage location
392#define CONST const // variables mapped to ROM (i.e. flash)
393#define ROM // code or variables mapped to ROM (i.e. flash)
394 // usage: CONST BYTE ROM foo = 0x00;
395#define HWACC // hardware access through external memory (i.e. CAN)
396#define LARGE // functions set parameters to external data storage location
397
398 // These types can be adjusted by users to match application requirements. The goal is to
399 // minimize code memory and maximize speed.
400#define GENERIC // generic pointer to point to application data
401 // Variables with this attribute can be located in external
402 // or internal data memory.
403#define MEM // Memory attribute to optimize speed and code of pointer access.
404
405#define REENTRANT
406#define PUBLIC
407
408#ifndef QWORD
409#define QWORD long long
410#endif
411
412 // Workaround:
413 // If we use IAR and want to debug but don't want to use C-Spy Debugger
414 // assert() doesn't work in debug mode because it needs support for FILE descriptors
415 // (_DLIB_FILE_DESCRIPTOR == 1).
416#ifndef NDEBUG
417#define ASSERT(expr) if (!(expr)) {\
418 TRACE0 ("Assertion failed: " #expr );\
419 while (1);}
420#else
421#define ASSERT(expr)
422#endif
423
424#ifndef NDEBUG
425#include <stdio.h> // prototype printf() (for TRACE)
426#define TRACE printf
427// #define TRACE PRINTF4
428#endif
429
430//---------------------------------------------------------------------------
431// definitions for Tasking 8051
432//---------------------------------------------------------------------------
433
434#elif defined (_CC51)
435
436#include <cc51.h>
437
438#define TARGET_SYSTEM _NO_OS_
439#define DEV_SYSTEM _DEV_TASKING_C51X_
440
441#define NEAR _data // variables mapped to internal data storage location
442#define FAR _xdat // variables mapped to external data storage location
443#define CONST const // variables mapped to ROM (i.e. flash)
444#define ROM // code or variables mapped to ROM (i.e. flash)
445 // usage: CONST BYTE ROM foo = 0x00;
446#define HWACC _xdat // hardware access through external memory (i.e. CAN)
447#define LARGE // functions set parameters to external data storage location
448
449 // These types can be adjusted by users to match application requirements. The goal is to
450 // minimize code memory and maximize speed.
451#define GENERIC // generic pointer to point to application data
452 // Variables with this attribute can be located in external
453 // or internal data memory.
454#define MEM _xdat // Memory attribute to optimize speed and code of pointer access.
455
456#define REENTRANT _reentrant
457#define PUBLIC
458
459#ifndef NDEBUG
460#include <stdio.h> // prototype printf() (for TRACE)
461#define TRACE printf
462#endif
463
464//---------------------------------------------------------------------------
465// definitions for Tasking C167CR and C164CI
466//---------------------------------------------------------------------------
467
468#elif defined (_C166)
469
470#define TARGET_SYSTEM _NO_OS_
471#define DEV_SYSTEM _DEV_TASKING_C16X_
472
473#define NEAR near // variables mapped to internal data storage location
474#define FAR far // variables mapped to external data storage location
475#define CONST const // variables mapped to ROM (i.e. flash)
476#define ROM // code or variables mapped to ROM (i.e. flash)
477 // usage: CONST BYTE ROM foo = 0x00;
478#define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN)
479#define LARGE // functions set parameters to external data storage location
480
481 // These types can be adjusted by users to match application requirements. The goal is to
482 // minimize code memory and maximize speed.
483#define GENERIC // generic pointer to point to application data
484 // Variables with this attribute can be located in external
485 // or internal data memory.
486#define MEM // Memory attribute to optimize speed and code of pointer access.
487
488#define REENTRANT
489#define PUBLIC
490
491 // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL
492 // without checking if it is already included. So an error occurs while compiling.
493 // (r.d.)
494#include <stdio.h> // prototype printf() (for TRACE)
495#ifndef NDEBUG
496#define TRACE printf
497#endif
498
499//---------------------------------------------------------------------------
500// definitions for FUJITSU FFMC-16LX MB90590
501//---------------------------------------------------------------------------
502
503//#elif (defined (F590) || defined (F543) || defined (F598) || defined (F495) || defined (F350))
504#elif defined(__COMPILER_FCC907__)
505
506#define TARGET_SYSTEM _NO_OS_
507#define DEV_SYSTEM _DEV_FUJITSU_F590_
508
509#define NEAR /* to be defined */ // variables mapped to internal data storage location
510#define FAR /* to be defined */ // variables mapped to external data storage location
511#define CONST const // variables mapped to ROM (i.e. flash)
512#define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash)
513 // usage: CONST BYTE ROM foo = 0x00;
514#define HWACC /* to be defined */ // hardware access through external memory (i.e. CAN)
515#define LARGE // functions set parameters to external data storage location
516
517 // These types can be adjusted by users to match application requirements. The goal is to
518 // minimize code memory and maximize speed.
519#define GENERIC // generic pointer to point to application data
520 // Variables with this attribute can be located in external
521 // or internal data memory.
522#define MEM // Memory attribute to optimize speed and code of pointer access.
523
524 // softune is not able to support 64 bit variables QWORD !!!
525
526#define REENTRANT
527#define PUBLIC
528
529#ifndef NDEBUG
530#include <stdio.h> // prototype printf() (for TRACE)
531#define TRACE printf
532#endif
533
534//---------------------------------------------------------------------------
535// definitions for Mitsubishi M16C family for TASKING Compiler CM16
536//---------------------------------------------------------------------------
537
538#elif defined (_CM16C)
539
540#define TARGET_SYSTEM _NO_OS_
541#define DEV_SYSTEM _DEV_TASKING_M16C_
542
543#define NEAR _near // variables mapped to internal data storage location
544#define FAR _far // variables mapped to external data storage location
545#define CONST _farrom // variables mapped to ROM (i.e. flash)
546#define ROM // code or variables mapped to ROM (i.e. flash)
547 // usage: CONST BYTE ROM foo = 0x00;
548#define HWACC _near // hardware access through external memory (i.e. CAN)
549#define LARGE // functions set parameters to external data storage location
550
551 // These types can be adjusted by users to match application requirements. The goal is to
552 // minimize code memory and maximize speed.
553#define GENERIC _far // generic pointer to point to application data
554 // Variables with this attribute can be located in external
555 // or internal data memory.
556 // do you use memory model SMALL, than you have to set _far
557#define MEM // Memory attribute to optimize speed and code of pointer access.
558
559#define REENTRANT
560#define PUBLIC
561
562 // Stdio.h has to be alway included here. If printf() is used stdio.h defines NULL
563 // without checking if it is already included. So an error occurs while compiling.
564 // (r.d.)
565#include <stdio.h> // prototype printf() (for TRACE)
566#ifndef NDEBUG
567#define TRACE printf
568#endif
569
570//---------------------------------------------------------------------------
571// definitions for Mitsubishi M16C family for Mitsubishi Compiler NC30
572//---------------------------------------------------------------------------
573// name NC30, andere Form will der Compiler nicht !!
574#elif defined (NC30)
575
576#define TARGET_SYSTEM _NO_OS_
577#define DEV_SYSTEM _DEV_MITSUBISHI_M16C_
578
579#define NEAR near // variables mapped to internal data storage location
580#define FAR far // variables mapped to external data storage location
581#define CONST const // variables mapped to ROM (i.e. flash)
582#define ROM // code or variables mapped to ROM (i.e. flash)
583 // usage: CONST BYTE ROM foo = 0x00;
584#define HWACC near // hardware access through external memory (i.e. CAN)
585#define LARGE // functions set parameters to external data storage location
586
587 // These types can be adjusted by users to match application requirements. The goal is to
588 // minimize code memory and maximize speed.
589#define GENERIC far // generic pointer to point to application data
590 // Variables with this attribute can be located in external
591 // or internal data memory.
592#define MEM // Memory attribute to optimize speed and code of pointer access.
593
594#define REENTRANT
595#define PUBLIC
596
597#ifndef NDEBUG
598#include <stdio.h> // prototype printf() (for TRACE)
599#define TRACE printf
600#endif
601
602//---------------------------------------------------------------------------
603// definitions for Renesas M32C family for Renesas Compiler
604//---------------------------------------------------------------------------
605#elif defined (NC308)
606
607#define TARGET_SYSTEM _NO_OS_
608#define DEV_SYSTEM _DEV_RENESAS_M32C_
609
610#define NEAR near // variables mapped to internal data storage location
611#define FAR far // variables mapped to external data storage location
612#define CONST const // variables mapped to ROM (i.e. flash)
613#define ROM // code or variables mapped to ROM (i.e. flash)
614#define HWACC // hardware access through external memory (i.e. CAN)
615#define LARGE // functions set parameters to external data storage location
616
617 // These types can be adjusted by users to match application requirements. The goal is to
618 // minimize code memory and maximize speed.
619#define GENERIC // generic pointer to point to application data
620 // Variables with this attribute can be located in external
621 // or internal data memory.
622#define MEM far // Memory attribute to optimize speed and code of pointer access.
623
624#define REENTRANT
625#define PUBLIC
626
627#ifndef NDEBUG
628#include <stdio.h> // prototype printf() (for TRACE)
629#define TRACE printf
630#endif
631
632// #error ("RENESAS o.k.")
633
634//---------------------------------------------------------------------------
635// definitions for ARM7 family with GNU compiler
636//---------------------------------------------------------------------------
637
638#elif defined(__GNUC__) && defined(__arm__) && !defined(__LINUX_ARM_ARCH__)
639
640#define TARGET_SYSTEM _NO_OS_
641#define DEV_SYSTEM _DEV_GNU_ARM7_
642
643#define NEAR // variables mapped to internal data storage location
644#define FAR // variables mapped to external data storage location
645#define CONST const // variables mapped to ROM (i.e. flash)
646#define ROM // code or variables mapped to ROM (i.e. flash)
647 // usage: CONST BYTE ROM foo = 0x00;
648#define HWACC // hardware access through external memory (i.e. CAN)
649#define LARGE // functions set parameters to external data storage location
650
651 // These types can be adjusted by users to match application requirements. The goal is to
652 // minimize code memory and maximize speed.
653#define GENERIC // generic pointer to point to application data
654 // Variables with this attribute can be located in external
655 // or internal data memory.
656#define MEM // Memory attribute to optimize speed and code of pointer access.
657#define HWACC // hardware access through external memory (i.e. CAN)
658
659#define REENTRANT
660#define PUBLIC
661
662#ifndef QWORD
663#define QWORD long long // i.A. durch Herr Kuschel
664#endif
665
666#ifndef NDEBUG
667#include <stdio.h> // prototype printf() (for TRACE)
668#define TRACE printf
669#endif
670
671//---------------------------------------------------------------------------
672// definitions for Motorola PowerPC family 5x5 (555/565)
673// definitions Linux-PC
674//---------------------------------------------------------------------------
675
676#elif defined (__GNUC__)
677
678#if defined (LINUX) || defined (linux) || defined (__linux__)
679#define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems 137#define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems
680 // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: 138 // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions:
681 // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). 139 // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx).
682 // But Linux for PC does not need the definitions for embedded Linux. 140 // But Linux for PC does not need the definitions for embedded Linux.
683#endif
684 141
685 // GNU C compiler supports function inlining 142 // GNU C compiler supports function inlining
686#define INLINE_FUNCTION_DEF extern inline 143#define INLINE_FUNCTION_DEF extern inline
@@ -690,84 +147,15 @@
690 // #define INLINE_FUNCTION INLINE_FUNCTION_DEF 147 // #define INLINE_FUNCTION INLINE_FUNCTION_DEF
691 // #define INLINE_ENABLED TRUE 148 // #define INLINE_ENABLED TRUE
692 149
693#ifdef PXROS
694#define TARGET_SYSTEM _PXROS_
695#ifdef __i386__
696#undef LINUX // this define seems to be set from compiler
697#define DEV_SYSTEM _DEV_HIGHTEC_X86_
698#elif defined (__tricore__)
699#define DEV_SYSTEM _DEV_GNU_TRICORE_
700#else // MPC5x5
701#define DEV_SYSTEM _DEV_GNU_MPC5X5_
702#endif
703
704#elif defined (LINUX) || defined (__linux__)
705#define TARGET_SYSTEM _LINUX_ // Linux definition 150#define TARGET_SYSTEM _LINUX_ // Linux definition
706#define DEV_SYSTEM _DEV_LINUX_ 151#define DEV_SYSTEM _DEV_LINUX_
707 152
708#elif defined (GNU_CF5282)
709#define TARGET_SYSTEM _NO_OS_
710#define DEV_SYSTEM _DEV_GNU_CF5282_
711
712#elif defined (ECOSPRO_I386_PEAK_PCI)
713#define TARGET_SYSTEM _ECOSPRO_
714#define DEV_SYSTEM _DEV_GNU_I386_
715
716#elif defined (GNU_CF548X)
717#define TARGET_SYSTEM _NO_OS_
718#define DEV_SYSTEM _DEV_GNU_CF548X_
719#else
720#error 'ERROR: DEV_SYSTEM not found!'
721#endif
722
723#ifndef QWORD
724#define QWORD long long int
725#endif
726
727#if (TARGET_SYSTEM == _PXROS_)
728
729#ifndef __KERNEL__
730#include <string.h>
731#endif
732
733#define NEAR // variables mapped to internal data storage location
734#define FAR // variables mapped to external data storage location
735#define CONST const // variables mapped to ROM (i.e. flash)
736#define ROM /* to be defined */ // code or variables mapped to ROM (i.e. flash)
737 // usage: CONST BYTE ROM foo = 0x00;
738#define LARGE // functions set parameters to external data storage location
739
740 // These types can be adjusted by users to match application requirements. The goal is to
741 // minimize code memory and maximize speed.
742#define GENERIC // generic pointer to point to application data
743 // Variables with this attribute can be located in external
744 // or internal data memory.
745#define MEM // Memory attribute to optimize speed and code of pointer access.
746
747#define HWACC // hardware access through external memory (i.e. CAN)
748
749#define REENTRANT
750#define PUBLIC
751
752#ifndef QWORD 153#ifndef QWORD
753#define QWORD long long int 154#define QWORD long long int
754#endif 155#endif
755 156
756#ifndef NDEBUG
757#include <stdio.h> // prototype printf() (for TRACE)
758#define TRACE printf
759#endif
760
761#endif
762
763 // ------------------ GNUC for I386 --------------------------------------------- 157 // ------------------ GNUC for I386 ---------------------------------------------
764 158
765#if (TARGET_SYSTEM == _LINUX_) || (TARGET_SYSTEM == _ECOSPRO_)
766
767#ifndef __KERNEL__
768#include <string.h>
769#endif
770
771#define ROM // code or variables mapped to ROM (i.e. flash) 159#define ROM // code or variables mapped to ROM (i.e. flash)
772 // usage: CONST BYTE ROM foo = 0x00; 160 // usage: CONST BYTE ROM foo = 0x00;
773#define HWACC // hardware access through external memory (i.e. CAN) 161#define HWACC // hardware access through external memory (i.e. CAN)
@@ -791,450 +179,11 @@
791#define CONST const // variables mapped to ROM (i.e. flash) 179#define CONST const // variables mapped to ROM (i.e. flash)
792#endif 180#endif
793 181
794#define LARGE
795
796#define REENTRANT 182#define REENTRANT
797#define PUBLIC 183#define PUBLIC
798 184
799#ifndef NDEBUG
800#ifndef __KERNEL__
801#include <stdio.h> // prototype printf() (for TRACE)
802#define TRACE printf
803#else
804#define TRACE printk 185#define TRACE printk
805#endif
806#endif
807#endif
808
809 // ------------------ GNU without OS ---------------------------------------------
810
811#if (TARGET_SYSTEM == _NO_OS_)
812
813#define ROM // code or variables mapped to ROM (i.e. flash)
814 // usage: CONST BYTE ROM foo = 0x00;
815#define HWACC // hardware access through external memory (i.e. CAN)
816
817 // These types can be adjusted by users to match application requirements. The goal is to
818 // minimize code memory and maximize speed.
819#define GENERIC // generic pointer to point to application data
820 // Variables with this attribute can be located in external
821 // or internal data memory.
822#define MEM // Memory attribute to optimize speed and code of pointer access.
823
824#ifndef NEAR
825#define NEAR // variables mapped to internal data storage location
826#endif
827
828#ifndef FAR
829#define FAR // variables mapped to external data storage location
830#endif
831
832#ifndef CONST
833#define CONST const // variables mapped to ROM (i.e. flash)
834#endif
835 186
836#define LARGE
837
838#define REENTRANT
839#define PUBLIC
840
841#ifndef NDEBUG
842// #include "xuartdrv.h"
843// #include <stdio.h> // prototype printf() (for TRACE)
844#define TRACE printf
845// #define TRACE mprintf
846// #ifndef TRACE
847// #define TRACE trace
848// void trace (char *fmt, ...);
849// #endif
850#endif
851
852#endif
853
854//---------------------------------------------------------------------------
855// definitions for MPC565
856//---------------------------------------------------------------------------
857#elif __MWERKS__
858
859#ifdef __MC68K__
860
861#define TARGET_SYSTEM = _MCF548X_
862#define DEV_SYSTEM _DEV_MCW_MCF5XXX_
863
864#else
865#define TARGET_SYSTEM = _MPC565_
866#define DEV_SYSTEM _DEV_MCW_MPC5X5_
867#endif
868
869#define NEAR // variables mapped to internal data storage location
870#define FAR // variables mapped to external data storage location
871#define CONST const // variables mapped to ROM (i.e. flash)
872#define ROM // code or variables mapped to ROM (i.e. flash)
873 // usage: CONST BYTE ROM foo = 0x00;
874#define LARGE // functions set parameters to external data storage location
875
876 // These types can be adjusted by users to match application requirements. The goal is to
877 // minimize code memory and maximize speed.
878#define GENERIC // generic pointer to point to application data
879 // Variables with this attribute can be located in external
880 // or internal data memory.
881#define MEM // Memory attribute to optimize speed and code of pointer access.
882
883#define HWACC // hardware access through external memory (i.e. CAN)
884
885#define REENTRANT
886#define PUBLIC
887
888#ifndef NDEBUG
889#include <stdio.h> // prototype printf() (for TRACE)
890#define TRACE printf
891#endif
892
893//---------------------------------------------------------------------------
894// definitions for BECK 1x3
895//---------------------------------------------------------------------------
896#elif defined (__BORLANDC__) && defined (__PARADIGM__)
897
898#define TARGET_SYSTEM _NO_OS_
899#define DEV_SYSTEM _DEV_PAR_BECK1X3_
900
901#define ROM // code or variables mapped to ROM (i.e. flash)
902 // usage: CONST BYTE ROM foo = 0x00;
903#define HWACC // hardware access through external memory (i.e. CAN)
904
905 // These types can be adjusted by users to match application requirements. The goal is to
906 // minimize code memory and maximize speed.
907#define GENERIC // generic pointer to point to application data
908 // Variables with this attribute can be located in external
909 // or internal data memory.
910#define MEM // Memory attribute to optimize speed and code of pointer access.
911#define NEAR __near // variables mapped to internal data storage location
912#define FAR __far // variables mapped to external data storage location
913#define CONST const // variables mapped to ROM (i.e. flash)
914#define LARGE
915
916#define REENTRANT
917#define PUBLIC
918
919#ifndef NDEBUG
920#ifndef TRACE
921#include <stdio.h>
922#define TRACE printf
923#endif
924#endif
925
926//---------------------------------------------------------------------------
927// definitions for PC
928//---------------------------------------------------------------------------
929
930#elif defined (__BORLANDC__)
931
932 // ------------------ definition target system --------------------------
933
934#ifdef _WIN32
935#define TARGET_SYSTEM _WIN32_ // WIN32 definition
936#define DEV_SYSTEM _DEV_WIN32_
937#else
938#define TARGET_SYSTEM _DOS_
939#define DEV_SYSTEM _DEV_BORLAND_DOS_
940#endif
941
942 // ------------------ WIN32 ---------------------------------------------
943
944#if (TARGET_SYSTEM == _WIN32_)
945
946#define ROM // code or variables mapped to ROM (i.e. flash)
947 // usage: CONST BYTE ROM foo = 0x00;
948#define HWACC // hardware access through external memory (i.e. CAN)
949
950 // These types can be adjusted by users to match application requirements. The goal is to
951 // minimize code memory and maximize speed.
952#define GENERIC // generic pointer to point to application data
953 // Variables with this attribute can be located in external
954 // or internal data memory.
955#define MEM // Memory attribute to optimize speed and code of pointer access.
956
957#ifndef NEAR
958#define NEAR // variables mapped to internal data storage location
959#endif
960
961#ifndef FAR
962#define FAR // variables mapped to external data storage location
963#endif
964
965#ifndef CONST
966#define CONST const // variables mapped to ROM (i.e. flash)
967#endif
968
969#define LARGE
970
971#define REENTRANT
972#define PUBLIC __stdcall
973
974#ifndef NDEBUG
975#ifndef TRACE
976#include <stdio.h>
977#define TRACE printf
978#endif
979#endif
980
981#elif (TARGET_SYSTEM == _DOS_)
982
983#define ROM // code or variables mapped to ROM (i.e. flash)
984 // usage: CONST BYTE ROM foo = 0x00;
985#define HWACC // hardware access through external memory (i.e. CAN)
986
987 // These types can be adjusted by users to match application requirements. The goal is to
988 // minimize code memory and maximize speed.
989#define GENERIC // generic pointer to point to application data
990 // Variables with this attribute can be located in external
991 // or internal data memory.
992#define MEM // Memory attribute to optimize speed and code of pointer access.
993#define NEAR near // variables mapped to internal data storage location
994#define FAR far // variables mapped to external data storage location
995#define CONST const // variables mapped to ROM (i.e. flash)
996#define LARGE
997
998#define REENTRANT
999#define PUBLIC
1000
1001#ifndef NDEBUG
1002#ifndef TRACE
1003#include <stdio.h>
1004#define TRACE printf
1005#endif
1006#endif
1007
1008#endif
1009
1010#elif (_MSC_VER == 800) // PC MS Visual C/C++ for DOS applications
1011
1012#define TARGET_SYSTEM _DOS_
1013#define DEV_SYSTEM _DEV_MSVC_DOS_
1014
1015#define ROM // code or variables mapped to ROM (i.e. flash)
1016 // usage: CONST BYTE ROM foo = 0x00;
1017#define HWACC near // hardware access through external memory (i.e. CAN)
1018
1019 // These types can be adjusted by users to match application requirements. The goal is to
1020 // minimize code memory and maximize speed.
1021#define GENERIC // generic pointer to point to application data
1022 // Variables with this attribute can be located in external
1023 // or internal data memory.
1024#define MEM // Memory attribute to optimize speed and code of pointer access.
1025#define NEAR near // variables mapped to internal data storage location
1026#define FAR far // variables mapped to external data storage location
1027#define CONST const // variables mapped to ROM (i.e. flash)
1028#define LARGE
1029
1030#define REENTRANT
1031#define PUBLIC
1032
1033#ifndef NDEBUG
1034#ifndef TRACE
1035#include <stdio.h>
1036#define TRACE printf
1037#endif
1038#endif
1039
1040//---------------------------------------------------------------------------
1041// definitions for RTX under WIN32
1042//---------------------------------------------------------------------------
1043#elif (defined (UNDER_RTSS) && defined (WIN32))
1044
1045 // ------------------ definition target system --------------------------
1046#define TARGET_SYSTEM _WIN32_RTX_
1047#define DEV_SYSTEM _DEV_WIN32_RTX_
1048
1049#define ROM // code or variables mapped to ROM (i.e. flash)
1050 // usage: CONST BYTE ROM foo = 0x00;
1051#define HWACC // hardware access through external memory (i.e. CAN)
1052
1053 // These types can be adjusted by users to match application requirements. The goal is to
1054 // minimize code memory and maximize speed.
1055#define GENERIC // generic pointer to point to application data
1056 // Variables with this attribute can be located in external
1057 // or internal data memory.
1058#define MEM // Memory attribute to optimize speed and code of pointer access.
1059
1060#ifndef NEAR
1061#define NEAR // variables mapped to internal data storage location
1062#endif
1063
1064#ifndef FAR
1065#define FAR // variables mapped to external data storage location
1066#endif
1067
1068#ifndef CONST
1069#define CONST const // variables mapped to ROM (i.e. flash)
1070#endif
1071
1072#define LARGE
1073
1074#define REENTRANT
1075#define PUBLIC __stdcall
1076
1077#ifndef NDEBUG
1078#ifndef TRACE
1079#define TRACE RtPrintf
1080#endif
1081#endif
1082
1083//---------------------------------------------------------------------------
1084// definitions for WinCE
1085//---------------------------------------------------------------------------
1086#elif defined (_WIN32_WCE)
1087
1088 // ------------------ definition target system --------------------------
1089#define TARGET_SYSTEM _WINCE_
1090#define DEV_SYSTEM _DEV_WIN_CE_
1091
1092#define ROM // code or variables mapped to ROM (i.e. flash)
1093 // usage: CONST BYTE ROM foo = 0x00;
1094#define HWACC // hardware access through external memory (i.e. CAN)
1095
1096 // These types can be adjusted by users to match application requirements. The goal is to
1097 // minimize code memory and maximize speed.
1098#define GENERIC // generic pointer to point to application data
1099 // Variables with this attribute can be located in external
1100 // or internal data memory.
1101#define MEM // Memory attribute to optimize speed and code of pointer access.
1102
1103#ifndef NEAR
1104#define NEAR // variables mapped to internal data storage location
1105#endif
1106
1107#ifndef FAR
1108#define FAR // variables mapped to external data storage location
1109#endif
1110
1111#ifndef CONST
1112#define CONST const // variables mapped to ROM (i.e. flash)
1113#endif
1114
1115#define LARGE
1116
1117#ifndef QWORD
1118 //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU)
1119#define QWORD __int64
1120#endif
1121
1122#define REENTRANT
1123#define PUBLIC __cdecl
1124
1125#ifdef ASSERTMSG
1126#undef ASSERTMSG
1127#endif
1128
1129#ifndef NDEBUG
1130#ifndef TRACE
1131#define TRACE printf
1132// void trace (char *fmt, ...);
1133#endif
1134#endif
1135
1136#else // ===> PC MS Visual C/C++
1137
1138 // ------------------ definition target system --------------------------
1139
1140#ifdef _WIN32
1141#define TARGET_SYSTEM _WIN32_ // WIN32 definition
1142#define DEV_SYSTEM _DEV_WIN32_
1143#else
1144#define TARGET_SYSTEM _WIN16_ // WIN16 definition
1145#define DEV_SYSTEM _DEV_WIN16_
1146#endif
1147
1148 // ------------------ WIN16 ---------------------------------------------
1149
1150#if (TARGET_SYSTEM == _WIN16_)
1151
1152#define ROM // code or variables mapped to ROM (i.e. flash)
1153 // usage: CONST BYTE ROM foo = 0x00;
1154#define HWACC // hardware access through external memory (i.e. CAN)
1155
1156 // These types can be adjusted by users to match application requirements. The goal is to
1157 // minimize code memory and maximize speed.
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.
1162
1163#ifndef NEAR
1164#define NEAR // variables mapped to internal data storage location
1165#endif
1166
1167#ifndef FAR
1168#define FAR far // variables mapped to external data storage location
1169#endif
1170
1171#ifndef CONST
1172#define CONST const // variables mapped to ROM (i.e. flash)
1173#endif
1174
1175#define LARGE
1176
1177#define REENTRANT
1178#define PUBLIC _far _pascal _export
1179
1180#ifndef NDEBUG
1181#ifndef TRACE
1182#define TRACE trace
1183#ifdef __cplusplus
1184extern "C" {
1185#endif
1186 void trace(const char *fmt, ...);
1187#ifdef __cplusplus
1188}
1189#endif
1190#endif
1191#endif
1192#endif
1193 // ------------------ WIN32 ---------------------------------------------
1194#if (TARGET_SYSTEM == _WIN32_)
1195#define ROM // code or variables mapped to ROM (i.e. flash)
1196 // usage: CONST BYTE ROM foo = 0x00;
1197#define HWACC // hardware access through external memory (i.e. CAN)
1198 // These types can be adjusted by users to match application requirements. The goal is to// minimize code memory and maximize speed.
1199#define GENERIC // generic pointer to point to application data
1200 // Variables with this attribute can be located in external// or internal data memory.
1201#define MEM // Memory attribute to optimize speed and code of pointer access.
1202#ifndef NEAR
1203#define NEAR // variables mapped to internal data storage location
1204#endif
1205#ifndef FAR
1206#define FAR // variables mapped to external data storage location
1207#endif
1208#ifndef CONST
1209#define CONST const // variables mapped to ROM (i.e. flash)
1210#endif
1211#define LARGE
1212#define REENTRANT
1213#define PUBLIC __stdcall
1214#ifndef QWORD
1215 //#define QWORD long long int // MSVC .NET can use "long long int" too (like GNU)
1216#define QWORD __int64
1217#endif
1218#ifndef NDEBUG
1219#ifndef TRACE
1220#define TRACE trace
1221#ifdef __cplusplus
1222extern "C" {
1223#endif
1224 void trace(const char *fmt, ...);
1225#ifdef __cplusplus
1226}
1227#endif
1228#endif
1229#endif
1230 // MS Visual C++ compiler supports function inlining
1231#define INLINE_FUNCTION_DEF __forceinline
1232 // to actually enable inlining just include the following two lines// #define INLINE_FUNCTION INLINE_FUNCTION_DEF// #define INLINE_ENABLED TRUE
1233#endif
1234#endif // ===> PC
1235//---------------------------------------------------------------------------// definitions of basic types//---------------------------------------------------------------------------
1236#ifndef _WINDEF_ // defined in WINDEF.H, included by <windows.h>
1237 // --- arithmetic types ---
1238#ifndef SHORT 187#ifndef SHORT
1239#define SHORT short int 188#define SHORT short int
1240#endif 189#endif
@@ -1276,7 +225,6 @@ extern "C" {
1276#ifndef NULL 225#ifndef NULL
1277#define NULL ((void *) 0) 226#define NULL ((void *) 0)
1278#endif 227#endif
1279#endif
1280#ifndef _TIME_OF_DAY_DEFINED_ 228#ifndef _TIME_OF_DAY_DEFINED_
1281typedef struct { 229typedef struct {
1282 unsigned long int m_dwMs; 230 unsigned long int m_dwMs;