summaryrefslogtreecommitdiff
path: root/ports/stm32/flashbdev.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-11-01 16:05:21 +1100
committerDamien George <damien@micropython.org>2024-01-08 12:31:03 +1100
commitcd0f75069cf7488d5b26760c3c9a2f357df919f3 (patch)
treedf4fdf3c233e52146e5f8c891dc196619787a5fd /ports/stm32/flashbdev.c
parent7002a19be2bbc598b6dcdef4db2dd37e7e7753c5 (diff)
stm32/flash: Remove commented-out flash functions.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/flashbdev.c')
-rw-r--r--ports/stm32/flashbdev.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/ports/stm32/flashbdev.c b/ports/stm32/flashbdev.c
index bcff94b15..19edde210 100644
--- a/ports/stm32/flashbdev.c
+++ b/ports/stm32/flashbdev.c
@@ -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);