def. of ports, includes ...
authormschmitt <mschmitt@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 24 Mar 2000 18:38:18 +0000 (18:38 +0000)
committermschmitt <mschmitt@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 24 Mar 2000 18:38:18 +0000 (18:38 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@201 4a8a32a2-be11-0410-ad9d-d568d2c75423

device/examples/startupcode/inc/hardware_describtion.h [new file with mode: 0644]

diff --git a/device/examples/startupcode/inc/hardware_describtion.h b/device/examples/startupcode/inc/hardware_describtion.h
new file mode 100644 (file)
index 0000000..d60e097
--- /dev/null
@@ -0,0 +1,61 @@
+// INCLUDES & DEFINES ===============================================
+// here are some definition about the CPU type
+
+#ifndef __FILE_HARDWARE_DESCRIBTION_H
+#define __FILE_HARDWARE_DESCRIBTION_H
+
+#define CPUTYPE C515A
+
+#include "..\inc\c515a.h"         // Definitions of registers, SFRs and Bits
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <limits.h>
+#include <malloc.h>
+
+// First some useful definitions
+#define FALSE 0
+#define TRUE !FALSE
+
+// here is a definition of a single nop command as it has to be declared under keil-C and sdcc
+#ifdef SDCC
+#define NOP _asm nop _endasm
+//#define UBYTE unsigned char
+//#define UINT unsigned int
+//#define BOOL unsigned char
+#else
+// This is for Keil-C
+#define NOP _nop_()
+#endif
+
+// now we specify at what crystal speed the cpu runs (unit is Hz !!)
+//#define CPUCLKHZ                11059200
+#define CPUCLKHZ                24000000
+
+// We use the internal UART, so we have to set the desired BAUDRATE
+//#define BAUDRATE                9600
+//#define BAUDRATE                19200
+#define BAUDRATE                57600
+
+// For serial com. we use the internal UART and data exchange is done by interrupt and not via polling
+#define SERIAL_VIA_INTERRUPT
+// Achtung maximal 127Bytes ! Puffer
+#define SERIAL_VIA_INTERRUPT_XBUFLEN 100
+#define SERIAL_VIA_INTERRUPT_RBUFLEN 100
+// disable the above three lines and enable the next one if polling method is used
+//#define SERIAL_VIA_POLLING
+
+// to measure time and delays we include a 1msec timer
+#define USE_SYSTEM_TIMER
+
+// CPU-Ports
+
+#define CPUIDLE             P3_3
+#define EXTWATCHDOG         P3_5
+
+#include "..\inc\cpu_c515a.h"
+
+#endif
\ No newline at end of file