A clone of the example mbed Serial Interrupt code. Using it to debug issues with MAX32630.
Dependencies: USBDevice max32630fthr
main.cpp
00001 #include "mbed.h" 00002 #include "max32630fthr.h" 00003 00004 DigitalOut led1(LED1); 00005 DigitalOut led2(LED2); 00006 00007 Serial pc(USBTX, USBRX); 00008 00009 void callback_ex() { 00010 // Note: you need to actually read from the serial to clear the RX interrupt 00011 printf("%c\n", pc.getc()); 00012 led2 = !led2; 00013 } 00014 00015 int main() { 00016 pc.attach(&callback_ex); 00017 00018 while (1) { 00019 led1 = !led1; 00020 wait(0.5); 00021 } 00022 } 00023 00024
Generated on Sat Jul 16 2022 04:37:16 by 1.7.2