External Interrupt example for WIZwiki-W7500 Academy

Dependencies:   mbed

Fork of GPIOIn_INT_HelloWorld_WIZwiki-W7500 by Lawrence Lee

main.cpp

Committer:
joon874
Date:
2015-07-09
Revision:
2:77994200971e
Parent:
1:95b6d8c7bb10
Child:
3:f3fffb66c845

File content as of revision 2:77994200971e:

/* Digital External Interrupt Example Program */

#include "mbed.h"
 
InterruptIn mysw(D4);
DigitalOut myled2(LED3);
 
void exin(){
    myled2 = !myled2;
}
 
int main() {
    
    mysw.rise(&exin);    // attach the address of the exin function to the rising edge

}