00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef SYSTEM__H
00010 #define SYSTEM__H
00011
00012 #include "rs232.h"
00013
00014 #define SYSTEM_LED *((volatile unsigned char *)0xf000)
00015 #define SYSTEM_CONTROLREG *((volatile unsigned char *)0xf020)
00016
00017
00018 #ifndef BIT
00019 #define BIT(x) ((1 << x))
00020 #endif
00021
00022 #define LOW(x) ((x) & 0xff)
00023 #define MIDLO(x) (((x) >> 8) & 0x0ff)
00024 #define MIDHI(x) (((x) >> 16) & 0x0ff)
00025 #define HIGH(x) (((x) >> 24) & 0x0ff)
00026
00027 #define ILOW(x) (x)
00028 #define IMIDLO(x) ((x) << 8)
00029 #define IMIDHI(x) ((x)<< 16)
00030 #define IHIGH(x) ((x)<< 24)
00031
00032
00033 #define SYSTEM_CLOCKRATE 7372800L //7.3728MHz
00034
00035
00036 extern SERIAL *pR0,*pR1;
00037
00038 extern void OS_InitMalloc(char *start_of_heap, char * end_of_heap);
00039
00040
00041 #endif