nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ dfu_target_suit_init()

int dfu_target_suit_init ( size_t file_size,
int img_num,
dfu_target_callback_t cb )

#include <include/dfu/dfu_target_suit.h>

Initialize the DFU target for the specific image and perform the necessary steps to receive the firmware.

If you call this function, you must call dfu_target_suit_done() to finalize the firmware upgrade before initializing any other images.

Parameters
[in]file_sizeSize of the current file being downloaded.
[in]img_numImage index.
[in]cbCallback for signaling events(unused).
Returns
0 If successful.
-ENODEV errno code if the buffer has not been initialized.
-ENXIO errno code if the partition dedicated for provided image is not found.
-ENOMEM errno code if the buffer is not large enough.
-EFAULT errno code if flash device assigned to the image is not available on the device.
-EBUSY errno code if the any image is already initialized and stream flash is in use.
other negative errno code if the initialization failed.