From 4c0f664b1aaa7b4b3253060799113139f5dfd8cb Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 2 May 2018 13:11:56 +1000 Subject: [PATCH] stm32/flash: Remove unused src parameter from flash_erase(). --- ports/stm32/flash.c | 4 ++-- ports/stm32/flash.h | 2 +- ports/stm32/flashbdev.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/stm32/flash.c b/ports/stm32/flash.c index 214d10fdb0..bc5b3c60c2 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 d69f6e27f6..b9edf61061 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 4245dd1ec5..dc73223348 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; }