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
io/MTSSerialFlowControl.h
- Committer:
- mfiore
- Date:
- 2013-12-19
- Revision:
- 39:6e94520a3217
- Parent:
- 10:2bd727a4b329
- Child:
- 40:14342c4de476
File content as of revision 39:6e94520a3217:
#ifndef MTSSERIALFLOWCONTROL_H #define MTSSERIALFLOWCONTROL_H #include "mbed.h" #include "MTSBufferedIO.h" namespace mts { class MTSSerialFlowControl : public MTSBufferedIO { public: MTSSerialFlowControl(PinName TXD, PinName RXD, PinName RTS, PinName CTS, int txBufSize = 64, int rxBufSize = 64, char* name = ""); ~MTSSerialFlowControl(); void baud(int baudrate); void notifyStartSending(); void notifyStopSending(); private: InterruptIn* rts; DigitalOut* cts; Serial* serial; bool clearToSend; int highThreshold; int lowThreshold; char* if_name; void startSending(); void stopSending(); virtual void handleRead(); virtual void handleWrite(); }; } #endif /* MTSSERIALFLOWCONTROL */