
test export of mbed-os
main.cpp@0:2030e4f70e25, 2016-08-16 (annotated)
- Committer:
- argusbrown
- Date:
- Tue Aug 16 17:18:53 2016 +0000
- Revision:
- 0:2030e4f70e25
mbed-os example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
argusbrown | 0:2030e4f70e25 | 1 | #include "mbed.h" |
argusbrown | 0:2030e4f70e25 | 2 | |
argusbrown | 0:2030e4f70e25 | 3 | DigitalOut led1(LED1); |
argusbrown | 0:2030e4f70e25 | 4 | |
argusbrown | 0:2030e4f70e25 | 5 | // main() runs in its own thread in the OS |
argusbrown | 0:2030e4f70e25 | 6 | // (note the calls to Thread::wait below for delays) |
argusbrown | 0:2030e4f70e25 | 7 | int main() { |
argusbrown | 0:2030e4f70e25 | 8 | while (true) { |
argusbrown | 0:2030e4f70e25 | 9 | led1 = !led1; |
argusbrown | 0:2030e4f70e25 | 10 | Thread::wait(500); |
argusbrown | 0:2030e4f70e25 | 11 | } |
argusbrown | 0:2030e4f70e25 | 12 | } |
argusbrown | 0:2030e4f70e25 | 13 |