8#ifndef ZEPHYR_INCLUDE_DFU_MCUBOOT_H_
9#define ZEPHYR_INCLUDE_DFU_MCUBOOT_H_
20#ifdef BOOT_SWAP_TYPE_NONE
21#if BOOT_SWAP_TYPE_NONE != 1
22#error "definition incompatible"
26#define BOOT_SWAP_TYPE_NONE 1
29#ifdef BOOT_SWAP_TYPE_TEST
30#if BOOT_SWAP_TYPE_TEST != 2
31#error "definition incompatible"
35#define BOOT_SWAP_TYPE_TEST 2
38#ifdef BOOT_SWAP_TYPE_PERM
39#if BOOT_SWAP_TYPE_PERM != 3
40#error "definition incompatible"
44#define BOOT_SWAP_TYPE_PERM 3
47#ifdef BOOT_SWAP_TYPE_REVERT
48#if BOOT_SWAP_TYPE_REVERT != 4
49#error "definition incompatible"
53#define BOOT_SWAP_TYPE_REVERT 4
56#ifdef BOOT_SWAP_TYPE_FAIL
57#if BOOT_SWAP_TYPE_FAIL != 5
58#error "definition incompatible"
62#define BOOT_SWAP_TYPE_FAIL 5
65#define BOOT_IMG_VER_STRLEN_MAX 25
68#define BOOT_MAX_ALIGN 8
70#define BOOT_MAGIC_SZ 16
73#define BOOT_TRAILER_IMG_STATUS_OFFS(bank_area) ((bank_area)->fa_size -\
220#define BOOT_UPGRADE_TEST 0
221#define BOOT_UPGRADE_PERMANENT 1
int boot_erase_img_bank(uint8_t area_id)
Erase the image Bank.
int mcuboot_swap_type_multi(int image_index)
Determines the action, if any, that mcuboot will take on the next reboot.
bool boot_is_img_confirmed(void)
Check if the currently running image is confirmed as OK.
int boot_read_bank_header(uint8_t area_id, struct mcuboot_img_header *header, size_t header_size)
Read the MCUboot image header information from an image bank.
int boot_write_img_confirmed(void)
Marks the currently running image as confirmed.
int mcuboot_swap_type(void)
Determines the action, if any, that mcuboot will take on the next reboot.
int boot_write_img_confirmed_multi(int image_index)
Marks the image with the given index in the primary slot as confirmed.
int boot_request_upgrade(int permanent)
Marks the image in slot 1 as pending. On the next reboot, the system will perform a boot of the slot ...
int boot_request_upgrade_multi(int image_index, int permanent)
Marks the image with the given index in the secondary slot as pending. On the next reboot,...
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
MCUboot image header representation for image version.
Definition: mcuboot.h:83
uint8_t minor
Definition: mcuboot.h:85
uint16_t revision
Definition: mcuboot.h:86
uint32_t build_num
Definition: mcuboot.h:87
uint8_t major
Definition: mcuboot.h:84