Skip to content

Commit

Permalink
protect flash memory
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed May 13, 2024
1 parent f4e23c1 commit 9dc7ec5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/protocols/webusbdfu.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class WEBUSBDFU_protocol {
self.clearStatus(function () {
self.upload_procedure(2);
});
/* // this snippet is to protect the flash memory (only for the brave)
// protect the flash memory
ob_data[1] = 0x0;
const writeOB = function() {
self.controlTransfer('out', self.request.DNLOAD, 2, 0, 0, ob_data, function () {
Expand All @@ -752,12 +752,12 @@ class WEBUSBDFU_protocol {
}
});
});
}
};
self.clearStatus(function () {
self.loadAddress(self.chipInfo.option_bytes.start_address, function () {
self.clearStatus(writeOB);
});
}); // */
});
} else {
console.log('Option bytes could not be read. Quite possibly read protected.');
self.clearStatus(unprotect);
Expand Down

0 comments on commit 9dc7ec5

Please sign in to comment.