attempt at producing a working Software Serial UART. LIBRARY DOES NOT YET WORK COMPLETELY.
Dependencies: mbed SoftwareSerial
main.cpp
- Committer:
- chag
- Date:
- 2012-03-17
- Revision:
- 0:6b23f6c9cdf1
File content as of revision 0:6b23f6c9cdf1:
#include "mbed.h" #include "SoftwareSerial.h" Serial pc(USBTX, USBRX); SoftwareSerial ss(p19, p20); int main() { pc.baud(115200); pc.putc('\f'); pc.printf("==== MBED Serial Proxy ====\r\n"); wait(2); ss.baud(300); wait(2); while(1) { if(pc.readable()) ss.putc(pc.getc()); if(ss.readable()) pc.putc(ss.getc()); } }