Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Commit 336b378

Browse files
committed
Minor cleanup, typos in comments
1 parent e3014bf commit 336b378

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

src/usb-cdc-acm.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -200,21 +200,18 @@ class UsbCdcAcm extends Duplex {
200200
this.out.transfer(data, callback);
201201
}
202202

203-
204203
_final() {
205204
debug('_final');
206205
}
207206

208207
// _writev(){}
209208

210209
_destroy(){
211-
debug('_destroy');
212-
// this._stopPolling();
213-
210+
debug('_destroy');
214211

215-
// Close all resources, waiting for everything,
216-
// reattach kernel drivers if they were attached before,
217-
// then emit a 'close' event.
212+
// Set line state as unused, close all resources, release interfaces
213+
// (waiting until they are released), reattach kernel drivers if they
214+
// were attached before, then emit a 'close' event.
218215

219216
this._controlLineState(false)
220217
.then(()=>{
@@ -244,16 +241,6 @@ class UsbCdcAcm extends Duplex {
244241
});
245242
});
246243

247-
// util.promisify(this.ctr.removeAllListeners.bind(this))()
248-
// .then(util.promisify(this.in.removeAllListeners.bind(this)))
249-
// .then(util.promisify(this.out.removeAllListeners.bind(this)))
250-
// .then(util.promisify(this.ifaceCdc.release.bind(this)))
251-
// .then(util.promisify(this.ifaceData.release.bind(this)))
252-
// .then(()=>{
253-
// debug('All resources released');
254-
// this.emit('close');
255-
// });
256-
257244
}
258245

259246

@@ -280,7 +267,7 @@ class UsbCdcAcm extends Duplex {
280267
const data = new Buffer([
281268
0, 0, 0, 0, // Four bytes for the bitrate, will be filled in later.
282269
0, // Stop bits. 0 means "1 stop bit"
283-
0, // Parity. 0 meand "no parity
270+
0, // Parity. 0 means "no parity"
284271
8 // Number of data bits
285272
]);
286273

0 commit comments

Comments
 (0)