Augusto Panecatl
/
FRDM-K64_Interrupt
FRDM-K64 Interrupt basic demo
Revision 0:5d8424654e0e, committed 2014-07-09
- Comitter:
- APanecatl
- Date:
- Wed Jul 09 19:31:07 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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 09 19:31:07 2014 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" + + +DigitalOut Red(LED1); +DigitalOut Blue(LED3); +InterruptIn Interrupt(SW2); + + +void blink() +{ + wait(.4); + Red=1; + Blue=0; + wait(.4); + Blue=1; + wait(.4); +} + +int main() +{ + Interrupt.fall(&blink); + Blue=1; + while (1) + { + Red=!Red; + wait(.4); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 09 19:31:07 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file