Skip to content

Commit

Permalink
FTDI: Fix baudrate setting on multiport devices
Browse files Browse the repository at this point in the history
Correction of felHR85#274
  • Loading branch information
alex authored and green-green-avk committed Jun 15, 2021
1 parent f537d13 commit f0dda66
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -883,12 +883,9 @@ private short[] encodedBaudRate(int baudRate){
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;
}
Expand Down

0 comments on commit f0dda66

Please sign in to comment.