15#ifndef DFU_TARGET_STREAM_H__
16#define DFU_TARGET_STREAM_H__
19#include <zephyr/storage/stream_flash.h>
55 stream_flash_callback_t
cb;
int dfu_target_stream_done(bool successful)
Release resources and finalize stream flash write if successful.
int dfu_target_stream_init(const struct dfu_target_stream_init *init)
Initialize dfu target.
struct stream_flash_ctx * dfu_target_stream_get_stream(void)
int dfu_target_stream_write(const uint8_t *buf, size_t len)
Write a chunk of firmware data.
int dfu_target_stream_offset_get(size_t *offset)
Get the offset within the payload of the next byte to download.
int dfu_target_stream_reset(void)
Release resources and erase the download area.
stream_flash_callback_t cb
Definition dfu_target_stream.h:55
const struct device * fdev
Definition dfu_target_stream.h:33
const char * id
Definition dfu_target_stream.h:30
size_t offset
Definition dfu_target_stream.h:44
size_t size
Definition dfu_target_stream.h:50
size_t len
Definition dfu_target_stream.h:41
uint8_t * buf
Definition dfu_target_stream.h:38
DFU target stream initialization structure.
Definition dfu_target_stream.h:28