oppg2

Dependencies:   mbed

Fork of LAB07_Oppgave2 by EL-POM1001

Committer:
rlanghbv
Date:
Wed Oct 14 18:28:27 2015 +0000
Revision:
1:2e42c8846b90
Parent:
0:78adfca8ca69
Child:
2:a27126b6128e
first commit

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
rlanghbv 1:2e42c8846b90 9 void knappTrykket(){
rlanghbv 0:78adfca8ca69 10
rlanghbv 1:2e42c8846b90 11 teller=teller+1;
rlanghbv 1:2e42c8846b90 12 leds=~teller;
rlanghbv 0:78adfca8ca69 13 }
rlanghbv 0:78adfca8ca69 14
rlanghbv 1:2e42c8846b90 15 int main(){
rlanghbv 1:2e42c8846b90 16 knapp.fall(&knappTrykket);
rlanghbv 1:2e42c8846b90 17 leds=~0;
rlanghbv 1:2e42c8846b90 18 while (true) { wait(1); }
rlanghbv 0:78adfca8ca69 19 }