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;
19 typedef volatile U8 REG8;
20 typedef volatile U16 REG16;
21 typedef volatile U32 REG32;
23 #define pREG8 (REG8 *)
24 #define pREG16 (REG16 *)
25 #define pREG32 (REG32 *)
28 #define NULL ((void *) 0)
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])))
36 // Yuck. Don't like this here, but what the heck...
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"
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"
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"
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"