Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Common

Functions

NMI_API sint8 m2m_ota_abort (void)
 Request OTA Abort. More...
 
NMI_API sint8 m2m_ota_init (tpfOtaUpdateCb pfOtaUpdateCb, tpfOtaNotifCb pfOtaNotifCb)
 Initialize the OTA layer. More...
 

sint8 m2m_ota_abort ( void  )

Request OTA Abort.

Request the WINC to abort an OTA or Host File download in progress.
If no download is in progress, the API will respond with failure.

Returns
The function returns M2M_SUCCESS for success and a negative value otherwise.
See Also
m2m_ota_init m2m_ota_start_update
Returns
The function returns M2M_SUCCESS for a successful operation and a negative value otherwise.

References hif_send(), M2M_OTA_REQ_ABORT, M2M_REQ_GROUP_OTA, M2M_SUCCESS, and NULL.

sint8 m2m_ota_init ( tpfOtaUpdateCb  pfOtaUpdateCb,
tpfOtaNotifCb  pfOtaNotifCb 
)

Initialize the OTA layer.

Synchronous initialization function for the OTA layer by registering the update callback.
The notification callback is not supported at the current version. Calling this API is a MUST for all the OTA API's.

Parameters
[in]pfOtaUpdateCbOTA Update callback function.
[in]pfOtaNotifCbOTA Notify callback function.
Returns
The function returns M2M_SUCCESS for success and a negative value otherwise.
Parameters
[in]pfOtaUpdateCbOTA Update callback function.
[in]pfOtaNotifCbOTA Notify callback function.
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.

References gpfOtaNotifCb, gpfOtaUpdateCb, hif_register_cb(), hif_send(), M2M_ERR, m2m_ota_cb(), M2M_OTA_REQ_HOST_FILE_STATUS, M2M_REQ_GROUP_OTA, M2M_SUCCESS, and NULL.

Referenced by main().