
Programm zur Darstellung der Lage eines Objektes im Raum mit Hilfe eines Beschleunigungssensores, 4 LED's und einem LCD-Display.
Diff: cdef.h
- Revision:
- 15:462c8c89fe35
- Parent:
- 0:2a6b63a19ae5
--- a/cdef.h Thu Jun 30 18:56:35 2016 +0000 +++ b/cdef.h Sun Jul 03 12:00:47 2016 +0000 @@ -1,10 +1,74 @@ -/* -* File name: cdef.h -* Zweck: Beinhaltet alle typdef-Variabeln nach dem Vorbild - der Vorlesung EMSY. -* Author: Prof. Dr. Altenburg -* Changes: keine -*/ +/******************************************************************** + * + * Name: cdef.h + * Beschreibung: grundlegende Typdefinitionen + * Autor: + * Erstellung: 23.10.2012 + * + * Revisionsliste + * Datum | Autor | Änderung + * ------------+---------------+-------------------------- + * 23.10.2012 | Altenburg | Ersterstellung + * ------------+---------------+-------------------------- + * + ********************************************************************/ +#ifndef CDEF_H +#define CDEF_H + +/**************************************************************************/ +/* Definitions */ +/**************************************************************************/ +typedef unsigned char byte; /* vorzeichenlose 8-Bit-Zahl */ +typedef unsigned short word; /* vorzeichenlose 16-Bit-Zahl */ +typedef signed char int8; /* vorzeichenbehaftete 8-Bit-Zahl */ +typedef signed short int16; /* vorzeichenbehaftete 16-Bit-Zahl */ +//typedef byte bool; /* True/False Aussage */ +typedef unsigned long dword; /* Long-Zahl */ +typedef signed long int32; + -/* Definierte Variabeln*/ -typedef unsigned short word; /* vorzeichenlose 16-Bit-Zahl */ \ No newline at end of file +#define True 1 +#define False 0 +#define true 1 +#define false 0 +#define On 1 +#define Off 0 +#define Yes 1 +#define No 0 + +#define Bit0 0x01 /* Bit-Definitionen */ +#define Bit1 0x02 +#define Bit2 0x04 +#define Bit3 0x08 +#define Bit4 0x10 +#define Bit5 0x20 +#define Bit6 0x40 +#define Bit7 0x80 +#define Bit8 (1 << 8) /* Bit-Definitionen */ +#define Bit9 (1 << 9) +#define Bit10 (1 << 10) +#define Bit11 (1 << 11) +#define Bit12 (1 << 12) +#define Bit13 (1 << 13) +#define Bit14 (1 << 14) +#define Bit15 (1 << 15) +#define Bit16 (1 << 16) /* Bit-Definitionen */ +#define Bit17 (1 << 17) +#define Bit18 (1 << 18) +#define Bit19 (1 << 19) +#define Bit20 (1 << 20) +#define Bit21 (1 << 21) +#define Bit22 (1 << 22) +#define Bit23 (1 << 23) +#define Bit24 (1 << 24) /* Bit-Definitionen */ +#define Bit25 (1 << 25) +#define Bit26 (1 << 26) +#define Bit27 (1 << 27) +#define Bit28 (1 << 28) +#define Bit29 (1 << 29) +#define Bit30 (1 << 30) +#define Bit31 (1 << 31) + + +#endif +/********************************************************************/