SRK Version of mDot LoRa_Sensormode_SRK
Dependencies: libmDot mbed-rtos mbed
Fork of mDot_LoRa_Sensornode by
UARTTunnel.h
00001 /** 00002 * @file UARTTUNNEL.h 00003 * 00004 * @author Adrian 00005 * @date 10.06.2016 00006 * 00007 */ 00008 #include "RawSerial.h" 00009 00010 #ifndef APP_UARTTUNNEL_H_ 00011 #define APP_UARTTUNNEL_H_ 00012 00013 /** 00014 * @class UART_Tunnel 00015 * @brief Makes it possible to use the mDotDKs USB Connection as a COM-Port 00016 * to communicate directly with a device thats connected to the 00017 * STM32 Uart. Its main purpose is to control the uBlox via uCenter. 00018 */ 00019 class UART_Tunnel { 00020 public: 00021 UART_Tunnel(); 00022 UART_Tunnel(mbed::RawSerial*,mbed::RawSerial*); 00023 virtual ~UART_Tunnel(); 00024 00025 private: 00026 mbed::RawSerial* uartSerial; 00027 mbed::RawSerial* usbSerial; 00028 00029 /** 00030 * @brief forwards every received byte from the uart to the usb serial 00031 */ 00032 void onUartRx(); 00033 00034 /** 00035 * @brief forwards every received byte from the usb serial to uart 00036 */ 00037 void onUsbRx(); 00038 }; 00039 00040 #endif /* APP_UARTTUNNEL_H_ */
Generated on Wed Jul 13 2022 09:23:48 by 1.7.2