nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
dfu_target_mcuboot.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef DFU_TARGET_MCUBOOT_H__
15#define DFU_TARGET_MCUBOOT_H__
16
17#include <stddef.h>
18#include <dfu/dfu_target.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
29int dfu_target_mcuboot_set_buf(uint8_t *buf, size_t len);
30
36bool dfu_target_mcuboot_identify(const void *const buf);
37
47int dfu_target_mcuboot_init(size_t file_size, int img_num, dfu_target_callback_t cb);
48
57
66int dfu_target_mcuboot_write(const void *const buf, size_t len);
67
75int dfu_target_mcuboot_done(bool successful);
76
90
99
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* DFU_TARGET_MCUBOOT_H__ */
106
int dfu_target_mcuboot_set_buf(uint8_t *buf, size_t len)
Set buffer to use for flash write operations.
int dfu_target_mcuboot_offset_get(size_t *offset)
Get offset of firmware.
int dfu_target_mcuboot_init(size_t file_size, int img_num, dfu_target_callback_t cb)
Initialize dfu target, perform steps necessary to receive firmware.
int dfu_target_mcuboot_schedule_update(int img_num)
Schedule update of one or more images.
int dfu_target_mcuboot_write(const void *const buf, size_t len)
Write firmware data.
int dfu_target_mcuboot_done(bool successful)
Deinitialize resources and finalize firmware upgrade if successful.
int dfu_target_mcuboot_reset(void)
Release resources and erase the download area.
bool dfu_target_mcuboot_identify(const void *const buf)
See if data in buf indicates MCUBoot style upgrade.
void(* dfu_target_callback_t)(enum dfu_target_evt_id evt_id)
Definition dfu_target.h:58