We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 127d481 commit 311527eCopy full SHA for 311527e
packages/terminal/lib/index.js
@@ -20,6 +20,7 @@ program
20
.option('--parity <parity>', 'Parity default: none', 'none')
21
.option('--stopbits <bits>', 'Stop bits default: 1', makeNumber, 1)
22
.option('--no-echo', "Don't print characters as you type them.")
23
+ .option('--flow-ctl <mode>', "Enable flow control {XONOFF | RTSCTS}.")
24
.parse(process.argv)
25
26
const args = program.opts()
@@ -58,6 +59,9 @@ const createPort = path => {
58
59
dataBits: args.databits,
60
parity: args.parity,
61
stopBits: args.stopbits,
62
+ rtscts: args.flowCtl === 'CTSRTS',
63
+ xon: args.flowCtl === 'XONOFF',
64
+ xoff: args.flowCtl === 'XONOFF'
65
}
66
67
const port = new SerialPort(path, openOptions)
0 commit comments