mbed-os-examples
/
mbed-os-example-bootloader-blinky
.
main.cpp@2:78445cb0f9d7, 2017-03-24 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Mar 24 10:30:30 2017 +0000
- Revision:
- 2:78445cb0f9d7
- Parent:
- 0:32997aac176c
Merge pull request #6 from 0xc0170/dev_fix_docs
Readme: add specific binary name a user should use
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-bootloader-blinky
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:32997aac176c | 1 | #include "mbed.h" |
mbed_official | 0:32997aac176c | 2 | |
mbed_official | 0:32997aac176c | 3 | DigitalOut led1(LED1); |
mbed_official | 0:32997aac176c | 4 | |
mbed_official | 0:32997aac176c | 5 | // main() runs in its own thread in the OS |
mbed_official | 0:32997aac176c | 6 | // (note the calls to wait below for delays) |
mbed_official | 0:32997aac176c | 7 | int main() { |
mbed_official | 0:32997aac176c | 8 | while (true) { |
mbed_official | 0:32997aac176c | 9 | led1 = !led1; |
mbed_official | 0:32997aac176c | 10 | wait(0.5); |
mbed_official | 0:32997aac176c | 11 | } |
mbed_official | 0:32997aac176c | 12 | } |
mbed_official | 0:32997aac176c | 13 |