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.cpp
00001 /*************************************************************************** 00002 * Titel : main.c 00003 * 00004 * Description : MPRO - Basisprogramm 00005 * 00006 * Revision List: 00007 -------------------------------------------------------------------------- 00008 Date | Author | Change 00009 -------------------------------------------------------------------------- 00010 10.05.21 | J. Altenburg | Ersterstellung 00011 -------------------------------------------------------------------------- 00012 25.10.21 | J. Altenburg | Modifikation für Laborversuch 1 (HAPO WS2021) 00013 ---------------------------------------------------------------------------- 00014 ****************************************************************************/ 00015 #include "mbed.h" 00016 #include "cdef.h" 00017 00018 /* Vereinbarungen zu den Tasteneingängen */ 00019 DigitalIn pinSW1(D8); 00020 00021 /* Ausgänge als "BUS" konfigurieren */ 00022 BusOut bLedBus(/*A3,*/ A4, D2, D5, D4, D3); 00023 00024 /* Ausgänge als Einzelleitung festlegen */ 00025 DigitalOut pinRed1(A3); 00026 00027 00028 /*************************************************************************** 00029 * Defines und Makros 00030 ***************************************************************************/ 00031 00032 00033 00034 /*************************************************************************** 00035 * Variablen 00036 ***************************************************************************/ 00037 byte bLocalFoo; 00038 00039 /*************************************************************************** 00040 * lokale Funktionen 00041 ***************************************************************************/ 00042 void vFoo( void ){ 00043 bLocalFoo++; 00044 } 00045 00046 00047 /*************************************************************************** 00048 * main() 00049 ***************************************************************************/ 00050 int main() { 00051 while(1){ 00052 if(pinSW1 == 0){ 00053 bLedBus = 0x10; 00054 pinRed1 = 0; 00055 } 00056 else{ 00057 bLedBus = 0x00; 00058 pinRed1 = 1; 00059 } 00060 } 00061 } 00062 00063 /* EOF */
Generated on Wed Jul 13 2022 09:38:43 by
