Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 8fc91d6

Browse files
authored
Add RTS signal on serial open, Add baudrates up to 2000000 (#1142)
* add buad rates up to 2M * add rts signal on serial open and buad rate change * add missing space in baud rate array
1 parent 9abbe72 commit 8fc91d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/serialmonitor/serialMonitor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class SerialMonitor implements vscode.Disposable {
2222
public static DEFAULT_BAUD_RATE: number = 115200;
2323

2424
public static listBaudRates(): number[] {
25-
return [300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400, 250000];
25+
return [300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400, 250000, 500000, 1000000, 2000000];
2626
}
2727

2828
public static getInstance(): SerialMonitor {

src/serialmonitor/serialportctrl.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class SerialPortCtrl {
7979
reject(err);
8080
} else {
8181
this._outputChannel.appendLine(`[Info] Opened the serial port - ${this._currentPort}`);
82-
this._currentSerialPort.set(["dtr=true"], (err) => {
82+
this._currentSerialPort.set(["dtr=true", "rts=true"], (err) => {
8383
if (err) {
8484
reject(err);
8585
}
@@ -169,7 +169,7 @@ export class SerialPortCtrl {
169169
if (err) {
170170
reject(err);
171171
} else {
172-
this._currentSerialPort.set(["dtr=true"], (err) => {
172+
this._currentSerialPort.set(["dtr=true", "rts=true"], (err) => {
173173
if (err) {
174174
reject(err);
175175
} else {

0 commit comments

Comments
 (0)