rettet verjon av lab 7 oppgave 2

Dependencies:   mbed

Fork of LAB07_Oppgave2 by EL-POM1001

Committer:
tcuc
Date:
Thu Oct 15 07:45:10 2015 +0000
Revision:
2:55b0fc859918
Parent:
1:2e42c8846b90
Rettet LAB07_oppgave2 program, la til 2 manglene linjer.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rlanghbv 0:78adfca8ca69 1 #include "mbed.h"
rlanghbv 0:78adfca8ca69 2
rlanghbv 1:2e42c8846b90 3 InterruptIn knapp(PB_3);
rlanghbv 1:2e42c8846b90 4
rlanghbv 1:2e42c8846b90 5 BusOut leds(PA_9,PC_7,PB_6,PA_7,PA_6,PA_5,PB_5,PB_4);
rlanghbv 1:2e42c8846b90 6 static int teller=0;
rlanghbv 1:2e42c8846b90 7
rlanghbv 0:78adfca8ca69 8
tcuc 2:55b0fc859918 9 void knappTrykket()
tcuc 2:55b0fc859918 10 {
tcuc 2:55b0fc859918 11 knapp.disable_irq();
tcuc 2:55b0fc859918 12 timeOutIrq.attatch(&enableKnappTrykk,.1;
rlanghbv 1:2e42c8846b90 13 teller=teller+1;
rlanghbv 1:2e42c8846b90 14 leds=~teller;
rlanghbv 0:78adfca8ca69 15 }
rlanghbv 0:78adfca8ca69 16
rlanghbv 1:2e42c8846b90 17 int main(){
rlanghbv 1:2e42c8846b90 18 knapp.fall(&knappTrykket);
rlanghbv 1:2e42c8846b90 19 leds=~0;
rlanghbv 1:2e42c8846b90 20 while (true) { wait(1); }
rlanghbv 0:78adfca8ca69 21 }