![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Timer interrupt code example for FRDM-KL25Z
Revision 0:1345a2932f87, committed 2014-06-04
- Comitter:
- APanecatl
- Date:
- Wed Jun 04 19:25:40 2014 +0000
- Commit message:
- Rev 1.0
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 1345a2932f87 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jun 04 19:25:40 2014 +0000 @@ -0,0 +1,35 @@ +#include "mbed.h" + +DigitalOut RED(LED1); +DigitalOut GREEN(LED2); +Timeout timeout; + + +int on = 1; + + + + void clear() +{ + on=0; + GREEN=0; + wait(.4); + GREEN=1; + +} + + +int main() +{ + timeout.attach(&clear,5); + + GREEN=1; + while(on) + { + RED= !RED; + wait(0.3); + } + +} + +
diff -r 000000000000 -r 1345a2932f87 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jun 04 19:25:40 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877 \ No newline at end of file