stm32/flash: Remove commented-out flash functions.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2023-11-01 16:05:21 +11:00
parent 7002a19be2
commit cd0f75069c
2 changed files with 0 additions and 92 deletions

View File

@@ -159,25 +159,6 @@ static void flash_bdev_irq_handler(void) {
return;
}
// This code uses interrupts to erase the flash
/*
if (flash_erase_state == 0) {
flash_erase_it(flash_cache_sector_start, flash_cache_sector_size / 4);
flash_erase_state = 1;
return;
}
if (flash_erase_state == 1) {
// wait for erase
// TODO add timeout
#define flash_erase_done() (__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY) == RESET)
if (!flash_erase_done()) {
return;
}
flash_erase_state = 2;
}
*/
// This code erases the flash directly, waiting for it to finish
if (!(flash_flags & FLASH_FLAG_ERASED)) {
flash_erase(flash_cache_sector_start, flash_cache_sector_size / 4);