diff options
Diffstat (limited to 'sercp.c')
-rw-r--r-- | sercp.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -693,8 +693,13 @@ int OpenUart() { sDCB.fAbortOnError = TRUE; sDCB.fOutxDsrFlow = FALSE; sDCB.fDtrControl = DTR_CONTROL_DISABLE; - sDCB.fRtsControl = RTS_CONTROL_HANDSHAKE; - sDCB.fOutxCtsFlow = TRUE; + if (is_flow_control_none) { + sDCB.fRtsControl = RTS_CONTROL_DISABLE; + sDCB.fOutxCtsFlow = FALSE; + } else { + sDCB.fRtsControl = RTS_CONTROL_HANDSHAKE; + sDCB.fOutxCtsFlow = TRUE; + } if (SetCommState(serial_fd, &sDCB) == 0) { return (-1); } |