File tree 7 files changed +13
-14
lines changed
7 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 20
20
* SOFTWARE.
21
21
*/
22
22
23
- const USB = require ( 'webusb ' ) . USB ;
23
+ const WebUSB = require ( 'usb ' ) . WebUSB ;
24
24
const common = require ( './common' ) ;
25
25
const DAPjs = require ( '../../' ) ;
26
26
@@ -33,7 +33,7 @@ const devicesFound = async (devices) => {
33
33
return common . selectDevice ( devices ) ;
34
34
}
35
35
36
- const usb = new USB ( { devicesFound } ) ;
36
+ const usb = new WebUSB ( { devicesFound : devicesFound } ) ;
37
37
38
38
( async ( ) => {
39
39
try {
Original file line number Diff line number Diff line change 20
20
* SOFTWARE.
21
21
*/
22
22
23
- const USB = require ( 'webusb ' ) . USB ;
23
+ const WebUSB = require ( 'usb ' ) . WebUSB ;
24
24
const common = require ( './common' ) ;
25
25
const DAPjs = require ( '../../' ) ;
26
26
@@ -33,7 +33,7 @@ const devicesFound = async (devices) => {
33
33
return common . selectDevice ( devices ) ;
34
34
}
35
35
36
- const usb = new USB ( { devicesFound } ) ;
36
+ const usb = new WebUSB ( { devicesFound : devicesFound } ) ;
37
37
38
38
( async ( ) => {
39
39
try {
Original file line number Diff line number Diff line change 20
20
* SOFTWARE.
21
21
*/
22
22
23
- const USB = require ( 'webusb ' ) . USB ;
23
+ const WebUSB = require ( 'usb ' ) . WebUSB ;
24
24
const common = require ( './common' ) ;
25
25
const DAPjs = require ( '../../' ) ;
26
26
@@ -35,7 +35,7 @@ const devicesFound = async (devices) => {
35
35
return common . selectDevice ( devices ) ;
36
36
}
37
37
38
- const usb = new USB ( { devicesFound } ) ;
38
+ const usb = new WebUSB ( { devicesFound : devicesFound } ) ;
39
39
40
40
( async ( ) => {
41
41
try {
Original file line number Diff line number Diff line change 20
20
* SOFTWARE.
21
21
*/
22
22
23
- const USB = require ( 'webusb ' ) . USB ;
23
+ const WebUSB = require ( 'usb ' ) . WebUSB ;
24
24
const common = require ( './common' ) ;
25
25
const DAPjs = require ( '../../' ) ;
26
26
@@ -33,7 +33,7 @@ const devicesFound = async (devices) => {
33
33
return common . selectDevice ( devices ) ;
34
34
}
35
35
36
- const usb = new USB ( { devicesFound } ) ;
36
+ const usb = new WebUSB ( { devicesFound : devicesFound } ) ;
37
37
38
38
( async ( ) => {
39
39
try {
Original file line number Diff line number Diff line change 21
21
*/
22
22
23
23
import { stdin } from 'process' ;
24
- import { USB } from 'webusb ' ;
24
+ import { WebUSB } from 'usb ' ;
25
25
import { Registers } from './registers' ;
26
26
27
27
// Handle single character input from the user
@@ -74,7 +74,7 @@ const devicesFound = async (devices: USBDevice[]): Promise<USBDevice | undefined
74
74
return device ;
75
75
} ;
76
76
77
- const usb = new USB ( { devicesFound } ) ;
77
+ const usb = new WebUSB ( { devicesFound : devicesFound } ) ;
78
78
const registers = new Registers ( usb ) ;
79
79
80
80
( async ( ) => {
@@ -84,7 +84,7 @@ const registers = new Registers(usb);
84
84
console . log ( `R${ index } : ${ register } ` ) ;
85
85
} ) ;
86
86
} catch ( error ) {
87
- console . error ( error . message || error ) ;
87
+ console . error ( error ) ;
88
88
}
89
89
process . exit ( ) ;
90
90
} ) ( ) ;
Original file line number Diff line number Diff line change 12
12
"dapjs" : " next" ,
13
13
"tsify" : " ^4.0.1" ,
14
14
"typescript" : " ^3.4.5" ,
15
- "webusb " : " ^2.0.2 "
15
+ "usb " : " ^2.11.0 "
16
16
}
17
17
}
Original file line number Diff line number Diff line change 67
67
"tslib" : " ^2.6.2" ,
68
68
"typedoc" : " ^0.25.7" ,
69
69
"typescript" : " ^5.3.3" ,
70
- "usb" : " ^2.11.0" ,
71
- "webusb" : " ^2.2.0"
70
+ "usb" : " ^2.11.0"
72
71
}
73
72
}
You can’t perform that action at this time.
0 commit comments