![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Enciende led1 y led2 por interrupciones en los pines de entrada
main.cpp
- Committer:
- franni
- Date:
- 2017-04-26
- Revision:
- 0:0d7118880416
File content as of revision 0:0d7118880416:
#include "mbed.h" DigitalOut led1(LED1); DigitalOut led2(LED2); InterruptIn int1(PTD6); InterruptIn int2(PTD7); void ISR_Pin6() { led1 = !led1; wait(1); } void ISR_Pin7() { led2 = !led2; wait(1); } int main() { int1.mode(PullUp); int2.mode(PullUp); int1.rise(&ISR_Pin6); int2.fall(&ISR_Pin7); while(1) {} }