Delta / NNN50_WIFI_API

Dependents:   NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more

Embed: (wiki syntax)

« Back to documentation index

m2m_ota.c File Reference

m2m_ota.c File Reference

NMC1500 IoT OTA Interface. More...

Go to the source code of this file.

Functions

NMI_API sint8 m2m_ota_init (tpfOtaUpdateCb pfOtaUpdateCb, tpfOtaNotifCb pfOtaNotifCb)
 Initialize the OTA layer.
NMI_API sint8 m2m_ota_notif_set_url (uint8 *u8Url)
 Set the OTA url.
NMI_API sint8 m2m_ota_notif_check_for_update (void)
 check for ota update
NMI_API sint8 m2m_ota_notif_sched (uint32 u32Period)
 Schedule OTA update.
NMI_API sint8 m2m_ota_start_update (uint8 *u8DownloadUrl)
 Request OTA start update using the downloaded url.
NMI_API sint8 m2m_ota_start_update_crt (uint8 *u8DownloadUrl)
 Request OTA start for the Cortus app image.
NMI_API sint8 m2m_ota_rollback (void)
 Request OTA Rollback image.
NMI_API sint8 m2m_ota_rollback_crt (void)
 Request Cortus application OTA Rollback image.
NMI_API sint8 m2m_ota_abort (void)
 Request OTA Abort.
NMI_API sint8 m2m_ota_switch_firmware (void)
 Switch to the upgraded Firmware.
NMI_API sint8 m2m_ota_switch_crt (void)
 Switch to the upgraded cortus application.
NMI_API sint8 m2m_ota_get_firmware_version (tstrM2mRev *pstrRev)
 Get the OTA Firmware version.

Detailed Description

NMC1500 IoT OTA Interface.

Copyright (c) 2016-2017 Atmel Corporation. All rights reserved.

Definition in file m2m_ota.c.


Function Documentation

NMI_API sint8 m2m_ota_abort ( void   )

Request OTA Abort.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 298 of file m2m_ota.c.

NMI_API sint8 m2m_ota_get_firmware_version ( tstrM2mRev pstrRev )

Get the OTA Firmware version.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 349 of file m2m_ota.c.

NMI_API sint8 m2m_ota_init ( tpfOtaUpdateCb  pfOtaUpdateCb,
tpfOtaNotifCb  pfOtaNotifCb 
)

Initialize the OTA layer.

Parameters:
[in]pfOtaUpdateCbOTA Update callback function
[in]pfOtaNotifCbOTA notify callback function
Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 127 of file m2m_ota.c.

NMI_API sint8 m2m_ota_notif_check_for_update ( void   )

check for ota update

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 181 of file m2m_ota.c.

NMI_API sint8 m2m_ota_notif_sched ( uint32  u32Period )

Schedule OTA update.

Parameters:
[in]u32PeriodPeriod in days
Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 201 of file m2m_ota.c.

NMI_API sint8 m2m_ota_notif_set_url ( uint8 u8Url )

Set the OTA url.

Parameters:
[in]u8UrlThe url server address
Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 159 of file m2m_ota.c.

NMI_API sint8 m2m_ota_rollback ( void   )

Request OTA Rollback image.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 265 of file m2m_ota.c.

NMI_API sint8 m2m_ota_rollback_crt ( void   )

Request Cortus application OTA Rollback image.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 281 of file m2m_ota.c.

NMI_API sint8 m2m_ota_start_update ( uint8 u8DownloadUrl )

Request OTA start update using the downloaded url.

Parameters:
[in]u8DownloadUrlThe download firmware url, you get it from device info
Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 222 of file m2m_ota.c.

NMI_API sint8 m2m_ota_start_update_crt ( uint8 u8DownloadUrl )

Request OTA start for the Cortus app image.

Parameters:
[in]u8DownloadUrlThe cortus application image url.
Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 246 of file m2m_ota.c.

NMI_API sint8 m2m_ota_switch_crt ( void   )

Switch to the upgraded cortus application.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 332 of file m2m_ota.c.

NMI_API sint8 m2m_ota_switch_firmware ( void   )

Switch to the upgraded Firmware.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 316 of file m2m_ota.c.