NTERUPCIONES POR ENTRADA DIGITAL DETECTA FLANCOS Y GENERA INTERUPCIONES este programa verifica que en una frdmkl25z funcionan bien las interupciones por entradas digitales

Dependencies:   mbed

main.cpp

Committer:
tony63
Date:
2016-04-23
Revision:
0:2ae2fd3ac8a4

File content as of revision 0:2ae2fd3ac8a4:

/*
INTERUPCIONES POR ENTRADA DIGITAL
DETECTA FLANCOS Y GENERA INTERUPCIONES
este programa verifica que en una frdmkl25z
funcionan bien las interupciones por entradas digitales
*/
#include "mbed.h"

DigitalOut LedRojo(LED1);
DigitalOut LedVerde(LED2);
InterruptIn sw2(PTA13);
Timer t;
void sw2_release(void)
{
    LedVerde=0;
    LedRojo=1;
}

void sw2_pull(void)
{
    LedVerde=1;
    LedRojo=0;
}


int main()
{
    sw2.rise(&sw2_release);
    sw2.fall(&sw2_pull);
    
    while (true) {
    }
}