dfu: img_util: Convert FLASH_WRITE_BLOCK_SIZE to DT_

Use DT_FLASH_WRITE_BLOCK_SIZE prefixed defined instead of
FLASH_WRITE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-02-08 12:47:50 -06:00 committed by Kumar Gala
commit 67a7b43fc9

View file

@ -18,9 +18,9 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <dfu/flash_img.h> #include <dfu/flash_img.h>
#include <inttypes.h> #include <inttypes.h>
BUILD_ASSERT_MSG((CONFIG_IMG_BLOCK_BUF_SIZE % FLASH_WRITE_BLOCK_SIZE == 0), BUILD_ASSERT_MSG((CONFIG_IMG_BLOCK_BUF_SIZE % DT_FLASH_WRITE_BLOCK_SIZE == 0),
"CONFIG_IMG_BLOCK_BUF_SIZE is not a multiple of " "CONFIG_IMG_BLOCK_BUF_SIZE is not a multiple of "
"FLASH_WRITE_BLOCK_SIZE"); "DT_FLASH_WRITE_BLOCK_SIZE");
static bool flash_verify(const struct flash_area *fa, off_t offset, static bool flash_verify(const struct flash_area *fa, off_t offset,
u8_t *data, size_t len) u8_t *data, size_t len)