未验证 提交 4b46aafa 编写于 作者: R redoc 提交者: GitHub

Update drv_flash_f1.c

1、【修改】返回值。
上级 5a5f2626
......@@ -219,6 +219,7 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size)
if(size_bank1 != stm32_flash_erase_bank(FLASH_BANK_1, addr_bank1, size_bank1))
{
result = -RT_ERROR;
goto __exit;
}
}
......@@ -228,10 +229,12 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size)
if(size_bank2 != stm32_flash_erase_bank(FLASH_BANK_2, addr_bank2, size_bank2))
{
result = -RT_ERROR;
goto __exit;
}
}
if (result != RT_EOK)
__exit:
if(result != RT_EOK)
{
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册