project to demonstrate a problem with K64F serial
Dependencies: EthernetInterface WebSocketClient mbed-rtos mbed
main.cpp
- Committer:
- emh203
- Date:
- 2014-06-22
- Revision:
- 0:07c16f3f860a
File content as of revision 0:07c16f3f860a:
#include "mbed.h" DigitalOut myled(LED_GREEN); Serial pc(USBTX, USBRX); void SerialPC_RxIRQ() { while(pc.readable()) { pc.putc(pc.getc()); } } int main() { int i = 0; pc.printf("\nHello World!\n"); // pc.attach(&SerialPC_RxIRQ ,pc.RxIrq); while (true) { if(pc.readable()) { pc.putc(pc.getc()); } myled = !myled; } }