Add EEPROM stress testing scripts.

This commit is contained in:
László Monda
2017-08-07 03:02:21 +02:00
parent 941ff7053b
commit f6e67d0e73
7 changed files with 135 additions and 7 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env node
let uhk = require('./uhk');
let process = require('process');
uhk.silent = true;
let isHardwareConfig = process.argv[2] === 'h';
let configTypeString = isHardwareConfig ? 'hardware' : 'user';
uhk.sendUsbPacketsByCallback(() => {
return new Buffer([uhk.usbCommands.getProperty, isHardwareConfig ? uhk.systemPropertyIds.hardwareConfigSize : uhk.systemPropertyIds.userConfigSize]);
});
uhk.registerReceiveCallback((buffer) => {
configSize = buffer[1] + (buffer[2]<<8);
console.log(configSize);
process.exit(0);
});