changing circuitry to disable RTC, update initialization to match
[fw/openalt] / sysdefs.h
1 #ifndef _SYSDEFS_H_
2 #define _SYSDEFS_H_
3
4 #ifndef TRUE
5 #define TRUE (1)
6 #endif
7 #ifndef FALSE
8 #define FALSE (0)
9 #endif
10
11 typedef unsigned char U8;
12 typedef signed char N8;
13 typedef unsigned short U16;
14 typedef signed short N16;
15 typedef unsigned int U32;
16 typedef signed int N32;
17 typedef int BOOL;
18
19 typedef volatile U8 REG8;
20 typedef volatile U16 REG16;
21 typedef volatile U32 REG32;
22
23 #define pREG8  (REG8 *)
24 #define pREG16 (REG16 *)
25 #define pREG32 (REG32 *)
26
27 #ifndef NULL
28 #define NULL ((void *) 0)
29 #endif
30
31 #define MIN(x,y) ((x)<(y)?(x):(y))
32 #define MAX(x,y)((x)>(y)?(x):(y))
33 #define arrsizeof(x) ((sizeof (x))/(sizeof (x [0])))
34
35 //
36 //  Yuck.  Don't like this here, but what the heck...
37 //
38 #if !defined CFG_CONSOLE_USB && !defined CFG_CONSOLE_UART0 && !defined CFG_CONSOLE_UART1
39 #error "Must define CFG_CONSOLE_USB, CFG_CONSOLE_UART0 or CFG_CONSOLE_UART1"
40 #endif
41
42 #if defined CFG_CONSOLE_USB && (defined CFG_CONSOLE_UART0 || defined CFG_CONSOLE_UART1)
43 #error "Only one of CFG_CONSOLE_USB, CFG_CONSOLE_UART0 or CFG_CONSOLE_UART1 may be defined"
44 #endif
45 #if defined CFG_CONSOLE_UART0 && (defined CFG_CONSOLE_USB || defined CFG_CONSOLE_UART1)
46 #error "Only one of CFG_CONSOLE_USB, CFG_CONSOLE_UART0 or CFG_CONSOLE_UART1 may be defined"
47 #endif
48 #if defined CFG_CONSOLE_UART1 && (defined CFG_CONSOLE_USB || defined CFG_CONSOLE_UART0)
49 #error "Only one of CFG_CONSOLE_USB, CFG_CONSOLE_UART0 or CFG_CONSOLE_UART1 may be defined"
50 #endif
51
52 #endif