nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
nrf_cloud_fota_poll.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NRF_CLOUD_FOTA_POLL_H_
8#define NRF_CLOUD_FOTA_POLL_H_
9
15#ifdef __cplusplus
16extern "C" {
17#endif
18
29
37
46 const char *const status_details);
47
49 /* Internal variables */
50 struct k_work_delayable timeout_work;
51 struct k_work_delayable cancel_work;
54 const char *device_id;
56
57 /* Public variables */
58
68 uint32_t fragment_size;
69
72
80
86};
87
99
111
138
148
151#ifdef __cplusplus
152}
153#endif
154
155#endif /* NRF_CLOUD_FOTA_POLL_H_ */
dfu_target_image_type
DFU image type.
Definition dfu_target.h:28
int nrf_cloud_fota_poll_init(struct nrf_cloud_fota_poll_ctx *ctx)
Initialize nRF Cloud FOTA polling assistance. Must be called before any other module functions.
nrf_cloud_fota_reboot_status
Definition nrf_cloud_fota_poll.h:23
@ FOTA_REBOOT_REQUIRED
Definition nrf_cloud_fota_poll.h:24
@ FOTA_REBOOT_SUCCESS
Definition nrf_cloud_fota_poll.h:25
@ FOTA_REBOOT_FAIL
Definition nrf_cloud_fota_poll.h:26
@ FOTA_REBOOT_SYS_ERROR
Definition nrf_cloud_fota_poll.h:27
void(* nrf_cloud_fota_poll_handler_t)(enum nrf_cloud_fota_status status, const char *const status_details)
Status event handler registered with the module to handle asynchronous status events from the module.
Definition nrf_cloud_fota_poll.h:45
int nrf_cloud_fota_poll_process_pending(struct nrf_cloud_fota_poll_ctx *ctx)
Process/validate a pending FOTA update job. This may initiate a reboot through the context's reboot f...
int nrf_cloud_fota_poll_process(struct nrf_cloud_fota_poll_ctx *ctx)
Perform the following FOTA tasks: Report the status of an in progress FOTA job. Check for a queued FO...
void(* fota_reboot_handler_t)(enum nrf_cloud_fota_reboot_status status)
Reboot event handler registered with the module to handle asynchronous reboot events from the module.
Definition nrf_cloud_fota_poll.h:36
int nrf_cloud_fota_poll_update_apply(struct nrf_cloud_fota_poll_ctx *ctx)
Apply downloaded image. For full modem FOTA this must be called after the network has been disconnect...
nrf_cloud_fota_status
FOTA status reported to nRF Cloud and notified in nrf_cloud_fota_poll_handler_t.
Definition nrf_cloud.h:276
fota_reboot_handler_t reboot_fn
Definition nrf_cloud_fota_poll.h:71
enum dfu_target_image_type img_type
Definition nrf_cloud_fota_poll.h:55
const char * device_id
Definition nrf_cloud_fota_poll.h:54
struct k_work_delayable timeout_work
Definition nrf_cloud_fota_poll.h:50
uint32_t fragment_size
Definition nrf_cloud_fota_poll.h:68
bool is_nonblocking
Definition nrf_cloud_fota_poll.h:52
void * smp_reset_cb
Definition nrf_cloud_fota_poll.h:85
struct k_work_delayable cancel_work
Definition nrf_cloud_fota_poll.h:51
bool full_modem_fota_supported
Definition nrf_cloud_fota_poll.h:53
nrf_cloud_fota_poll_handler_t status_fn
Definition nrf_cloud_fota_poll.h:79
Definition nrf_cloud_fota_poll.h:48