Test Seriale MDOT

Dependencies:   libmDot mbed-rtos mbed

Fork of mDot_LoRa_Connect_Example by MultiTech

Committer:
fdalforno
Date:
Fri Dec 02 16:40:05 2016 +0000
Revision:
7:0b0835299ee8
Parent:
6:f0b6fea36e28
Mdot serial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfiore 0:09250cd371d2 1 #include "mbed.h"
mfiore 0:09250cd371d2 2 #include "mDot.h"
mfiore 4:36e214ebfa56 3 #include "MTSLog.h"
mfiore 0:09250cd371d2 4 #include <string>
mfiore 0:09250cd371d2 5 #include <vector>
mfiore 4:36e214ebfa56 6 #include <algorithm>
mfiore 0:09250cd371d2 7
mfiore 0:09250cd371d2 8
mfiore 0:09250cd371d2 9
fdalforno 7:0b0835299ee8 10
fdalforno 7:0b0835299ee8 11 Serial pc(USBTX, USBRX);
fdalforno 7:0b0835299ee8 12 Serial uart(PA_2, PA_3);
fdalforno 7:0b0835299ee8 13
fdalforno 7:0b0835299ee8 14 int main() {
fdalforno 7:0b0835299ee8 15 while(1) {
fdalforno 7:0b0835299ee8 16 if(pc.readable()) {
fdalforno 7:0b0835299ee8 17 uart.putc(pc.getc());
fdalforno 7:0b0835299ee8 18 }
fdalforno 7:0b0835299ee8 19 if(uart.readable()) {
fdalforno 7:0b0835299ee8 20 pc.putc(uart.getc());
fdalforno 7:0b0835299ee8 21 }
mfiore 0:09250cd371d2 22 }
fdalforno 7:0b0835299ee8 23 }