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

◆ dfu_target_stream_offset_get()

int dfu_target_stream_offset_get ( size_t *  offset)

#include <include/dfu/dfu_target_stream.h>

Get the offset within the payload of the next byte to download.

This is used to pick up an aborted download. If for instance 0x1000 bytes of the payload has been downloaded and stored to flash, this would return 0x1000. For this function to work across reboots, the option CONFIG_DFU_TARGET_STREAM_SAVE_PROGRESS must be set.

Parameters
[out]offsetReturns the offset of the firmware upgrade.
Returns
Non-negative value if success, otherwise negative value if unable to get the offset