ESTE PEQUEÑO PROGRAMA HACE UNA PASARELA ENTRE EL PC Y LA USART EMULA UN DONGLE USB. SE PUEDE USAR PARA PROBAR EL MODULO SE RECOMIENDA BAJAR "termite"

Dependencies:   mbed

main.cpp

Committer:
tony63
Date:
2016-09-16
Revision:
0:ff82a3246b5b

File content as of revision 0:ff82a3246b5b:


#include "mbed.h"

Serial pc(USBTX, USBRX); // tx, rx
Serial device(PTE0, PTE1);  // tx, rx

int main() {
    while(1) {
        if(pc.readable()) {
            device.putc(pc.getc());
        }
        if(device.readable()) {
            pc.putc(device.getc());
        }
    }
}