* Remove a line of useless or-ing the same values on the variable.

* Try setting FTDI line state (I think)...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39761 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2010-12-08 00:29:12 +00:00
parent 91bcf08ee5
commit 503233ca7d

View File

@ -184,7 +184,6 @@ FTDIDevice::SetControlLineState(uint16 state)
int32 control;
control = (state & CLS_LINE_RTS) ? FTDI_SIO_SET_RTS_HIGH : FTDI_SIO_SET_RTS_LOW;
control |= (state & CLS_LINE_DTR) ? FTDI_SIO_SET_DTR_HIGH : FTDI_SIO_SET_DTR_LOW;
size_t length = 0;
status_t status = gUSBModule->send_request(Device(),
@ -195,6 +194,15 @@ FTDIDevice::SetControlLineState(uint16 state)
if (status != B_OK)
TRACE_ALWAYS("= FTDIDevice::SetControlLineState(): control set request failed: 0x%08x\n", status);
control = (state & CLS_LINE_DTR) ? FTDI_SIO_SET_DTR_HIGH : FTDI_SIO_SET_DTR_LOW;
status = gUSBModule->send_request(Device(),
USB_REQTYPE_VENDOR | USB_REQTYPE_DEVICE_OUT,
FTDI_SIO_MODEM_CTRL, control,
FTDI_PIT_DEFAULT, 0, NULL, &length);
if (status != B_OK)
TRACE_ALWAYS("= FTDIDevice::SetControlLineState(): control set request failed: 0x%08x\n", status);
TRACE_FUNCRET("< FTDIDevice::SetControlLineState() returns: 0x%08x\n", status);
return status;
}