Allan Wu
/
mbed-os-example-blinky-F429ZI
blinky only
main.cpp@0:58db089d4478, 2020-04-06 (annotated)
- Committer:
- wujansin
- Date:
- Mon Apr 06 17:08:16 2020 +0000
- Revision:
- 0:58db089d4478
F2429ZI-blink
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wujansin | 0:58db089d4478 | 1 | #include "mbed.h" |
wujansin | 0:58db089d4478 | 2 | |
wujansin | 0:58db089d4478 | 3 | DigitalOut led1(LED1); |
wujansin | 0:58db089d4478 | 4 | |
wujansin | 0:58db089d4478 | 5 | |
wujansin | 0:58db089d4478 | 6 | // main() runs in its own thread in the OS |
wujansin | 0:58db089d4478 | 7 | int main() { |
wujansin | 0:58db089d4478 | 8 | while (true) { |
wujansin | 0:58db089d4478 | 9 | led1 = !led1; |
wujansin | 0:58db089d4478 | 10 | wait(0.5); |
wujansin | 0:58db089d4478 | 11 | } |
wujansin | 0:58db089d4478 | 12 | } |
wujansin | 0:58db089d4478 | 13 |