mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-07 16:06:10 +00:00
Fixed modem status
Signed-off-by: kai-morich <mail@kai-morich.de>
This commit is contained in:
parent
21e96594d2
commit
6b32e25e9c
@ -286,7 +286,7 @@ public class FtdiSerialDriver implements UsbSerialDriver {
|
|||||||
|
|
||||||
public int getModemStatus() throws IOException {
|
public int getModemStatus() throws IOException {
|
||||||
byte[] data = new byte[2];
|
byte[] data = new byte[2];
|
||||||
int result = mConnection.controlTransfer(FTDI_DEVICE_IN_REQTYPE, SIO_GET_LATENCY_TIMER_REQUEST,
|
int result = mConnection.controlTransfer(FTDI_DEVICE_IN_REQTYPE, SIO_GET_MODEM_STATUS_REQUEST,
|
||||||
0, 0 /* index */, data, data.length, USB_WRITE_TIMEOUT_MILLIS);
|
0, 0 /* index */, data, data.length, USB_WRITE_TIMEOUT_MILLIS);
|
||||||
if (result != 2) {
|
if (result != 2) {
|
||||||
throw new IOException("Get modem statusfailed: result=" + result);
|
throw new IOException("Get modem statusfailed: result=" + result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user