feat(core): web usb mini下增加对DTR/RTS控制的支持
This commit is contained in:
@@ -295,6 +295,15 @@ class USBMini extends Serial {
|
||||
|| (this.getDTR() === dtr && this.getRTS() === rts)) {
|
||||
return;
|
||||
}
|
||||
if (this.#ctrlInterfaceNumber_ !== -1) {
|
||||
await this.#device_.controlTransferOut({
|
||||
requestType: 'class',
|
||||
recipient: 'interface',
|
||||
request: 0x22,
|
||||
value: dtr | (rts << 1),
|
||||
index: this.#ctrlInterfaceNumber_
|
||||
});
|
||||
}
|
||||
await super.setDTRAndRTS(dtr, rts);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user