DFU: add init function with area id as parameter

This allows flash_img.c to be used outside of mcuboot scope.
Add new call to not break existing code.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
This commit is contained in:
Håkon Øye Amundsen 2020-03-03 14:18:28 +00:00 committed by Johan Hedberg
commit 64d8e65f33
3 changed files with 52 additions and 2 deletions

View file

@ -24,6 +24,16 @@ struct flash_img_context {
#endif
};
/**
* @brief Initialize context needed for writing the image to the flash.
*
* @param ctx context to be initialized
* @param area_id flash area id of partition where the image should be written
*
* @return 0 on success, negative errno code on fail
*/
int flash_img_init_id(struct flash_img_context *ctx, u8_t area_id);
/**
* @brief Initialize context needed for writing the image to the flash.
*