Augusto Panecatl
/
FRDM-K64_Interrupt
FRDM-K64 Interrupt basic demo
main.cpp
- Committer:
- APanecatl
- Date:
- 2014-07-09
- Revision:
- 0:5d8424654e0e
File content as of revision 0:5d8424654e0e:
#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); } }