lora sensnode

Dependencies:   libmDot mbed-rtos mbed

Fork of mDot_LoRa_Sensornode by Adrian Mitevski

Committer:
socie123
Date:
Wed Aug 10 12:54:10 2016 +0000
Revision:
1:e67174cc4953
Parent:
0:f2815503561f
lora sensnode

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mitea1 0:f2815503561f 1 /**
mitea1 0:f2815503561f 2 * @file UARTTUNNEL.h
mitea1 0:f2815503561f 3 *
mitea1 0:f2815503561f 4 * @author Adrian
mitea1 0:f2815503561f 5 * @date 10.06.2016
mitea1 0:f2815503561f 6 *
mitea1 0:f2815503561f 7 */
mitea1 0:f2815503561f 8 #include "RawSerial.h"
mitea1 0:f2815503561f 9
mitea1 0:f2815503561f 10 #ifndef APP_UARTTUNNEL_H_
mitea1 0:f2815503561f 11 #define APP_UARTTUNNEL_H_
mitea1 0:f2815503561f 12
mitea1 0:f2815503561f 13 /**
mitea1 0:f2815503561f 14 * @class UART_Tunnel
mitea1 0:f2815503561f 15 * @brief Makes it possible to use the mDotDKs USB Connection as a COM-Port
mitea1 0:f2815503561f 16 * to communicate directly with a device thats connected to the
mitea1 0:f2815503561f 17 * STM32 Uart. Its main purpose is to control the uBlox via uCenter.
mitea1 0:f2815503561f 18 */
mitea1 0:f2815503561f 19 class UART_Tunnel {
mitea1 0:f2815503561f 20 public:
mitea1 0:f2815503561f 21 UART_Tunnel();
mitea1 0:f2815503561f 22 UART_Tunnel(mbed::RawSerial*,mbed::RawSerial*);
mitea1 0:f2815503561f 23 virtual ~UART_Tunnel();
mitea1 0:f2815503561f 24
mitea1 0:f2815503561f 25 private:
mitea1 0:f2815503561f 26 mbed::RawSerial* uartSerial;
mitea1 0:f2815503561f 27 mbed::RawSerial* usbSerial;
mitea1 0:f2815503561f 28
mitea1 0:f2815503561f 29 /**
mitea1 0:f2815503561f 30 * @brief forwards every received byte from the uart to the usb serial
mitea1 0:f2815503561f 31 */
mitea1 0:f2815503561f 32 void onUartRx();
mitea1 0:f2815503561f 33
mitea1 0:f2815503561f 34 /**
mitea1 0:f2815503561f 35 * @brief forwards every received byte from the usb serial to uart
mitea1 0:f2815503561f 36 */
mitea1 0:f2815503561f 37 void onUsbRx();
mitea1 0:f2815503561f 38 };
mitea1 0:f2815503561f 39
mitea1 0:f2815503561f 40 #endif /* APP_UARTTUNNEL_H_ */