Class similar to InterruptIn which allows the LPC1114 to wake from deepsleep. (For other targets you can use InterruptIn).

Dependents:   WakeUp WakeUp WakeUp WakeUp ... more

Revision:
1:128f3fe79240
Parent:
0:d726461bd0af
--- a/WakeInterruptIn.h	Sat Jul 26 15:02:43 2014 +0000
+++ b/WakeInterruptIn.h	Mon Jul 28 06:14:48 2014 +0000
@@ -4,6 +4,12 @@
 simple library helps with that
 */
 
+//Only include it for correct target. This allows me to re-use it in WakeUp lib
+#ifdef TARGET_LPC11XX_11CXX
+
+#ifndef WAKEINTERRUPTIN_H
+#define WAKEINTERRUPTIN_H
+
 #include "mbed.h"
 #define NUM_CHANNEL     13
 
@@ -84,6 +90,7 @@
     FunctionPointer fpointer;
     
     void enable(void) {
+        LPC_SYSCON->STARTRSRP0CLR = 1 << channel;
         LPC_SYSCON->STARTERP0 |= (1 << channel);
         NVIC_EnableIRQ((IRQn_Type)channel);
     }
@@ -113,4 +120,6 @@
     static void handler11(void) { objects[11]->handle(); }
     static void handler12(void) { objects[12]->handle(); }
     
-};
\ No newline at end of file
+};
+#endif
+#endif
\ No newline at end of file