kopia lustrzana https://github.com/mik3y/usb-serial-for-android
CDC: fix incorrect stop bits (thanks vovkab).
rodzic
beccfbb409
commit
22c4c9b280
|
@ -142,9 +142,9 @@ public class CdcAcmSerialDriver extends CommonUsbSerialDriver {
|
|||
public void setParameters(int baudRate, int dataBits, int stopBits, int parity) {
|
||||
byte stopBitsByte;
|
||||
switch (stopBits) {
|
||||
case STOPBITS_1: stopBitsByte = 1; break;
|
||||
case STOPBITS_1_5: stopBitsByte = 2; break;
|
||||
case STOPBITS_2: stopBitsByte = 3; break;
|
||||
case STOPBITS_1: stopBitsByte = 0; break;
|
||||
case STOPBITS_1_5: stopBitsByte = 1; break;
|
||||
case STOPBITS_2: stopBitsByte = 2; break;
|
||||
default: throw new IllegalArgumentException("Bad value for stopBits: " + stopBits);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue