Skip to content

Commit

Permalink
dfu: mcuboot: Added defines for upgrade request modes
Browse files Browse the repository at this point in the history
Added defines for the two upgrade request modes of
boot_request_upgrade().

Signed-off-by: Dennis Wildmark <[email protected]>
  • Loading branch information
Dennis Wildmark authored and nashif committed May 21, 2019
1 parent 4f4b23b commit 5c29d0e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/dfu/mcuboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,19 @@ int boot_write_img_confirmed(void);
*/
int mcuboot_swap_type(void);


/** Boot upgrade request modes */
#define BOOT_UPGRADE_TEST 0
#define BOOT_UPGRADE_PERMANENT 1

/**
* @brief Marks the image in slot 1 as pending. On the next reboot, the system
* will perform a boot of the slot 1 image.
*
* @param permanent Whether the image should be used permanently or
* only tested once:
* 0=run image once, then confirm or revert.
* 1=run image forever.
* BOOT_UPGRADE_TEST=run image once, then confirm or revert.
* BOOT_UPGRADE_PERMANENT=run image forever.
* @return 0 on success, negative errno code on fail.
*/
int boot_request_upgrade(int permanent);
Expand Down

0 comments on commit 5c29d0e

Please sign in to comment.