h
Dependencies: mbed
main.cpp@0:5cdd5d46a10a, 2015-12-08 (annotated)
- Committer:
- fkgjh
- Date:
- Tue Dec 08 11:40:33 2015 +0000
- Revision:
- 0:5cdd5d46a10a
h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fkgjh | 0:5cdd5d46a10a | 1 | #include "mbed.h" |
fkgjh | 0:5cdd5d46a10a | 2 | |
fkgjh | 0:5cdd5d46a10a | 3 | BusOut Leds(PA_9,PC_7,PB_6,PA_7,PA_6,PA_5,PB_5,PB_4); |
fkgjh | 0:5cdd5d46a10a | 4 | BusIn Switches(PA_0,PA_1,PA_4,PB_0,PC_1,PC_0,PA_10,PB_3); |
fkgjh | 0:5cdd5d46a10a | 5 | |
fkgjh | 0:5cdd5d46a10a | 6 | int main() |
fkgjh | 0:5cdd5d46a10a | 7 | { |
fkgjh | 0:5cdd5d46a10a | 8 | |
fkgjh | 0:5cdd5d46a10a | 9 | while(true) |
fkgjh | 0:5cdd5d46a10a | 10 | { |
fkgjh | 0:5cdd5d46a10a | 11 | Leds=Switches & 0x0f; //0x0f tilsvarer 15 i hexa. Det vil si 1111, altså at de 4 første lysene er aktive |
fkgjh | 0:5cdd5d46a10a | 12 | } |
fkgjh | 0:5cdd5d46a10a | 13 | |
fkgjh | 0:5cdd5d46a10a | 14 | } |