stm32/flash: Remove commented-out flash functions.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user