A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.
Dependencies: mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed
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 Tue Jul 12 2022 21:35:27 by 1.7.2