Imported Upstream version 2.9.0
[debian/cc1111] / device / examples / startupcode / inc / hardware_description.h
1 // INCLUDES & DEFINES ===============================================
2 // here are some definition about the CPU type
3
4 #ifndef __FILE_HARDWARE_DESCRIBTION_H
5 #define __FILE_HARDWARE_DESCRIBTION_H
6
7 #define CPUTYPE C515A
8
9 #include "..\inc\c515a.h"         // Definitions of registers, SFRs and Bits
10 #include <stdarg.h>
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <string.h>
14 #include <ctype.h>
15 #include <assert.h>
16 #include <limits.h>
17 #include <malloc.h>
18
19 // First some useful definitions
20 #define FALSE 0
21 #define TRUE !FALSE
22
23 // here is a definition of a single nop command as it has to be declared under keil-C and sdcc
24 #ifdef SDCC
25 #define NOP _asm nop _endasm
26 //#define UBYTE unsigned char
27 //#define UINT unsigned int
28 //#define BOOL unsigned char
29 #else
30 // This is for Keil-C
31 #define NOP _nop_()
32 #endif
33
34 // now we specify at what crystal speed the cpu runs (unit is Hz !!)
35 //#define CPUCLKHZ                11059200
36 #define CPUCLKHZ                24000000
37
38 // We use the internal UART, so we have to set the desired BAUDRATE
39 //#define BAUDRATE                9600
40 //#define BAUDRATE                19200
41 #define BAUDRATE                57600
42
43 // For serial com. we use the internal UART and data exchange is done by interrupt and not via polling
44 #define SERIAL_VIA_INTERRUPT
45 // Achtung maximal 127Bytes ! Puffer
46 #define SERIAL_VIA_INTERRUPT_XBUFLEN 100
47 #define SERIAL_VIA_INTERRUPT_RBUFLEN 100
48 // disable the above three lines and enable the next one if polling method is used
49 //#define SERIAL_VIA_POLLING
50
51 // The Siemens CPU C515A has a build in Baudrategenerator, therefore we use it instead
52 // of timer 1 this gives a better resolution
53 #define BAUDRATEGENENATOR_USED
54
55 // to measure time and delays we include a 1msec timer
56 #define USE_SYSTEM_TIMER
57
58 // CPU-Ports
59
60 #define CPUIDLE             P3_3
61 #define EXTWATCHDOG         P3_5
62
63 #include "..\inc\cpu_c515a.h"
64
65 #endif