Serial library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems

Dependents:   mDot_AT_firmware mtsas mtsas MTDOT-EVB-LinkCheck-AL ... more

Revision:
12:e12b79a4ab4f
Parent:
9:5b67a660292a
--- a/MTSSerial.h	Mon Mar 23 16:41:30 2015 -0500
+++ b/MTSSerial.h	Thu Mar 23 16:15:14 2017 -0500
@@ -31,6 +31,13 @@
     */
     ~MTSSerial();
 
+    /**
+     * Attach the internal serial object to provided pins
+     * @param TXD the transmit data pin on the desired mbed Serial interface.
+     * @param RXD the receive data pin on the desired mbed Serial interface.
+     */
+    void reattach(PinName TXD, PinName RXD);
+
     /** This method is used to the set the baud rate of the serial port.
     *
     * @param baudrate the baudrate in bps as an int. The default is 9600 bps.
@@ -46,8 +53,17 @@
     */
     void format(int bits=8, SerialBase::Parity parity=mbed::SerialBase::None, int stop_bits=1);
 
+    /** Generate a break condition on the serial line
+     */
+    void sendBreak();
+
 protected:
-    RawSerial serial; // Internal mbed Serial object
+    RawSerial* _serial; // Internal mbed Serial object
+    int _baudrate;
+    int _bits;
+    SerialBase::Parity _parity;
+    int _stop_bits;
+
 
 private:
     virtual void handleWrite(); // Method for handling data to be written