nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
dfu_target_custom.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
18#ifndef DFU_TARGET_CUSTOM_H__
19#define DFU_TARGET_CUSTOM_H__
20
21#include <dfu/dfu_target.h>
22#include <stddef.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
33bool dfu_target_custom_identify(const void *const buf);
34
43int dfu_target_custom_init(size_t file_size, int img_num, dfu_target_callback_t cb);
44
51int dfu_target_custom_offset_get(size_t *offset);
52
60int dfu_target_custom_write(const void *const buf, size_t len);
61
68int dfu_target_custom_done(bool successful);
69
77
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* DFU_TARGET_CUSTOM_H__*/
int dfu_target_custom_schedule_update(int img_num)
Schedule an update for the custom DFU target.
int dfu_target_custom_reset(void)
Release resources and erase the download area.
int dfu_target_custom_offset_get(size_t *offset)
Get the current write offset for the custom DFU target.
bool dfu_target_custom_identify(const void *const buf)
Check if the provided buffer contains a custom firmware image.
int dfu_target_custom_write(const void *const buf, size_t len)
Write data to the custom DFU target.
int dfu_target_custom_done(bool successful)
Release resources and finalize the custom DFU process if successful.
int dfu_target_custom_init(size_t file_size, int img_num, dfu_target_callback_t cb)
Initialize the custom DFU target.
void(* dfu_target_callback_t)(enum dfu_target_evt_id evt_id)
Definition dfu_target.h:58