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

Dependencies:   USBDevice max32630fthr

Files at this revision

API Documentation at this revision

Comitter:
koziniec
Date:
Sat Jun 24 06:16:52 2017 +0000
Commit message:
Test programming for debugging serial interrupts on MAX32630

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
max32630fthr.lib Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r ad9a8bc4e4d6 USBDevice.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Sat Jun 24 06:16:52 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/#17ac7abb27a7
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
diff -r 000000000000 -r ad9a8bc4e4d6 max32630fthr.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/max32630fthr.lib	Sat Jun 24 06:16:52 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/#60997adf01a2
diff -r 000000000000 -r ad9a8bc4e4d6 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Sat Jun 24 06:16:52 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#c9e63f14085f5751ff5ead79a7c0382d50a813a2