File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,12 @@ jobs:
17
17
experimental :
18
18
- false
19
19
node_version :
20
- - 12
21
- - 14
22
20
- 16
21
+ - 22
23
22
steps :
24
23
- uses : actions/checkout@v2
25
24
- name : Setup node
26
- uses : actions/setup-node@v2
25
+ uses : actions/setup-node@v4
27
26
with :
28
27
registry-url : ' https://registry.npmjs.org'
29
28
node-version : ${{ matrix.node_version }}
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ const VENDOR_ID_QUALCOMM = 0x05c6;
5
5
const PRODUCT_ID_EDL_DEVICE = 0x9008 ;
6
6
7
7
class EdlDevice {
8
- constructor ( { serialNumber } ) {
8
+ constructor ( { serialNumber, usbVersion } ) {
9
9
this . serialNumber = serialNumber ;
10
10
this . id = this . _computeDeviceId ( ) ;
11
+ this . usbVersion = usbVersion ;
11
12
}
12
13
13
14
_computeDeviceId ( ) {
@@ -31,7 +32,7 @@ class EdlDevice {
31
32
try {
32
33
await dev . open ( ) ;
33
34
const serialNumber = dev . productName . replace ( / .* _ S N : / , '' ) ;
34
- return new EdlDevice ( { serialNumber } ) ;
35
+ return new EdlDevice ( { serialNumber, usbVersion : dev . usbVersion } ) ;
35
36
} finally {
36
37
dev . close ( ) ;
37
38
}
Original file line number Diff line number Diff line change @@ -224,6 +224,11 @@ class UsbDevice {
224
224
set quirks ( qs ) {
225
225
this . _quirks = qs ;
226
226
}
227
+
228
+ get usbVersion ( ) {
229
+ const version = this . _dev . deviceDescriptor . bcdUSB ;
230
+ return { major : version >> 8 , minor : ( version & 0xff ) >> 4 } ;
231
+ }
227
232
}
228
233
229
234
async function getUsbDevices ( filters ) {
You can’t perform that action at this time.
0 commit comments