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

pull/3502/merge
Damien George 2018-05-02 13:11:56 +10:00
rodzic edb600b6a2
commit 4c0f664b1a
3 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -142,7 +142,7 @@ uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *si
return 0; 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 // check there is something to write
if (num_word32 == 0) { if (num_word32 == 0) {
return; 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 // 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 // check there is something to write
if (num_word32 == 0) { if (num_word32 == 0) {
return; return;

Wyświetl plik

@ -27,7 +27,7 @@
#define MICROPY_INCLUDED_STM32_FLASH_H #define MICROPY_INCLUDED_STM32_FLASH_H
uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *size); 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); void flash_write(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);
#endif // MICROPY_INCLUDED_STM32_FLASH_H #endif // MICROPY_INCLUDED_STM32_FLASH_H

Wyświetl plik

@ -205,7 +205,7 @@ static void flash_bdev_irq_handler(void) {
// This code uses interrupts to erase the flash // This code uses interrupts to erase the flash
/* /*
if (flash_erase_state == 0) { 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; flash_erase_state = 1;
return; return;
} }
@ -223,7 +223,7 @@ static void flash_bdev_irq_handler(void) {
// This code erases the flash directly, waiting for it to finish // This code erases the flash directly, waiting for it to finish
if (!(flash_flags & FLASH_FLAG_ERASED)) { 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; flash_flags |= FLASH_FLAG_ERASED;
return; return;
} }