NuMaker GPIO Interrupt with Debounce Setting

Revision:
2:15b06747ce59
Parent:
0:29e056412215
Child:
5:b9b7cd06aaf0
diff -r f513d0daf363 -r 15b06747ce59 main.cpp
--- a/main.cpp	Mon Oct 17 03:12:31 2016 +0000
+++ b/main.cpp	Fri Nov 11 15:59:58 2016 +0800
@@ -1,13 +1,13 @@
 // NuMaker-PFM-NUC472 : GPIO interrupt to set led on/off
 #include "mbed.h"
 
-InterruptIn button(PG_1); // D0 
-DigitalOut led(LED1);     // flashing LED1(rgbled1)
+InterruptIn button(SW1);    // Button SW1
+DigitalOut led(LED1);       // flashing LED1(rgbled1)
 
 void flip() {
     led = !led;
 }
 
 int main() {
-    button.rise(&flip); // if D0 is floating, then rgbled will be flashing
+    button.rise(&flip);
 }