Skip to content

Commit

Permalink
coverage for PL2303 variants
Browse files Browse the repository at this point in the history
  • Loading branch information
kai-morich committed Aug 17, 2021
1 parent 1661535 commit 12095f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .idea/modules.xml

This file was deleted.

10 changes: 9 additions & 1 deletion usbSerialForAndroid/coverage.gradle
Expand Up @@ -32,7 +32,15 @@ android {
dimension 'device'
testInstrumentationRunnerArguments = ['test_device_driver': 'Ftdi', 'test_device_port': '1']
}
pl2302 {
pl2303 {
dimension 'device'
testInstrumentationRunnerArguments = ['test_device_driver': 'Prolific']
}
pl2303t {
dimension 'device'
testInstrumentationRunnerArguments = ['test_device_driver': 'Prolific']
}
pl2303g {
dimension 'device'
testInstrumentationRunnerArguments = ['test_device_driver': 'Prolific']
}
Expand Down
Expand Up @@ -359,7 +359,7 @@ public void prolificBaudRate() throws Exception {
doReadWrite(String.valueOf(baudRate + 1) + " + 1<<29", readWait);
}

// some PL2303... data sheets mention additional baud rates, others don't
// some PL2303... data sheets mention additional standard baud rates, others don't
// they do not work with my devices and linux driver also excludes them
baudRates = new int[]{110, 56000, 256000};
for(int baudRate : baudRates) {
Expand All @@ -373,7 +373,7 @@ public void prolificBaudRate() throws Exception {
// silent fallback to 9600 for unsupported baud rates
telnet.setParameters(9600, 8, 1, UsbSerialPort.PARITY_NONE);
usb.setParameters(baudRate + (1<<29), 8, 1, UsbSerialPort.PARITY_NONE);
doReadWrite(String.valueOf(baudRate ) + " + 1<<29", readWait);
doReadWrite(String.valueOf(baudRate) + " + 1<<29", readWait);
}
}

Expand Down

0 comments on commit 12095f6

Please sign in to comment.