nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_cloud_fota_poll_process()

int nrf_cloud_fota_poll_process ( struct nrf_cloud_fota_poll_ctx ctx)

#include <include/net/nrf_cloud_fota_poll.h>

Perform the following FOTA tasks: Report the status of an in progress FOTA job. Check for a queued FOTA job. Execute FOTA job. Save status and request reboot.

The function will be blocking during an update image download if the error_fn callback is not provided. If the error_fn callback is provided, the function will be non-blocking and the user will receive error events asynchronously.

Parameters
[in]ctxPointer to context used for FOTA polling operations.
Return values
0Only applicable if in non-blocking mode. Indicates successful start of FOTA processing.
-EINVALInvalid ctx or module is not initialized.
-ENOTRECOVERABLEError performing FOTA action.
-EBUSYA reboot was requested but not performed by the application.
-EFAULTA FOTA job was not successful.
-ENOENTA FOTA job has finished and its status has been reported to the cloud.
-EAGAINNo FOTA job exists.