summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/flash.c4
-rw-r--r--ports/stm32/flash.h2
-rw-r--r--ports/stm32/flashbdev.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/ports/stm32/flash.c b/ports/stm32/flash.c
index 214d10fdb..bc5b3c60c 100644
--- a/ports/stm32/flash.c
+++ b/ports/stm32/flash.c
@@ -142,7 +142,7 @@ uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *si
return 0;
}
-void flash_erase(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32) {
+void flash_erase(uint32_t flash_dest, uint32_t num_word32) {
// check there is something to write
if (num_word32 == 0) {
return;
@@ -192,7 +192,7 @@ void flash_erase(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32)
/*
// erase the sector using an interrupt
-void flash_erase_it(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32) {
+void flash_erase_it(uint32_t flash_dest, uint32_t num_word32) {
// check there is something to write
if (num_word32 == 0) {
return;
diff --git a/ports/stm32/flash.h b/ports/stm32/flash.h
index d69f6e27f..b9edf6106 100644
--- a/ports/stm32/flash.h
+++ b/ports/stm32/flash.h
@@ -27,7 +27,7 @@
#define MICROPY_INCLUDED_STM32_FLASH_H
uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *size);
-void flash_erase(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);
+void flash_erase(uint32_t flash_dest, uint32_t num_word32);
void flash_write(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);
#endif // MICROPY_INCLUDED_STM32_FLASH_H
diff --git a/ports/stm32/flashbdev.c b/ports/stm32/flashbdev.c
index 4245dd1ec..dc7322334 100644
--- a/ports/stm32/flashbdev.c
+++ b/ports/stm32/flashbdev.c
@@ -205,7 +205,7 @@ static void flash_bdev_irq_handler(void) {
// This code uses interrupts to erase the flash
/*
if (flash_erase_state == 0) {
- flash_erase_it(flash_cache_sector_start, (const uint32_t*)CACHE_MEM_START_ADDR, flash_cache_sector_size / 4);
+ flash_erase_it(flash_cache_sector_start, flash_cache_sector_size / 4);
flash_erase_state = 1;
return;
}
@@ -223,7 +223,7 @@ static void flash_bdev_irq_handler(void) {
// This code erases the flash directly, waiting for it to finish
if (!(flash_flags & FLASH_FLAG_ERASED)) {
- flash_erase(flash_cache_sector_start, (const uint32_t*)CACHE_MEM_START_ADDR, flash_cache_sector_size / 4);
+ flash_erase(flash_cache_sector_start, flash_cache_sector_size / 4);
flash_flags |= FLASH_FLAG_ERASED;
return;
}