Serial UART vs debug UART 115200

Dependencies:   mbed-src

Fork of Dragonfly_Terminal by Multi-Hackers

main.cpp

Committer:
BlueShadow
Date:
2015-10-20
Revision:
1:d0cc713b3645
Parent:
0:46dc3fdbc97e

File content as of revision 1:d0cc713b3645:

#include "mbed.h"

int main() {
    // external serial port
    Serial ext(PA_2, PA_3);
    // internal serial port to radio
    Serial radio(RADIO_TX, RADIO_RX);
    
    ext.baud(230400);
    radio.baud(115200);
    
    while (true) {
        if (ext.readable())
            radio.putc(ext.getc());
        if (radio.readable())
            ext.putc(radio.getc());
    }
}