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

◆ dfu_multi_image_init()

int dfu_multi_image_init ( uint8_t *  buffer,
size_t  buffer_size 
)

#include <include/dfu/dfu_multi_image.h>

Initialize DFU Multi Image library context.

Resets the internal state of the DFU Multi Image library and initializes necessary resources. In particular, the function removes all writers previously registered with the dfu_multi_image_register_writer function.

Parameters
[in]bufferBuffer to store DFU Multi Image header in case it spans multiple chunks of the package. The buffer is only needed until the header is parsed, so the same buffer can be provided to the dfu_target_mcuboot_set_buf function.
[in]buffer_sizeSize of the buffer to store DFU Multi Image header.
Returns
-EINVAL If the provided buffer is too small.
0 On success.