From 503233ca7dbe3de7534d4e2869614f9f0783785c Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 8 Dec 2010 00:29:12 +0000 Subject: [PATCH] * 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 --- src/add-ons/kernel/drivers/ports/usb_serial/FTDI.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/drivers/ports/usb_serial/FTDI.cpp b/src/add-ons/kernel/drivers/ports/usb_serial/FTDI.cpp index 165aa8a175..7d9476b3a7 100644 --- a/src/add-ons/kernel/drivers/ports/usb_serial/FTDI.cpp +++ b/src/add-ons/kernel/drivers/ports/usb_serial/FTDI.cpp @@ -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; }