18#ifndef FOTA_DOWNLOAD_H_
19#define FOTA_DOWNLOAD_H_
21#include <zephyr/kernel.h>
22#include <zephyr/types.h>
152int fota_download(
const char *host,
const char *file,
const int *sec_tag_list,
153 uint8_t sec_tag_count, uint8_t pdn_id,
size_t fragment_size,
191 uint8_t sec_tag_count, uint8_t pdn_id,
size_t fragment_size);
215 uint8_t pdn_id,
size_t fragment_size);
241 int sec_tag, uint8_t pdn_id,
size_t fragment_size,
298 const size_t image_size);
dfu_target_image_type
DFU image type.
Definition: dfu_target.h:28
int fota_download_s0_active_get(bool *const s0_active)
Get the active bootloader (B1) slot, s0 or s1.
fota_download_evt_id
FOTA download event IDs.
Definition: fota_download.h:36
@ FOTA_DOWNLOAD_EVT_FINISHED
Definition: fota_download.h:41
@ FOTA_DOWNLOAD_EVT_ERASE_DONE
Definition: fota_download.h:59
@ FOTA_DOWNLOAD_EVT_PROGRESS
Definition: fota_download.h:38
@ FOTA_DOWNLOAD_EVT_ERASE_PENDING
Definition: fota_download.h:47
@ FOTA_DOWNLOAD_EVT_ERROR
Definition: fota_download.h:62
@ FOTA_DOWNLOAD_EVT_CANCELLED
Definition: fota_download.h:65
@ FOTA_DOWNLOAD_EVT_RESUME_OFFSET
Definition: fota_download.h:70
@ FOTA_DOWNLOAD_EVT_ERASE_TIMEOUT
Definition: fota_download.h:53
int fota_download_b1_file_parse(char *s0_s1_files)
Parse and modify the provided file path so that it points to the bootloader file that should be used ...
int fota_download_start_with_image_type(const char *host, const char *file, int sec_tag, uint8_t pdn_id, size_t fragment_size, const enum dfu_target_image_type expected_type)
Download the given file with the specified image type from the given host.
int fota_download_any(const char *host, const char *file, const int *sec_tag_list, uint8_t sec_tag_count, uint8_t pdn_id, size_t fragment_size)
Start downloading the given file of any image type from the given host.
int fota_download_external_start(const char *host, const char *file, const enum dfu_target_image_type expected_type, const size_t image_size)
Start a FOTA download using an external download client. Requires.
int fota_download_start(const char *host, const char *file, int sec_tag, uint8_t pdn_id, size_t fragment_size)
Start downloading the given file of any image type from the given host.
void(* fota_download_callback_t)(const struct fota_download_evt *evt)
FOTA download asynchronous callback function.
Definition: fota_download.h:115
int fota_download_target(void)
Get target image type.
fota_download_error_cause
FOTA download error cause values.
Definition: fota_download.h:76
@ FOTA_DOWNLOAD_ERROR_CAUSE_DOWNLOAD_FAILED
Definition: fota_download.h:84
@ FOTA_DOWNLOAD_ERROR_CAUSE_CONNECT_FAILED
Definition: fota_download.h:82
@ FOTA_DOWNLOAD_ERROR_CAUSE_INTERNAL
Definition: fota_download.h:90
@ FOTA_DOWNLOAD_ERROR_CAUSE_INVALID_UPDATE
Definition: fota_download.h:86
@ FOTA_DOWNLOAD_ERROR_CAUSE_TYPE_MISMATCH
Definition: fota_download.h:88
@ FOTA_DOWNLOAD_ERROR_CAUSE_NO_ERROR
Definition: fota_download.h:78
int fota_download_cancel(void)
Cancel FOTA image downloading.
int fota_download_init(fota_download_callback_t client_callback)
Initialize the firmware over-the-air download library.
int fota_download(const char *host, const char *file, const int *sec_tag_list, uint8_t sec_tag_count, uint8_t pdn_id, size_t fragment_size, const enum dfu_target_image_type expected_type)
Download the given file with the specified image type from the given host.
int fota_download_external_evt_handle(struct download_client_evt const *const evt)
Handle a download event from an external download client. Requires.
Download client event.
Definition: download_client.h:88
enum fota_download_evt_id id
Definition: fota_download.h:97
enum fota_download_error_cause cause
Definition: fota_download.h:101
size_t resume_offset
Definition: fota_download.h:105
int progress
Definition: fota_download.h:103
FOTA download event data.
Definition: fota_download.h:96