mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-07 16:06:10 +00:00
use correct control index for composite CDC devices with non-consecutive interface IDs (#477)
This commit is contained in:
parent
fd551970be
commit
083b9ae7fe
@ -150,7 +150,7 @@ public class CdcAcmSerialDriver implements UsbSerialDriver {
|
|||||||
UsbInterface usbInterface = mDevice.getInterface(i);
|
UsbInterface usbInterface = mDevice.getInterface(i);
|
||||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_COMM) {
|
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_COMM) {
|
||||||
if(controlInterfaceCount == mPortNumber) {
|
if(controlInterfaceCount == mPortNumber) {
|
||||||
mControlIndex = i;
|
mControlIndex = usbInterface.getId();
|
||||||
mControlInterface = usbInterface;
|
mControlInterface = usbInterface;
|
||||||
}
|
}
|
||||||
controlInterfaceCount++;
|
controlInterfaceCount++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user