aston aston
/
mbed-os-example-blinky
xcvcx
main.cpp@1:9e60464b3c72, 2016-12-26 (annotated)
- Committer:
- wbqaston
- Date:
- Mon Dec 26 07:33:51 2016 +0000
- Revision:
- 1:9e60464b3c72
- Parent:
- 0:7b4fe69d1af5
fdgvd
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wbqaston | 0:7b4fe69d1af5 | 1 | #include "mbed.h" |
wbqaston | 0:7b4fe69d1af5 | 2 | |
wbqaston | 0:7b4fe69d1af5 | 3 | DigitalOut led1(LED1); |
wbqaston | 0:7b4fe69d1af5 | 4 | |
wbqaston | 1:9e60464b3c72 | 5 | // main() runs in its own thread in THE OS |
wbqaston | 1:9e60464b3c72 | 6 | // (note THE calls to Thread::wait below for delays) |
wbqaston | 0:7b4fe69d1af5 | 7 | int main() { |
wbqaston | 0:7b4fe69d1af5 | 8 | while (true) { |
wbqaston | 0:7b4fe69d1af5 | 9 | led1 = !led1; |
wbqaston | 0:7b4fe69d1af5 | 10 | Thread::wait(500); |
wbqaston | 0:7b4fe69d1af5 | 11 | } |
wbqaston | 0:7b4fe69d1af5 | 12 | } |