Commit 3cbfd5a4 authored by rswindell's avatar rswindell
Browse files

Add comGet/SetTxFlowControl functions for Win32.

Need *nix implementations now.
parent 28bbd00e
......@@ -117,6 +117,8 @@ COMIOEXPORT COM_HANDLE COMIOCALL comOpen(const char* device);
COMIOEXPORT BOOL COMIOCALL comClose(COM_HANDLE);
COMIOEXPORT long COMIOCALL comGetBaudRate(COM_HANDLE);
COMIOEXPORT BOOL COMIOCALL comSetBaudRate(COM_HANDLE, ulong rate);
COMIOEXPORT BOOL COMIOCALL comGetTxFlowControl(COM_HANDLE);
COMIOEXPORT BOOL COMIOCALL comSetTxFlowControl(COM_HANDLE, BOOL enable);
COMIOEXPORT int COMIOCALL comGetModemStatus(COM_HANDLE);
COMIOEXPORT int COMIOCALL comRaiseDTR(COM_HANDLE);
COMIOEXPORT int COMIOCALL comLowerDTR(COM_HANDLE);
......
......@@ -112,6 +112,28 @@ BOOL COMIOCALL comSetBaudRate(COM_HANDLE handle, unsigned long rate)
return SetCommState(handle, &dcb);
}
BOOL COMIOCALL comGetTxFlowControl(COM_HANDLE handle)
{
DCB dcb;
if(GetCommState(handle, &dcb) != TRUE)
return COM_ERROR;
return dcb.fOutxCtsFlow;
}
BOOL COMIOCALL comSetTxFlowControl(COM_HANDLE handle, BOOL enable)
{
DCB dcb;
if(GetCommState(handle, &dcb) != TRUE)
return FALSE;
dcb.fOutxCtsFlow = enable;
return SetCommState(handle, &dcb);
}
int COMIOCALL comGetModemStatus(COM_HANDLE handle)
{
DWORD status=0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment