From 5a5f262649992fe50bba0ac83386adb1f5a6f843 Mon Sep 17 00:00:00 2001 From: redoc <619675912@qq.com> Date: Wed, 18 Mar 2020 15:31:20 +0800 Subject: [PATCH] Update drv_flash_f1.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整stm32_flash_erase的返回值 --- bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c index 1325005d5c..45c082ab88 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f1.c @@ -231,6 +231,11 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size) } } + if (result != RT_EOK) + { + return result; + } + return size_bank1 + size_bank2; #else return stm32_flash_erase_bank(FLASH_BANK_1, addr, size);