Add send-kboot-reset.js and add the new USB command ID to uhk.js

This commit is contained in:
László Monda
2017-10-22 02:13:08 +02:00
parent ce91d88448
commit 1a0fa5b5ba
2 changed files with 8 additions and 0 deletions

View 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());

View File

@@ -64,6 +64,7 @@ exports = module.exports = moduleExports = {
getKeyboardState: 16,
readDebugInfo: 17,
jumpToSlaveBootloader: 18,
sendKbootCommand: 19,
},
enumerationModes: {
bootloader: 0,