From 25b49352d51471f661fc29034f680b9eedc591a3 Mon Sep 17 00:00:00 2001 From: MurphyZhao Date: Fri, 18 Jan 2019 11:05:18 +0800 Subject: [PATCH] =?UTF-8?q?[bsp][stm32/libraries]=20=E4=BF=AE=E5=A4=8D=20d?= =?UTF-8?q?rv=5Fflash=5Fl4.c=20=E9=A9=B1=E5=8A=A8=E4=B8=AD=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=86=99=E5=85=A5=E9=9D=9E8=E5=AD=97=E8=8A=82?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E7=9A=84=E6=95=B0=E6=8D=AE=E7=9A=84=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MurphyZhao --- bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c index 6567db13f1..388791428d 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c @@ -140,12 +140,6 @@ int stm32_flash_write(rt_uint32_t addr, const uint8_t *buf, size_t size) return -RT_EINVAL; } - if(size % 8 != 0) - { - LOG_E("write size must be 8-byte alignment"); - return -RT_EINVAL; - } - HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR);