mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
Serial - Support COM ports > 9. Set default baud rate to 115200.
Change-Id: I2ca955a6071090a47a47eab3e494d308a1019e52
This commit is contained in:
parent
55d95e9942
commit
47813ac881
2 changed files with 6 additions and 2 deletions
|
@ -86,7 +86,7 @@ public enum BaudRate {
|
|||
}
|
||||
|
||||
public static BaudRate getDefault() {
|
||||
return B9600;
|
||||
return B115200;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -179,7 +179,11 @@ public class SerialPort {
|
|||
* name for the serial device.
|
||||
*/
|
||||
public SerialPort(String portName) {
|
||||
this.portName = portName;
|
||||
if (System.getProperty("os.name").startsWith("Windows") && !portName.startsWith("\\\\.\\")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
this.portName = "\\\\.\\" + portName; //$NON-NLS-1$
|
||||
} else {
|
||||
this.portName = portName;
|
||||
}
|
||||
}
|
||||
|
||||
private native long open0(String portName, int baudRate, int byteSize, int parity, int stopBits) throws IOException;
|
||||
|
|
Loading…
Add table
Reference in a new issue