31#ifndef OTA_OS_INTERFACE_H
32#define OTA_OS_INTERFACE_H
79struct OtaEventContext;
100typedef enum OtaOsStatus
141 const void * pEventMsg,
142 unsigned int timeout );
204 const char *
const pTimerName,
205 const uint32_t timeout,
243typedef void * ( * OtaMalloc_t ) (
size_t size );
263typedef struct OtaEventInterface
276typedef struct OtaTimerInterface
291typedef struct OtaMallocInterface
307typedef struct OtaOSInterface
OtaOsStatus_t
The OTA OS interface return status.
Definition: ota_os_interface.h:101
@ OtaOsEventQueueSendFailed
Posting event message to the event queue failed.
Definition: ota_os_interface.h:104
@ OtaOsTimerDeleteFailed
Failed to delete the timer.
Definition: ota_os_interface.h:111
@ OtaOsTimerCreateFailed
Failed to create the timer.
Definition: ota_os_interface.h:107
@ OtaOsEventQueueReceiveFailed
Failed to receive from the event queue.
Definition: ota_os_interface.h:105
@ OtaOsTimerStopFailed
Failed to stop the timer.
Definition: ota_os_interface.h:110
@ OtaOsEventQueueCreateFailed
Failed to create the event queue.
Definition: ota_os_interface.h:103
@ OtaOsTimerRestartFailed
Failed to restart the timer.
Definition: ota_os_interface.h:109
@ OtaOsSuccess
OTA OS interface success.
Definition: ota_os_interface.h:102
@ OtaOsTimerStartFailed
Failed to create the timer.
Definition: ota_os_interface.h:108
@ OtaOsEventQueueDeleteFailed
Failed to delete the event queue.
Definition: ota_os_interface.h:106
void(* OtaFree_t)(void *ptr)
Free memory.
Definition: ota_os_interface.h:257
OtaOsStatus_t(* OtaDeleteTimer_t)(OtaTimerId_t otaTimerId)
Delete a timer.
Definition: ota_os_interface.h:230
OtaOsStatus_t(* OtaStartTimer_t)(OtaTimerId_t otaTimerId, const char *const pTimerName, const uint32_t timeout, OtaTimerCallback_t callback)
Start timer.
Definition: ota_os_interface.h:203
struct OtaEventContext OtaEventContext_t
Type definition for Event Context.
Definition: ota_os_interface.h:84
void(* OtaTimerCallback_t)(OtaTimerId_t otaTimerId)
Timer callback.
Definition: ota_os_interface.h:185
void *(* OtaMalloc_t)(size_t size)
Allocate memory.
Definition: ota_os_interface.h:243
OtaOsStatus_t(* OtaDeinitEvent_t)(OtaEventContext_t *pEventCtx)
Deinitialize the OTA Events mechanism.
Definition: ota_os_interface.h:173
OtaOsStatus_t(* OtaSendEvent_t)(OtaEventContext_t *pEventCtx, const void *pEventMsg, unsigned int timeout)
Sends an OTA event.
Definition: ota_os_interface.h:140
OtaOsStatus_t(* OtaInitEvent_t)(OtaEventContext_t *pEventCtx)
Initialize the OTA events.
Definition: ota_os_interface.h:124
OtaOsStatus_t(* OtaReceiveEvent_t)(OtaEventContext_t *pEventCtx, void *pEventMsg, uint32_t timeout)
Receive an OTA event.
Definition: ota_os_interface.h:158
OtaOsStatus_t(* OtaStopTimer_t)(OtaTimerId_t otaTimerId)
Stop timer.
Definition: ota_os_interface.h:218
OtaTimerId_t
Enumeration for tracking multiple timers.
Definition: ota_os_interface.h:90
Definition: ota_os_interface.h:264
OtaSendEvent_t send
Send data.
Definition: ota_os_interface.h:266
OtaDeinitEvent_t deinit
Deinitialize event.
Definition: ota_os_interface.h:268
OtaEventContext_t * pEventContext
Event context to store event information.
Definition: ota_os_interface.h:269
OtaInitEvent_t init
Initialization event.
Definition: ota_os_interface.h:265
OtaReceiveEvent_t recv
Receive data.
Definition: ota_os_interface.h:267
OTA memory allocation interface.
Definition: ota_os_interface.h:292
OtaFree_t free
OTA memory deallocate interface.
Definition: ota_os_interface.h:300
OtaMalloc_t malloc
OTA memory allocate interface.
Definition: ota_os_interface.h:296
OTA OS Interface.
Definition: ota_os_interface.h:308
OtaMallocInterface_t mem
OTA memory interface.
Definition: ota_os_interface.h:311
OtaEventInterface_t event
OTA Event interface.
Definition: ota_os_interface.h:309
OtaTimerInterface_t timer
OTA Timer interface.
Definition: ota_os_interface.h:310
OTA Retry Timer Interface.
Definition: ota_os_interface.h:277
OtaStartTimer_t start
Timer start state.
Definition: ota_os_interface.h:278
OtaStopTimer_t stop
Timer stop state.
Definition: ota_os_interface.h:279