Skip to content

Commit 37eac8d

Browse files
committed
ftdi: Fix bcdDevice endian
1 parent 828809f commit 37eac8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usbserial/src/main/java/com/felhr/usbserial/FTDISerialDevice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ private int readSyncJelly(byte[] buffer, int timeout, long stopTime) {
786786
private short getBcdDevice() {
787787
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
788788
byte[] descriptors = connection.getRawDescriptors();
789-
return (short) ((descriptors[12] << 8) + descriptors[13]);
789+
return (short) ((descriptors[13] << 8) + descriptors[12]);
790790
}else{
791791
return -1;
792792
}

0 commit comments

Comments
 (0)