15#ifndef INFUSE_SDK_INCLUDE_INFUSE_PATCH_BINARY_H_
16#define INFUSE_SDK_INCLUDE_INFUSE_PATCH_BINARY_H_
20#include <zephyr/storage/flash_map.h>
21#include <zephyr/storage/stream_flash.h>
22#include <zephyr/toolchain.h>
37#define CPATCH_MAGIC_NUMBER 0xBA854092
111 struct stream_flash_ctx *output,
struct cpatch_header *header,
int cpatch_patch_start(const struct flash_area *input, const struct flash_area *patch, struct cpatch_header *header)
Validate patch file and input data region.
int cpatch_patch_apply(const struct flash_area *input, const struct flash_area *patch, struct stream_flash_ctx *output, struct cpatch_header *header, infuse_progress_cb_t progress_cb)
Create an output file by applying a patch file to an input file.
void(* cpatch_progress_cb_t)(size_t output_offset)
Patching output progress callback.
Definition patch.h:73
Common progress callback.
void(* infuse_progress_cb_t)(uint32_t progress, uint32_t total)
Common progress callback type definition.
Definition progress_cb.h:30
Expected values for various memory regions.
Definition patch.h:40
uint32_t crc
Definition patch.h:44
uint32_t length
Definition patch.h:42