Funktioniert nicht

Dependencies:   mbed

Fork of m0_Port3 by Martina Le

Committer:
martinale
Date:
Mon Jan 11 16:14:17 2016 +0000
Revision:
0:1227621ef234
Aufgabe3 (Funktioniert nicht)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
martinale 0:1227621ef234 1 #include "mbed.h"
martinale 0:1227621ef234 2 //#define P0_MASK 0x10120000
martinale 0:1227621ef234 3 //#define P1_MASK 0x00080000
martinale 0:1227621ef234 4
martinale 0:1227621ef234 5
martinale 0:1227621ef234 6 PortIn P0(Port0, 0x10120000);
martinale 0:1227621ef234 7 PortIn p1(Port1, 0x000C0000);
martinale 0:1227621ef234 8 DigitalOut led(LED3);
martinale 0:1227621ef234 9
martinale 0:1227621ef234 10 int main() {
martinale 0:1227621ef234 11 while(1) {
martinale 0:1227621ef234 12 int taster = p1.read();
martinale 0:1227621ef234 13 if(taster)
martinale 0:1227621ef234 14 {
martinale 0:1227621ef234 15 led = 1;
martinale 0:1227621ef234 16 }
martinale 0:1227621ef234 17 else
martinale 0:1227621ef234 18 {
martinale 0:1227621ef234 19 led = 0;
martinale 0:1227621ef234 20 }
martinale 0:1227621ef234 21
martinale 0:1227621ef234 22 }
martinale 0:1227621ef234 23 }