dfu: boot: Add implementation for multi-image swap type check

Adds multi-image implementations for checking swap type based on image
index.

Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
This commit is contained in:
Sigvart Hovland 2021-08-19 01:01:24 +02:00 committed by Anas Nashif
commit bcbc53015d
2 changed files with 16 additions and 0 deletions

View file

@ -204,6 +204,17 @@ int boot_write_img_confirmed_multi(int image_index);
*/
int mcuboot_swap_type(void);
/**
* @brief Determines the action, if any, that mcuboot will take on the next
* reboot.
*
* @param image_index Image pair index.
*
* @return a BOOT_SWAP_TYPE_[...] constant on success, negative errno code on
* fail.
*/
int mcuboot_swap_type_multi(int image_index);
/** Boot upgrade request modes */
#define BOOT_UPGRADE_TEST 0