diff --git a/packages/usb/erase-user-config.js b/packages/usb/erase-user-config.js new file mode 100755 index 00000000..fded4ad7 --- /dev/null +++ b/packages/usb/erase-user-config.js @@ -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); +})();