A clone of the example mbed Serial Interrupt code. Using it to debug issues with MAX32630.

Dependencies:   USBDevice max32630fthr

Revision:
0:ad9a8bc4e4d6
diff -r 000000000000 -r ad9a8bc4e4d6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jun 24 06:16:52 2017 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "max32630fthr.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+ 
+Serial pc(USBTX, USBRX);
+ 
+void callback_ex() {
+    // Note: you need to actually read from the serial to clear the RX interrupt
+    printf("%c\n", pc.getc());
+    led2 = !led2;
+}
+ 
+int main() {
+    pc.attach(&callback_ex);
+    
+    while (1) {
+        led1 = !led1;
+        wait(0.5);
+    }
+}
+ 
+            
\ No newline at end of file