Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
helpers.h
Go to the documentation of this file.
1
9
10#ifndef INFUSE_SDK_INCLUDE_INFUSE_DFU_HELPERS_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_DFU_HELPERS_H_
12
13#include <stdlib.h>
14#include <stdbool.h>
15
16#include <zephyr/storage/flash_map.h>
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
29
39void infuse_dfu_write_erase_start(const struct flash_area *fa);
40
48void infuse_dfu_write_erase_finish(const struct flash_area *fa);
49
69int infuse_dfu_image_erase(const struct flash_area *fa, size_t image_len,
70 infuse_progress_cb_t progress_cb, bool mcuboot_trailer);
71
88int infuse_dfu_image_metadata_clear(const struct flash_area *fa, size_t image_end);
89
98
106
107#ifdef CONFIG_ZTEST
108
114int infuse_dfu_write_erase_call_count(void);
115
116#endif /* CONFIG_ZTEST */
117
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif /* INFUSE_SDK_INCLUDE_INFUSE_DFU_HELPERS_H_ */
int infuse_dfu_image_erase(const struct flash_area *fa, size_t image_len, infuse_progress_cb_t progress_cb, bool mcuboot_trailer)
Erase a flash area to be ready for a new image.
void infuse_dfu_write_erase_start(const struct flash_area *fa)
Prepare a flash area for write/erase.
int infuse_dfu_nrf91_modem_delta_prepare(void)
Prepare the nRF91 modem for a delta image upgrade.
int infuse_dfu_image_metadata_clear(const struct flash_area *fa, size_t image_end)
Clear stale MCUboot metadata around an image already present in a flash area.
void infuse_dfu_write_erase_finish(const struct flash_area *fa)
Finalise a flash area write/erase.
int infuse_dfu_nrf91_modem_delta_finish(void)
Finalise a nRF91 modem delta image upgrade.
void(* infuse_progress_cb_t)(uint32_t progress, uint32_t total)
Common progress callback type.
Definition progress_cb.h:32
Common progress callback.