project to demonstrate a problem with K64F serial
Dependencies: EthernetInterface WebSocketClient mbed-rtos mbed
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut myled(LED_GREEN); 00004 Serial pc(USBTX, USBRX); 00005 00006 00007 void SerialPC_RxIRQ() 00008 { 00009 while(pc.readable()) 00010 { 00011 00012 pc.putc(pc.getc()); 00013 00014 } 00015 } 00016 00017 int main() 00018 { 00019 int i = 0; 00020 pc.printf("\nHello World!\n"); 00021 00022 // pc.attach(&SerialPC_RxIRQ ,pc.RxIrq); 00023 00024 00025 while (true) { 00026 00027 if(pc.readable()) 00028 { 00029 pc.putc(pc.getc()); 00030 } 00031 00032 myled = !myled; 00033 } 00034 } 00035 00036
Generated on Mon Jul 18 2022 02:38:11 by
1.7.2
Eli Hughes