mynewt: Add flash_area_get_sector
Simple stub of flash_area_get_sector using system provided
flash_area_sector_from_off.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
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 258efb9..4d2cd8c 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
@@ -48,6 +48,12 @@
int flash_area_sector_from_off(off_t off, struct flash_sector *sector);
+static inline int flash_area_get_sector(const struct flash_area *fa, off_t off,
+ struct flash_sector *sector)
+{
+ return flash_area_sector_from_off(off, sector);
+}
+
static inline uint8_t flash_area_get_id(const struct flash_area *fa)
{
return fa->fa_id;