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>
38#define CPATCH_MAGIC_NUMBER 0xBA854092
112 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:74
void(* infuse_progress_cb_t)(uint32_t progress, uint32_t total)
Common progress callback type.
Definition progress_cb.h:32
Common progress callback.
Expected values for various memory regions.
Definition patch.h:41
uint32_t crc
CRC32-IEEE of the memory region.
Definition patch.h:45
uint32_t length
Length of the memory region in bytes.
Definition patch.h:43