#define ESP_BOOTLOADER_OFFSET CONFIG_BOOTLOADER_OFFSET_IN_FLASH /* Offset of bootloader image. Has matching value in bootloader KConfig.projbuild file. */
/// OTA_DATA states for checking operability of the app.
typedefenum{
ESP_OTA_IMG_NEW=0x0U,/*!< Monitor the first boot. In bootloader this state is changed to ESP_OTA_IMG_PENDING_VERIFY. */
ESP_OTA_IMG_PENDING_VERIFY=0x1U,/*!< First boot for this app was. If while the second boot this state is then it will be changed to ABORTED. */
ESP_OTA_IMG_VALID=0x2U,/*!< App was confirmed as workable. App can boot and work without limits. */
ESP_OTA_IMG_INVALID=0x3U,/*!< App was confirmed as non-workable. This app will not selected to boot at all. */
ESP_OTA_IMG_ABORTED=0x4U,/*!< App could not confirm the workable or non-workable. In bootloader IMG_PENDING_VERIFY state will be changed to IMG_ABORTED. This app will not selected to boot at all. */
ESP_OTA_IMG_UNDEFINED=0xFFFFFFFFU,/*!< Undefined. App can boot and work without limits. */
}esp_ota_img_states_t;
/* OTA selection structure (two copies in the OTA data partition.)
Sizeof32bytesisfriendlytoflashencryption*/
typedefstruct{
uint32_tota_seq;
uint8_tseq_label[20];
uint32_tota_state;
uint32_tcrc;/* CRC32 of ota_seq field only */
}esp_ota_select_entry_t;
typedefstruct{
uint32_toffset;
uint32_tsize;
}esp_partition_pos_t;
/* Structure which describes the layout of partition table entry.