kopia lustrzana https://github.com/mik3y/usb-serial-for-android
use correct control index for composite CDC devices with non-consecutive interface IDs (#477)
rodzic
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++;
|
||||||
|
|
Ładowanie…
Reference in New Issue