![](/media/cache/profiles/69f65a2e91e6051a23abe7293bf3386a.50x50_q85.jpg)
USBSerial echo example
main.cpp
- Committer:
- samux
- Date:
- 2011-11-11
- Revision:
- 0:5cd54b826046
- Child:
- 4:583cafe16ec7
File content as of revision 0:5cd54b826046:
#include "mbed.h" #include "USBSerial.h" //Virtual serial port over USB USBSerial serial; Serial pc(USBTX, USBRX); int main(void) { uint8_t buf[128]; while(1) { serial.scanf("%s", buf); serial.printf("recv: %s\r\n", buf); pc.printf("recv: %s\r\n", buf); } }