From 9d77325243723ce8d674195bbd65a60ce07a1b94 Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Thu, 12 Dec 2024 14:04:06 +0100 Subject: [PATCH] mynewt: Add flash_sector_get_size Getter for sector size stored in flash_sector object. Signed-off-by: Dominik Ermel --- .../include/flash_map_backend/flash_map_backend.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boot/mynewt/flash_map_backend/include/flash_map_backend/flash_map_backend.h b/boot/mynewt/flash_map_backend/include/flash_map_backend/flash_map_backend.h index 368651019..5adea1a1a 100644 --- a/boot/mynewt/flash_map_backend/include/flash_map_backend/flash_map_backend.h +++ b/boot/mynewt/flash_map_backend/include/flash_map_backend/flash_map_backend.h @@ -83,4 +83,9 @@ static inline uint32_t flash_sector_get_off(const struct flash_sector *fs) return fs->fs_off; } +static inline uint32_t flash_sector_get_size(const struct flash_sector *fs) +{ + return fs->fs_size; +} + #endif /* __FLASH_MAP_BACKEND_H__ */