提交 bc2ee999 编写于 作者: M MurphyZhao

[bsp][stm32] 移除 f0 和 f1 中 flash write 对 size 对齐的限制

Signed-off-by: NMurphyZhao <d2014zjt@163.com>
上级 25b49352
...@@ -84,12 +84,6 @@ int stm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size) ...@@ -84,12 +84,6 @@ int stm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size)
return -RT_EINVAL; return -RT_EINVAL;
} }
if (size % 4 != 0)
{
LOG_E("write size must be 4-byte alignment");
return -RT_EINVAL;
}
if ((end_addr) > STM32_FLASH_END_ADDRESS) if ((end_addr) > STM32_FLASH_END_ADDRESS)
{ {
LOG_E("write outrange flash size! addr is (0x%p)", (void *)(addr + size)); LOG_E("write outrange flash size! addr is (0x%p)", (void *)(addr + size));
......
...@@ -84,12 +84,6 @@ int stm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size) ...@@ -84,12 +84,6 @@ int stm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size)
return -RT_EINVAL; return -RT_EINVAL;
} }
if (size % 4 != 0)
{
LOG_E("write size must be 4-byte alignment");
return -RT_EINVAL;
}
if ((end_addr) > STM32_FLASH_END_ADDRESS) if ((end_addr) > STM32_FLASH_END_ADDRESS)
{ {
LOG_E("write outrange flash size! addr is (0x%p)", (void *)(addr + size)); LOG_E("write outrange flash size! addr is (0x%p)", (void *)(addr + size));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册