Merge pull request #270 from changwoo/ftdi-fix-usb-desc-endian

ftdi: Fix bcdDevice endian
pull/333/head
green-green-avk 2021-06-14 10:20:15 -07:00 zatwierdzone przez GitHub
commit f537d13ede
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -786,7 +786,7 @@ public class FTDISerialDevice extends UsbSerialDevice
private short getBcdDevice() {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
byte[] descriptors = connection.getRawDescriptors();
return (short) ((descriptors[12] << 8) + descriptors[13]);
return (short) ((descriptors[13] << 8) + descriptors[12]);
}else{
return -1;
}