z hl
/
mbed-os-example-blinky
stm32f429Discovery mbedos
main.cpp@0:9c727e104a90, 2017-06-15 (annotated)
- Committer:
- zhlyz2003
- Date:
- Thu Jun 15 16:51:56 2017 +0000
- Revision:
- 0:9c727e104a90
stm32f429Discovery mbedos
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
zhlyz2003 | 0:9c727e104a90 | 1 | #include "mbed.h" |
zhlyz2003 | 0:9c727e104a90 | 2 | |
zhlyz2003 | 0:9c727e104a90 | 3 | DigitalOut led1(LED1); |
zhlyz2003 | 0:9c727e104a90 | 4 | |
zhlyz2003 | 0:9c727e104a90 | 5 | // main() runs in its own thread in the OS |
zhlyz2003 | 0:9c727e104a90 | 6 | // (note the calls to wait below for delays) |
zhlyz2003 | 0:9c727e104a90 | 7 | int main() { |
zhlyz2003 | 0:9c727e104a90 | 8 | while (true) { |
zhlyz2003 | 0:9c727e104a90 | 9 | led1 = !led1; |
zhlyz2003 | 0:9c727e104a90 | 10 | wait(0.5); |
zhlyz2003 | 0:9c727e104a90 | 11 | } |
zhlyz2003 | 0:9c727e104a90 | 12 | } |
zhlyz2003 | 0:9c727e104a90 | 13 |