Quentin LAM
/
ex20_fonction
Exo
Revision 0:0237586b9926, committed 2018-05-29
- Comitter:
- Quent1nl
- Date:
- Tue May 29 14:14:16 2018 +0000
- Commit message:
- EX20
Changed in this revision
diff -r 000000000000 -r 0237586b9926 IHM_V2.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IHM_V2.lib Tue May 29 14:14:16 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/teams/NBoard/code/IHM_V2/#ad91067e3f6d
diff -r 000000000000 -r 0237586b9926 Nboard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Nboard.h Tue May 29 14:14:16 2018 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" +#include "IHM.h" +#define Ana0 000 +#define Ana1 001 +#define Ana2 010 +#define Ana3 011 +#define Ana4 100 +#define Ana5 101 +#define AnIn 110 +#define Ana7 111 + + +DigitalOut led0(PB_3), led1(PA_7),led2(PA_6),led3(PA_5),led4(PA_3),led5(PA_1),led6(PA_0),led7(PA_2); +DigitalIn bp(PA_9, PullUp),bou1(PA_10,PullUp),bou2(PB_0,PullUp),bou3(PB_7,PullUp); +BusOut Bus8Leds(PB_3,PA_7,PA_6,PA_5,PA_3,PA_1,PA_0,PA_2); +BusOut BusSelMux(PF_0,PF_1,PA_8); +AnalogIn AnaIn(PB_1);
diff -r 000000000000 -r 0237586b9926 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 29 14:14:16 2018 +0000 @@ -0,0 +1,29 @@ +#include "Nboard.h" + +void allumer_succ(); +void allumer_si_bp(); +int main() +{ + allumer_succ(); + while(1) { + allumer_si_bp(); + } +} + + +void allumer_succ() +{ + led1=1; + wait(1); + led1=!led1; + led7=1; + wait(1); + led7=!led7; +} +void allumer_si_bp() +{ + if(bp==0) { + while(bp==0); + Bus8Leds=0xFF; + } +} \ No newline at end of file
diff -r 000000000000 -r 0237586b9926 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue May 29 14:14:16 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file