Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.h
00001 /******************************************************************** 00002 * 00003 * Name: main.h 00004 * Beschreibung: grundlegende Typdefinitionen 00005 * Autor: 00006 * Erstellung: 29.05.2020 00007 * 00008 * Revisionsliste 00009 * Datum | Autor | ├änderung 00010 * ------------+---------------+-------------------------- 00011 * 29.05.2020 | Altenburg | Ersterstellung 00012 * ------------+---------------+-------------------------- 00013 * 00014 ********************************************************************/ 00015 #ifndef MAIN_H 00016 #define MAIN_H 00017 00018 /**************************************************************************/ 00019 /* Definitions */ 00020 /**************************************************************************/ 00021 typedef unsigned char byte; /* vorzeichenlose 8-Bit-Zahl */ 00022 typedef unsigned short word; /* vorzeichenlose 16-Bit-Zahl */ 00023 typedef signed char int8; /* vorzeichenbehaftete 8-Bit-Zahl */ 00024 typedef signed short int16; /* vorzeichenbehaftete 16-Bit-Zahl */ 00025 //typedef byte bool; /* True/False Aussage */ 00026 typedef unsigned long dword; /* Long-Zahl */ 00027 typedef signed long int32; 00028 00029 typedef void (* Def_fFunc)( void );/* Prototyp eines Funktionspointers */ 00030 00031 typedef struct { 00032 byte abData[8]; 00033 }Def_stValue; 00034 00035 00036 #define True 1 00037 #define False 0 00038 #define true 1 00039 #define false 0 00040 #define On 1 00041 #define Off 0 00042 #define Yes 1 00043 #define No 0 00044 00045 #define Bit0 0x01 /* Bit-Definitionen */ 00046 #define Bit1 0x02 00047 #define Bit2 0x04 00048 #define Bit3 0x08 00049 #define Bit4 0x10 00050 #define Bit5 0x20 00051 #define Bit6 0x40 00052 #define Bit7 0x80 00053 #define Bit8 (unsigned long)(1 << 8) /* Bit-Definitionen */ 00054 #define Bit9 (unsigned long)(1 << 9) 00055 #define Bit10 (1 << 10) 00056 #define Bit11 (unsigned long)(1 << 11) 00057 #define Bit12 (1 << 12) 00058 #define Bit13 (unsigned long)(1 << 13) 00059 #define Bit14 (1 << 14) 00060 #define Bit15 (unsigned long)(1 << 15) 00061 #define Bit16 (unsigned long)(1 << 16) /* Bit-Definitionen */ 00062 #define Bit17 (unsigned long)(1 << 17) 00063 #define Bit18 (unsigned long)(1 << 18) 00064 #define Bit19 (unsigned long)(1 << 19) 00065 #define Bit20 (unsigned long)(1 << 20) 00066 #define Bit21 (unsigned long)(1 << 21) 00067 #define Bit22 (unsigned long)(1 << 22) 00068 #define Bit23 (unsigned long)(1 << 23) 00069 #define Bit24 (unsigned long)(1 << 24) /* Bit-Definitionen */ 00070 #define Bit25 (unsigned long)(1 << 25) 00071 #define Bit26 (unsigned long)(1 << 26) 00072 #define Bit27 (unsigned long)(1 << 27) 00073 #define Bit28 (unsigned long)(1 << 28) 00074 #define Bit29 (unsigned long)(1 << 29) 00075 #define Bit30 (unsigned long)(1 << 30) 00076 #define Bit31 (unsigned long)(1 << 31) 00077 00078 /************************************************************************** 00079 * I2C - Zugriff auf HAL 00080 **************************************************************************/ 00081 void vSDAOutput ( void ); /* SDA-Datenrichtung -> Output */ 00082 void vSDAInput ( void ); /* SDA-Datenrichtung -> Input */ 00083 00084 void vSDA_H ( void ); /* SDA setzen */ 00085 void vSDA_L ( void ); /* SDA löschen */ 00086 void vSCL_H ( void ); /* SCL setzen */ 00087 void vSCL_L ( void ); /* SCL löschen */ 00088 00089 void vI2CDelay ( void ); /* Warteschleife für SCL-Takt */ 00090 void vI2CShort ( void ); /* Warteschleife für set-up-Zeiten */ 00091 00092 #endif 00093 /********************************************************************/ 00094
Generated on Wed Aug 3 2022 18:44:12 by
1.7.2