![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
而我
Revision 0:59ed30c4ca5a, committed 2017-01-13
- Comitter:
- wbqaston
- Date:
- Fri Jan 13 03:14:21 2017 +0000
- Commit message:
- ????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 59ed30c4ca5a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jan 13 03:14:21 2017 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Ticker toggle_led_ticker; + +DigitalOut led1(LED1); + +void toggle_led() { + led1 = !led1; +} + +int main() { + // Init the ticker with the address of the function (toggle_led) to be attached and the interval (100 ms) + toggle_led_ticker.attach(&toggle_led, 0.1); + while (true) { + // Do other things... + } +} \ No newline at end of file
diff -r 000000000000 -r 59ed30c4ca5a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jan 13 03:14:21 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9baf128c2fab \ No newline at end of file