Files
agent/packages/usb/hidapi-sync-stress-test.js

13 lines
347 B
JavaScript
Executable File

#!/usr/bin/env node
const uhk = require('./uhk');
const device = uhk.getUhkDevice();
let counter = 1;
while (true) {
console.log(`hidapi sync test ${counter++}`);
const sendData = new Buffer([uhk.usbCommands.getDeviceProperty, uhk.devicePropertyIds.configSizes]);
device.write(uhk.getTransferData(sendData));
device.readSync()
}