Docs

Die Seite verlinkt auf Nächste Seite.

Committer:
bulmecisco
Date:
Mon Jun 04 17:53:02 2018 +0000
Revision:
0:749dbf57cdeb
Child:
1:2b0e3e783590
Docs

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 0:749dbf57cdeb 21 * while(1) {
bulmecisco 0:749dbf57cdeb 22 * led = !led;
bulmecisco 0:749dbf57cdeb 23 * wait(0.2);
bulmecisco 0:749dbf57cdeb 24 * }
bulmecisco 0:749dbf57cdeb 25 * }
bulmecisco 0:749dbf57cdeb 26 * @endcode
bulmecisco 0:749dbf57cdeb 27 * @ingroup drivers
bulmecisco 0:749dbf57cdeb 28 */
bulmecisco 0:749dbf57cdeb 29
bulmecisco 0:749dbf57cdeb 30 class Beva {
bulmecisco 0:749dbf57cdeb 31 private: // Memebervariable
bulmecisco 0:749dbf57cdeb 32 char str[80];
bulmecisco 0:749dbf57cdeb 33 public: // Methoden
bulmecisco 0:749dbf57cdeb 34 Beva() { // Standard-Konstruktor
bulmecisco 0:749dbf57cdeb 35 strcpy(str, "InitString"); // Initialisieren der Memebervariable
bulmecisco 0:749dbf57cdeb 36 }
bulmecisco 0:749dbf57cdeb 37 // Überladene parametrisierte Konstruktor
bulmecisco 0:749dbf57cdeb 38 Beva(char _str[]) {
bulmecisco 0:749dbf57cdeb 39 strcpy(str, _str);
bulmecisco 0:749dbf57cdeb 40 }
bulmecisco 0:749dbf57cdeb 41 void eingabe(void);
bulmecisco 0:749dbf57cdeb 42 void ausgabe(void);
bulmecisco 0:749dbf57cdeb 43 };
bulmecisco 0:749dbf57cdeb 44 #endif