Add send-kboot-reset.js and add the new USB command ID to uhk.js
This commit is contained in:
7
packages/usb/send-kboot-reset.js
Executable file
7
packages/usb/send-kboot-reset.js
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
const uhk = require('./uhk');
|
||||
|
||||
const device = uhk.getUhkDevice();
|
||||
let transfer = new Buffer([uhk.usbCommands.sendKbootCommand, 0x10]);
|
||||
device.write(uhk.getTransferData(transfer));
|
||||
const response = Buffer.from(device.readSync());
|
||||
@@ -64,6 +64,7 @@ exports = module.exports = moduleExports = {
|
||||
getKeyboardState: 16,
|
||||
readDebugInfo: 17,
|
||||
jumpToSlaveBootloader: 18,
|
||||
sendKbootCommand: 19,
|
||||
},
|
||||
enumerationModes: {
|
||||
bootloader: 0,
|
||||
|
||||
Reference in New Issue
Block a user