feat: bootloader support for SPI NOR flash storage (#4549)

This commit is contained in:
richardclli
2024-07-03 10:49:10 +10:00
committed by GitHub
parent 99d0c673b4
commit 39a7fcc82a
23 changed files with 207 additions and 93 deletions
@@ -511,11 +511,11 @@ int bootloaderMain()
#if defined(SPI_FLASH)
} else if (state == ST_CLEAR_FLASH_CHECK) {
bootloaderDrawScreen(state, vpos);
if (event == EVT_KEY_REPT(KEY_DOWN) || event == EVT_KEY_FIRST(KEY_DOWN)) {
if (IS_NEXT_EVENT(event)) {
if (vpos < SEL_CLEAR_FLASH_STORAGE_MENU_LEN - 1) { vpos++; }
continue;
}
if (event == EVT_KEY_REPT(KEY_UP) || event == EVT_KEY_FIRST(KEY_UP)) {
if (IS_PREVIOUS_EVENT(event)) {
if (vpos > 0) { vpos--; }
continue;
}
@@ -531,8 +531,6 @@ int bootloaderMain()
} else if (state == ST_CLEAR_FLASH) {
bootloaderDrawScreen(state, 0);
lcdRefresh();
if(event != EVT_KEY_BREAK(KEY_ENTER))
continue;
sdDone();
spiFlashDiskEraseAll();
sdInit();