14#ifndef DFU_TARGET_SMP_H__
15#define DFU_TARGET_SMP_H__
19#include <zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt_client.h>
int dfu_target_smp_init(size_t file_size, int img_num, dfu_target_callback_t cb)
Initialize DFU target, perform steps necessary to receive firmware.
int(* dfu_target_reset_cb_t)(void)
DFU target reset callback for activating MCUboot serial recovery mode.
Definition: dfu_target_smp.h:30
int dfu_target_smp_write(const void *const buf, size_t len)
Write firmware data.
int dfu_target_smp_reboot(void)
Reboot SMP target device, and apply new image.
int dfu_target_smp_schedule_update(int img_num)
Schedule update of image.
int dfu_target_smp_reset(void)
Release resources and erase the download area.
int dfu_target_smp_done(bool successful)
Deinitialize resources and finalize firmware upgrade if successful.
int dfu_target_smp_recovery_mode_enable(dfu_target_reset_cb_t cb)
Register recovery mode reset callback.
int dfu_target_smp_client_init(void)
Initialize dfu target SMP client.
int dfu_target_smp_image_list_get(struct mcumgr_image_state *res_buf)
Read image list.
int dfu_target_smp_offset_get(size_t *offset)
Get offset of firmware.
bool dfu_target_smp_identify(const void *const buf)
Check if data in buffer indicates MCUboot style upgrade.
int dfu_target_smp_confirm_image(void)
Confirm new image activation after reset command.
void(* dfu_target_callback_t)(enum dfu_target_evt_id evt_id)
Definition: dfu_target.h:58