member initializer list

Dependencies:   MyLed mbed

Committer:
bulmecisco
Date:
Tue Oct 06 15:33:50 2020 +0000
Revision:
1:724f43e0a624
Parent:
0:eaf87e27076e
member initializer lists

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bulmecisco 0:eaf87e27076e 1 #include "mbed.h"
bulmecisco 0:eaf87e27076e 2 #include "MyLed.h"
bulmecisco 0:eaf87e27076e 3
bulmecisco 0:eaf87e27076e 4 // Objekt instanziieren
bulmecisco 0:eaf87e27076e 5 MyLed myled(LED1);
bulmecisco 0:eaf87e27076e 6
bulmecisco 0:eaf87e27076e 7 int main() {
bulmecisco 0:eaf87e27076e 8 while(1) {
bulmecisco 0:eaf87e27076e 9 // Aufruf der Methoden
bulmecisco 0:eaf87e27076e 10 myled.ledOn();
bulmecisco 0:eaf87e27076e 11 myled.printStatus();
bulmecisco 0:eaf87e27076e 12 wait(0.2);
bulmecisco 0:eaf87e27076e 13 myled.ledOff();
bulmecisco 0:eaf87e27076e 14 myled.printStatus();
bulmecisco 0:eaf87e27076e 15 wait(0.2);
bulmecisco 0:eaf87e27076e 16 }
bulmecisco 0:eaf87e27076e 17 }