Dumb error fix

This commit is contained in:
devdl11
2022-04-27 19:56:37 +02:00
parent 35f09ed389
commit fd7bdc7345
2 changed files with 4 additions and 2 deletions

View File

@@ -37,6 +37,8 @@ void Boot::setMode(BootMode mode) {
} }
void Boot::busError() { void Boot::busError() {
// Ion::Device::Flash::DisableInternalProtection();
// Ion::Device::Flash::EraseSector(0);
if (config()->isBooting()) { if (config()->isBooting()) {
config()->slot()->boot(); config()->slot()->boot();
} }

View File

@@ -44,7 +44,7 @@ static void close_protection() {
} }
} }
static void enable_protection_at(int i) { static void disable_protection_at(int i) {
if (!FLASH.OPTCR()->getLOCK()) { if (!FLASH.OPTCR()->getLOCK()) {
switch (i) switch (i)
{ {
@@ -78,7 +78,7 @@ static void enable_protection_at(int i) {
} }
} }
static void disable_protection_at(int i) { static void enable_protection_at(int i) {
if (!FLASH.OPTCR()->getLOCK()) { if (!FLASH.OPTCR()->getLOCK()) {
switch (i) switch (i)
{ {