kopia lustrzana https://github.com/felHR85/UsbSerial
FTDI: Fix baudrate setting on multiport devices
Correction of https://github.com/felHR85/UsbSerial/pull/274pull/333/head
rodzic
f537d13ede
commit
f0dda6635c
|
@ -883,12 +883,9 @@ public class FTDISerialDevice extends UsbSerialDevice
|
|||
divisor |= (encodedFraction[frac] << 14) | fastClk;
|
||||
|
||||
ret[0] = (short) divisor; //loBits
|
||||
ret[1] = (short) (divisor >> 16); //hiBits
|
||||
|
||||
|
||||
if(hIndex) {
|
||||
ret[1] <<= 8;
|
||||
}
|
||||
ret[1] = hIndex ?
|
||||
(short) ((divisor >> 8) & 0xFF00 | (mInterface.getId() + 1))
|
||||
: (short) (divisor >> 16); //hiBits
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue