Microchip® Advanced Software Framework

m2m_ota.c File Reference

WINC3400 IoT OTA Interface.

Copyright (c) 2017-2021 Microchip Technology Inc. and its subsidiaries.

Functions

NMI_API sint8 m2m_ota_abort (void)
 Request OTA Abort. More...
 
static void m2m_ota_cb (uint8 u8OpCode, uint16 u16DataSize, uint32 u32Addr)
 Internal OTA call back function. More...
 
NMI_API sint8 m2m_ota_init (tpfOtaUpdateCb pfOtaUpdateCb, tpfOtaNotifCb pfOtaNotifCb)
 Initialize the OTA layer. More...
 
NMI_API sint8 m2m_ota_notif_check_for_update (void)
 Check for OTA update. More...
 
NMI_API sint8 m2m_ota_notif_sched (uint32 u32Period)
 Schedule OTA update. More...
 
NMI_API sint8 m2m_ota_notif_set_url (uint8 *u8Url)
 Set the OTA url. More...
 
NMI_API sint8 m2m_ota_rollback (void)
 Request OTA Rollback image. More...
 
NMI_API sint8 m2m_ota_start_update (unsigned char *pcDownloadUrl)
 Request OTA start update using the downloaded URL. More...
 
NMI_API sint8 m2m_ota_switch_firmware (void)
 Switch to the upgraded Firmware. More...
 

Variables

static tpfOtaNotifCb gpfOtaNotifCb = NULL
 
static tpfOtaUpdateCb gpfOtaUpdateCb = NULL
 

m2m_ota_cb ( uint8  u8OpCode,
uint16  u16DataSize,
uint32  u32Addr 
)
static

Internal OTA call back function.

Parameters
[in]u8OpCodeHIF Opcode type.
[in]u16DataSizeHIF data length.
[in]u32AddrHIF address.

References gpfOtaNotifCb, gpfOtaUpdateCb, hif_receive(), M2M_ERR, m2m_memset(), M2M_OTA_RESP_NOTIF_UPDATE_INFO, M2M_OTA_RESP_UPDATE_STATUS, M2M_SUCCESS, tstrOtaUpdateStatusResp::u8OtaUpdateStatus, and tstrOtaUpdateStatusResp::u8OtaUpdateStatusType.

Referenced by m2m_ota_init().

tpfOtaNotifCb gpfOtaNotifCb = NULL
static

Referenced by m2m_ota_cb(), and m2m_ota_init().

tpfOtaUpdateCb gpfOtaUpdateCb = NULL
static

Referenced by m2m_ota_cb(), and m2m_ota_init().