Skip to content

Commit

Permalink
add flash erase button.
Browse files Browse the repository at this point in the history
  • Loading branch information
Repeerc committed Jun 30, 2022
1 parent 95da6e1 commit c8e9ce2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OSLoader/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,16 @@ void vMainThread(void *pvParameters) {
MTD_ErasePhyBlock(i);
}
portBoardReset();
}else if((key == KEY_F2) && key_press){
VMSuspend();
DisplayClean();
DisplayPutStr(0, 0, "Erase All Flash ...", 0, 255, 16);
vTaskDelay(pdMS_TO_TICKS(2000));
for (int i = 0; i < 1024; i++) {
MTD_ErasePhyBlock(i);
}
portBoardReset();

} else {
goto key_zero_loop_exit;
}
Expand Down

0 comments on commit c8e9ce2

Please sign in to comment.