1 /*
2  *  Copyright (c) 2022, Laird Connectivity
3  *
4  *  SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef H_MCUBOOT_STATUS_
8 #define H_MCUBOOT_STATUS_
9 
10 /* Enumeration representing the states that MCUboot can be in */
11 typedef enum
12 {
13 	MCUBOOT_STATUS_STARTUP = 0,
14 	MCUBOOT_STATUS_UPGRADING,
15 	MCUBOOT_STATUS_BOOTABLE_IMAGE_FOUND,
16 	MCUBOOT_STATUS_NO_BOOTABLE_IMAGE_FOUND,
17 	MCUBOOT_STATUS_BOOT_FAILED,
18 	MCUBOOT_STATUS_USB_DFU_WAITING,
19 	MCUBOOT_STATUS_USB_DFU_ENTERED,
20 	MCUBOOT_STATUS_USB_DFU_TIMED_OUT,
21 	MCUBOOT_STATUS_SERIAL_DFU_ENTERED,
22 } mcuboot_status_type_t;
23 
24 #if defined(CONFIG_MCUBOOT_ACTION_HOOKS)
25 extern void mcuboot_status_change(mcuboot_status_type_t status);
26 #else
27 #define mcuboot_status_change(_status) do {} while (0)
28 #endif
29 
30 #endif /* H_MCUBOOT_STATUS_ */
31