X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Fexamples%2Fstartupcode%2Finc%2Fhardware_description.h;fp=device%2Fexamples%2Fstartupcode%2Finc%2Fhardware_description.h;h=af89fb8cf3506a4de21d0c21a61a6accde8c1008;hb=90101b871648df439a1a52efb57f9c74529ba69f;hp=0000000000000000000000000000000000000000;hpb=9271bf22f591ee9b07d810cea38e0bc5f54ca036;p=fw%2Fsdcc diff --git a/device/examples/startupcode/inc/hardware_description.h b/device/examples/startupcode/inc/hardware_description.h new file mode 100644 index 00000000..af89fb8c --- /dev/null +++ b/device/examples/startupcode/inc/hardware_description.h @@ -0,0 +1,65 @@ +// 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 + +// The Siemens CPU C515A has a build in Baudrategenerator, therefore we use it instead +// of timer 1 this gives a better resolution +#define BAUDRATEGENENATOR_USED + +// 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