External Interrupt example for WIZwiki-W7500 Academy

Dependencies:   mbed

Fork of GPIOIn_INT_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Committer:
joon874
Date:
Thu Jul 09 01:36:50 2015 +0000
Revision:
2:77994200971e
Parent:
1:95b6d8c7bb10
Child:
3:f3fffb66c845
GPIO Input Interrupt Example for WIZwiki-W7500 Academy

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joon874 0:4052805e9292 1 /* Digital External Interrupt Example Program */
joon874 0:4052805e9292 2
joon874 0:4052805e9292 3 #include "mbed.h"
joon874 0:4052805e9292 4
joon874 2:77994200971e 5 InterruptIn mysw(D4);
joon874 2:77994200971e 6 DigitalOut myled2(LED3);
joon874 0:4052805e9292 7
joon874 0:4052805e9292 8 void exin(){
joon874 0:4052805e9292 9 myled2 = !myled2;
joon874 0:4052805e9292 10 }
joon874 0:4052805e9292 11
joon874 0:4052805e9292 12 int main() {
joon874 0:4052805e9292 13
joon874 1:95b6d8c7bb10 14 mysw.rise(&exin); // attach the address of the exin function to the rising edge
joon874 2:77994200971e 15
joon874 1:95b6d8c7bb10 16 }
joon874 1:95b6d8c7bb10 17
joon874 1:95b6d8c7bb10 18