From e272b52b956dd59639ecfef74be650758632d2b8 Mon Sep 17 00:00:00 2001 From: mschmitt Date: Fri, 24 Mar 2000 18:38:18 +0000 Subject: [PATCH] def. of ports, includes ... git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@201 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- .../startupcode/inc/hardware_describtion.h | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 device/examples/startupcode/inc/hardware_describtion.h diff --git a/device/examples/startupcode/inc/hardware_describtion.h b/device/examples/startupcode/inc/hardware_describtion.h new file mode 100644 index 00000000..d60e0979 --- /dev/null +++ b/device/examples/startupcode/inc/hardware_describtion.h @@ -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 +#include +#include +#include +#include +#include +#include +#include + +// 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 -- 2.30.2