Only RTS_CONTROL_HANDSHAKE should set CRTSCTS.
This commit is contained in:
parent
2681c021da
commit
5355a7870b
|
@ -203,8 +203,8 @@ BOOL WINAPI COMM_BuildOldCommDCB(LPCSTR device, LPDCB lpdcb)
|
|||
lpdcb->fInX = FALSE;
|
||||
lpdcb->fOutX = FALSE;
|
||||
lpdcb->fOutxCtsFlow = TRUE;
|
||||
lpdcb->fOutxDsrFlow = TRUE;
|
||||
lpdcb->fDtrControl = DTR_CONTROL_HANDSHAKE;
|
||||
lpdcb->fOutxDsrFlow = FALSE;
|
||||
lpdcb->fDtrControl = DTR_CONTROL_ENABLE;
|
||||
lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE;
|
||||
} else {
|
||||
lpdcb->fInX = FALSE;
|
||||
|
@ -1061,7 +1061,7 @@ BOOL WINAPI SetCommState(
|
|||
}
|
||||
#ifdef CRTSCTS
|
||||
if ( lpdcb->fOutxCtsFlow ||
|
||||
lpdcb->fRtsControl == RTS_CONTROL_ENABLE
|
||||
lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE
|
||||
)
|
||||
{
|
||||
port.c_cflag |= CRTSCTS;
|
||||
|
@ -1069,7 +1069,7 @@ BOOL WINAPI SetCommState(
|
|||
}
|
||||
#endif
|
||||
|
||||
if (lpdcb->fDtrControl == DTR_CONTROL_ENABLE)
|
||||
if (lpdcb->fDtrControl == DTR_CONTROL_HANDSHAKE)
|
||||
{
|
||||
WARN("DSR/DTR flow control not supported\n");
|
||||
}
|
||||
|
@ -1250,17 +1250,17 @@ BOOL WINAPI GetCommState(
|
|||
|
||||
/* termios does not support DTR/DSR flow control */
|
||||
lpdcb->fOutxDsrFlow = 0;
|
||||
lpdcb->fDtrControl = DTR_CONTROL_DISABLE;
|
||||
lpdcb->fDtrControl = DTR_CONTROL_ENABLE;
|
||||
|
||||
#ifdef CRTSCTS
|
||||
|
||||
if (port.c_cflag & CRTSCTS) {
|
||||
lpdcb->fRtsControl = RTS_CONTROL_ENABLE;
|
||||
lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE;
|
||||
lpdcb->fOutxCtsFlow = 1;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
lpdcb->fRtsControl = RTS_CONTROL_DISABLE;
|
||||
lpdcb->fRtsControl = RTS_CONTROL_ENABLE;
|
||||
lpdcb->fOutxCtsFlow = 0;
|
||||
}
|
||||
if (port.c_iflag & IXON)
|
||||
|
@ -1291,12 +1291,11 @@ BOOL WINAPI GetCommState(
|
|||
(lpdcb->fOutX)?"IXOFF":"~IXOFF");
|
||||
#ifdef CRTSCTS
|
||||
if ( lpdcb->fOutxCtsFlow ||
|
||||
lpdcb->fDtrControl == DTR_CONTROL_ENABLE||
|
||||
lpdcb->fRtsControl == RTS_CONTROL_ENABLE
|
||||
lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE
|
||||
)
|
||||
TRACE("CRTSCTS\n");
|
||||
else
|
||||
|
||||
if (lpdcb->fDtrControl == DTR_CONTROL_DISABLE)
|
||||
TRACE("~CRTSCTS\n");
|
||||
|
||||
#endif
|
||||
|
|
|
@ -422,10 +422,9 @@ INT16 COMM16_DCBtoDCB16(LPDCB lpdcb, LPDCB16 lpdcb16)
|
|||
lpdcb16->fNull = 0;
|
||||
lpdcb16->fChEvt = 0;
|
||||
lpdcb16->fBinary = 1;
|
||||
lpdcb16->fDtrDisable = 0;
|
||||
|
||||
lpdcb16->fDtrflow = (lpdcb->fDtrControl==DTR_CONTROL_ENABLE);
|
||||
lpdcb16->fRtsflow = (lpdcb->fRtsControl==RTS_CONTROL_ENABLE);
|
||||
lpdcb16->fDtrflow = (lpdcb->fDtrControl==DTR_CONTROL_HANDSHAKE);
|
||||
lpdcb16->fRtsflow = (lpdcb->fRtsControl==RTS_CONTROL_HANDSHAKE);
|
||||
lpdcb16->fOutxCtsFlow = lpdcb->fOutxCtsFlow;
|
||||
lpdcb16->fOutxDsrFlow = lpdcb->fOutxDsrFlow;
|
||||
lpdcb16->fDtrDisable = (lpdcb->fDtrControl==DTR_CONTROL_DISABLE);
|
||||
|
@ -1096,7 +1095,7 @@ INT16 WINAPI ReadComm16(INT16 cid,LPSTR lpvBuf,INT16 cbRead)
|
|||
length += status;
|
||||
}
|
||||
|
||||
TRACE("%.*s\n", length, orgBuf);
|
||||
TRACE("%s\n", debugstr_an( orgBuf, length ));
|
||||
ptr->commerror = 0;
|
||||
return length;
|
||||
}
|
||||
|
@ -1121,7 +1120,7 @@ INT16 WINAPI WriteComm16(INT16 cid, LPSTR lpvBuf, INT16 cbWrite)
|
|||
return -1;
|
||||
}
|
||||
|
||||
TRACE("%.*s\n", cbWrite, lpvBuf );
|
||||
TRACE("%s\n", debugstr_an( lpvBuf, cbWrite ));
|
||||
|
||||
length = 0;
|
||||
while (length < cbWrite) {
|
||||
|
|
Loading…
Reference in New Issue