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
Diff: io/MTSSerialFlowControl.h
- Revision:
- 77:d7b14688a704
- Parent:
- 51:d22d3d87391f
- Child:
- 78:ef3ee53cf5df
--- a/io/MTSSerialFlowControl.h Thu Dec 26 16:35:29 2013 +0000 +++ b/io/MTSSerialFlowControl.h Thu Dec 26 21:54:19 2013 +0000 @@ -4,7 +4,8 @@ #include "mbed.h" #include "MTSBufferedIO.h" -namespace mts { +namespace mts +{ /** This class derives from MTSBufferedIO and provides a buffered wrapper to the * standard mbed Serial class along with generic RTS/CTS HW flow control. Since it @@ -54,18 +55,19 @@ void format(int bits=8, SerialBase::Parity parity=mbed::SerialBase::None, int stop_bits=1); private: + void startSending(); // Used to process rts start signal + void stopSending(); // Used to process rts stop signal + void notifyStartSending(); // Used to set cts start signal + void notifyStopSending(); // Used to set cts stop signal InterruptIn* rts; // Used to monitor the RTS line DigitalOut* cts; // Used to control the CTS line Serial* serial; // Internal Mbed Serial object - bool clearToSend; // Flag determining if the CTS line is valid + volatile bool clearToSend; // Flag determining if the CTS line is valid int highThreshold; // High water mark for setting cts to stop int lowThreshold; // Low water mark for setting cts to start char* if_name; // Internal variable for interface name - void startSending(); // Used to process rts start signal - void stopSending(); // Used to process rts stop signal - void notifyStartSending(); // Used to set cts start signal - void notifyStopSending(); // Used to set cts stop signal + virtual void handleRead(); // Method for handling data to be read virtual void handleWrite(); // Method for handling data to be written