From 5c29d0ef9cc41e1dec0962fd9b8ee4db3926267f Mon Sep 17 00:00:00 2001 From: Dennis Wildmark Date: Mon, 20 May 2019 15:04:00 +0200 Subject: [PATCH] dfu: mcuboot: Added defines for upgrade request modes Added defines for the two upgrade request modes of boot_request_upgrade(). Signed-off-by: Dennis Wildmark --- include/dfu/mcuboot.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/dfu/mcuboot.h b/include/dfu/mcuboot.h index a153d6fd9f1..0d0f00ba4b2 100644 --- a/include/dfu/mcuboot.h +++ b/include/dfu/mcuboot.h @@ -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);