nRF Connect SDK API 2.8.99
|
int dfu_target_init | ( | int | img_type, |
int | img_num, | ||
size_t | file_size, | ||
dfu_target_callback_t | cb ) |
#include <include/dfu/dfu_target.h>
Initialize the resources needed for the specific image type DFU target.
If a target update is in progress, and the same target is given as input, then calling the 'init()' function of that target is skipped.
To allow continuation of an aborted DFU procedure, call the 'dfu_target_offset_get' function after invoking this function.
[in] | img_type | Image type identifier. |
[in] | img_num | Image pair index. Value different than 0 are supported only for DFU_TARGET_IMAGE_TYPE_MCUBOOT image type currently. |
[in] | file_size | Size of the current file being downloaded. |
[in] | cb | Callback function in case the DFU operation requires additional procedures to be called. |