nRF Connect SDK API 0.1.0
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
11#ifndef AWS_FOTA_H__
12#define AWS_FOTA_H__
13
14#include <dfu/dfu_target.h>
15#include <zephyr/net/mqtt.h>
16
23#ifdef __cplusplus
24extern "C" {
25#endif
26
48};
49
50#define AWS_FOTA_EVT_DL_COMPLETE_VAL 100
52 int progress; /* Download progress percent, 0-100 */
53};
54
57 union {
60 };
61};
62
63typedef void (*aws_fota_callback_t)(struct aws_fota_event *fota_evt);
64
76
86int aws_fota_mqtt_evt_handler(struct mqtt_client *const client, const struct mqtt_evt *evt);
87
96int aws_fota_get_job_id(uint8_t *const job_id_buf, size_t buf_size);
97
98#ifdef __cplusplus
99}
100#endif
101
106#endif /* AWS_FOTA_H__ */
void(* aws_fota_callback_t)(struct aws_fota_event *fota_evt)
Definition: aws_fota.h:63
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:45
@ AWS_FOTA_EVT_ERASE_PENDING
Definition: aws_fota.h:43
@ AWS_FOTA_EVT_DONE
Definition: aws_fota.h:39
@ AWS_FOTA_EVT_ERROR
Definition: aws_fota.h:41
@ AWS_FOTA_EVT_DL_PROGRESS
Definition: aws_fota.h:47
dfu_target_image_type
DFU image type.
Definition: dfu_target.h:28
int progress
Definition: aws_fota.h:52
Definition: aws_fota.h:51
enum dfu_target_image_type image
Definition: aws_fota.h:59
enum aws_fota_evt_id id
Definition: aws_fota.h:56
struct aws_fota_event_dl dl
Definition: aws_fota.h:58
Definition: aws_fota.h:55