Commit 4c0f664b authored by Damien George's avatar Damien George

stm32/flash: Remove unused src parameter from flash_erase().

parent edb600b6
......@@ -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;
......
......@@ -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
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment