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

Commit 7e5ed54

Browse files
committed
Cosmetic updates
1 parent c63c43f commit 7e5ed54

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/usb-cdc-acm.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@ import { Duplex } from 'stream';
33
import Debug from 'debug';
44
import usb from 'usb';
55
import splitDescriptors from './split-descriptors';
6-
// const Duplex = require('stream').Duplex;
7-
// const Debug = require('debug');
8-
// const usb = require('usb');
9-
// const util = require('util');
106

117
// Two debug levels: one for initialization/teardown messages, and one
128
// for logging all data being sent/recv around
139
const debugInfo = Debug('usb-cdc-acm:info');
1410
const debugData = Debug('usb-cdc-acm:data');
1511

16-
// const splitDescriptors = require('./split-descriptors');
17-
1812

1913
// Utility function.
2014
// Given an interface, assert that it looks like a CDC management interface
@@ -241,7 +235,7 @@ export default class UsbCdcAcm extends Duplex {
241235
0x22, // SET_CONTROL_LINE_STATE
242236
active ? 0x03 : 0x00, // 0x02 "Activate carrier" & 0x01 "DTE is present"
243237
this.ifaceCdc.id, // interface index
244-
Buffer.from([]) // No data expected back
238+
Buffer.from([]), // No data expected back
245239
);
246240
}
247241

@@ -266,7 +260,7 @@ export default class UsbCdcAcm extends Duplex {
266260
0x20, // SET_LINE_CODING
267261
0x00, // Always zero
268262
this.ifaceCdc.id, // interface index
269-
data
263+
data,
270264
);
271265
}
272266

@@ -324,7 +318,7 @@ export default class UsbCdcAcm extends Duplex {
324318
wValue,
325319
wIndex,
326320
dataOrLength,
327-
((err, data) => (err ? rej(err) : res(data)))
321+
((err, data) => (err ? rej(err) : res(data))),
328322
);
329323
});
330324
}

0 commit comments

Comments
 (0)