A library for talking to Multi-Tech's Cellular SocketModem Devices.

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

Revision:
0:563b70517320
Child:
10:2bd727a4b329
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/io/MTSSerial.h	Mon Dec 09 15:29:35 2013 +0000
@@ -0,0 +1,23 @@
+#ifndef MTSSERIAL_H
+#define MTSSERIAL_H
+
+#include "mbed.h"
+#include "MTSBufferedIO.h"
+
+class MTSSerial : public MTSBufferedIO
+{
+public:
+    MTSSerial(PinName TXD, PinName RXD, int txBufferSize = 64, int rxBufferSize = 64);
+    ~MTSSerial();
+    void baud(int baudrate);
+//    void format(int bits=8, Parity parity=SerialBase::None, int stop_bits=1);
+
+    virtual void handleRead(); // Overridden function to handle reading from the serial port
+    virtual void handleWrite(); // Overridden function to handle writing to the serial port
+
+private:
+    Serial* serial; // Internal mbed Serial object
+    int writeSize; // Amount of data to write based on buffer size
+};
+
+#endif /* MTSSERIAL_H */
\ No newline at end of file