Add erase-user-config.js

This commit is contained in:
László Monda
2018-05-19 21:53:41 +02:00
parent c553c7b63b
commit ea41661c65

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env node
const fs = require('fs');
const uhk = require('./uhk');
(async function() {
const device = uhk.getUhkDevice();
const buffer = new Buffer(Array(2**15-64).fill(0xff));
await uhk.writeConfig(device, buffer, false);
await uhk.launchEepromTransfer(device, uhk.eepromOperations.write, uhk.configBufferIds.stagingUserConfig);
})();