Docs

Die Seite verlinkt auf Nächste Seite.

Committer:
bulmecisco
Date:
Mon Jun 04 17:56:42 2018 +0000
Revision:
1:2b0e3e783590
Parent:
0:749dbf57cdeb
Docs 2;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bulmecisco 0:749dbf57cdeb 1 #include "stdio.h"
bulmecisco 0:749dbf57cdeb 2 #include "string.h"
bulmecisco 0:749dbf57cdeb 3
bulmecisco 0:749dbf57cdeb 4 #pragma warning(disable : 4996)
bulmecisco 0:749dbf57cdeb 5
bulmecisco 0:749dbf57cdeb 6 #ifndef _INC_BEVA
bulmecisco 0:749dbf57cdeb 7 #define _INC_BEVA
bulmecisco 0:749dbf57cdeb 8
bulmecisco 0:749dbf57cdeb 9 /** A digital output, used for setting the state of a pin
bulmecisco 0:749dbf57cdeb 10 *
bulmecisco 0:749dbf57cdeb 11 * @note Synchronization level: Interrupt safe
bulmecisco 0:749dbf57cdeb 12 *
bulmecisco 0:749dbf57cdeb 13 * Example:
bulmecisco 0:749dbf57cdeb 14 * @code
bulmecisco 0:749dbf57cdeb 15 * // Toggle a LED
bulmecisco 0:749dbf57cdeb 16 * #include "mbed.h"
bulmecisco 0:749dbf57cdeb 17 *
bulmecisco 0:749dbf57cdeb 18 * DigitalOut led(LED1);
bulmecisco 0:749dbf57cdeb 19 *
bulmecisco 0:749dbf57cdeb 20 * int main() {
bulmecisco 1:2b0e3e783590 21 * while (1) {
bulmecisco 1:2b0e3e783590 22 * led = !led;
bulmecisco 1:2b0e3e783590 23 * printf("Blink! LED is now %d\n", led.read());
bulmecisco 1:2b0e3e783590 24 * eva.eingabe();
bulmecisco 1:2b0e3e783590 25 * eva.ausgabe();
bulmecisco 1:2b0e3e783590 26 * wait_ms(500);
bulmecisco 1:2b0e3e783590 27 * }
bulmecisco 0:749dbf57cdeb 28 * }
bulmecisco 0:749dbf57cdeb 29 * @endcode
bulmecisco 0:749dbf57cdeb 30 * @ingroup drivers
bulmecisco 0:749dbf57cdeb 31 */
bulmecisco 0:749dbf57cdeb 32
bulmecisco 0:749dbf57cdeb 33 class Beva {
bulmecisco 0:749dbf57cdeb 34 private: // Memebervariable
bulmecisco 0:749dbf57cdeb 35 char str[80];
bulmecisco 0:749dbf57cdeb 36 public: // Methoden
bulmecisco 0:749dbf57cdeb 37 Beva() { // Standard-Konstruktor
bulmecisco 0:749dbf57cdeb 38 strcpy(str, "InitString"); // Initialisieren der Memebervariable
bulmecisco 0:749dbf57cdeb 39 }
bulmecisco 0:749dbf57cdeb 40 // Überladene parametrisierte Konstruktor
bulmecisco 0:749dbf57cdeb 41 Beva(char _str[]) {
bulmecisco 0:749dbf57cdeb 42 strcpy(str, _str);
bulmecisco 0:749dbf57cdeb 43 }
bulmecisco 0:749dbf57cdeb 44 void eingabe(void);
bulmecisco 0:749dbf57cdeb 45 void ausgabe(void);
bulmecisco 0:749dbf57cdeb 46 };
bulmecisco 0:749dbf57cdeb 47 #endif