nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches
aws_fota.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
10
11#ifndef AWS_FOTA_H__
12#define AWS_FOTA_H__
13
14#include <dfu/dfu_target.h>
15#include <zephyr/net/mqtt.h>
16
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
51
104
105#define AWS_FOTA_EVT_DL_COMPLETE_VAL 100
107 int progress; /* Download progress percent, 0-100 */
108};
109
119
120typedef void (*aws_fota_callback_t)(struct aws_fota_event *fota_evt);
121
133
143int aws_fota_mqtt_evt_handler(struct mqtt_client *const client, const struct mqtt_evt *evt);
144
153int aws_fota_get_job_id(uint8_t *const job_id_buf, size_t buf_size);
154
155#ifdef __cplusplus
156}
157#endif
158
162
163#endif /* AWS_FOTA_H__ */
void(* aws_fota_callback_t)(struct aws_fota_event *fota_evt)
Definition aws_fota.h:120
int aws_fota_get_job_id(uint8_t *const job_id_buf, size_t buf_size)
Get the null-terminated job id string.
int aws_fota_mqtt_evt_handler(struct mqtt_client *const client, const struct mqtt_evt *evt)
AWS Firmware over the air mqtt event handler.
int aws_fota_init(aws_fota_callback_t evt_handler)
Initialize the AWS Firmware Over the Air library.
aws_fota_evt_id
Definition aws_fota.h:27
@ AWS_FOTA_EVT_START
Definition aws_fota.h:29
@ AWS_FOTA_EVT_ERASE_DONE
Definition aws_fota.h:47
@ AWS_FOTA_EVT_ERASE_PENDING
Definition aws_fota.h:45
@ AWS_FOTA_EVT_DONE
Definition aws_fota.h:39
@ AWS_FOTA_EVT_ERROR
Definition aws_fota.h:43
@ AWS_FOTA_EVT_DL_PROGRESS
Definition aws_fota.h:49
aws_fota_error_cause
Cause of a failed FOTA job, reported with the AWS_FOTA_EVT_ERROR event.
Definition aws_fota.h:63
@ AWS_FOTA_ERROR_CAUSE_NO_ERROR
Definition aws_fota.h:65
@ AWS_FOTA_ERROR_CAUSE_JOB_UPDATE_FAILED
Definition aws_fota.h:100
@ AWS_FOTA_ERROR_CAUSE_INVALID_UPDATE
Definition aws_fota.h:73
@ AWS_FOTA_ERROR_CAUSE_INVALID_CONFIGURATION
Definition aws_fota.h:83
@ AWS_FOTA_ERROR_CAUSE_UNKNOWN
Definition aws_fota.h:102
@ AWS_FOTA_ERROR_CAUSE_INTERNAL
Definition aws_fota.h:77
@ AWS_FOTA_ERROR_CAUSE_DFU
Definition aws_fota.h:79
@ AWS_FOTA_ERROR_CAUSE_JOB_UPDATE_REJECTED
Definition aws_fota.h:98
@ AWS_FOTA_ERROR_CAUSE_DOWNLOAD_START_FAILED
Definition aws_fota.h:96
@ AWS_FOTA_ERROR_CAUSE_DOWNLOAD_FAILED
Definition aws_fota.h:71
@ AWS_FOTA_ERROR_CAUSE_PROTO_NOT_SUPPORTED
Definition aws_fota.h:81
@ AWS_FOTA_ERROR_CAUSE_TYPE_MISMATCH
Definition aws_fota.h:75
@ AWS_FOTA_ERROR_CAUSE_CONNECT_FAILED
Definition aws_fota.h:69
@ AWS_FOTA_ERROR_CAUSE_URL_TOO_LONG
Definition aws_fota.h:90
@ AWS_FOTA_ERROR_CAUSE_NO_SEC_TAG
Definition aws_fota.h:94
@ AWS_FOTA_ERROR_CAUSE_INVALID_JOB_DOCUMENT
Definition aws_fota.h:85
dfu_target_image_type
DFU image type.
Definition dfu_target.h:28
int progress
Definition aws_fota.h:107
Definition aws_fota.h:106
enum dfu_target_image_type image
Definition aws_fota.h:114
enum aws_fota_evt_id id
Definition aws_fota.h:111
enum aws_fota_error_cause cause
Definition aws_fota.h:116
struct aws_fota_event_dl dl
Definition aws_fota.h:113
Definition aws_fota.h:110