Contains OTA OS Functional Interface statuses, type definitions and structures to store interface routines. More...
Go to the source code of this file.
Data Structures | |
struct | OtaEventInterface_t |
struct | OtaTimerInterface_t |
OTA Retry Timer Interface. More... | |
struct | OtaMallocInterface_t |
OTA memory allocation interface. More... | |
struct | OtaOSInterface_t |
OTA OS Interface. More... | |
Typedefs | |
typedef struct OtaEventContext | OtaEventContext_t |
Type definition for Event Context. | |
typedef OtaOsStatus_t(* | OtaInitEvent_t) (OtaEventContext_t *pEventCtx) |
Initialize the OTA events. | |
typedef OtaOsStatus_t(* | OtaSendEvent_t) (OtaEventContext_t *pEventCtx, const void *pEventMsg, unsigned int timeout) |
Sends an OTA event. | |
typedef OtaOsStatus_t(* | OtaReceiveEvent_t) (OtaEventContext_t *pEventCtx, void *pEventMsg, uint32_t timeout) |
Receive an OTA event. | |
typedef OtaOsStatus_t(* | OtaDeinitEvent_t) (OtaEventContext_t *pEventCtx) |
Deinitialize the OTA Events mechanism. | |
typedef void(* | OtaTimerCallback_t) (OtaTimerId_t otaTimerId) |
Timer callback. | |
typedef OtaOsStatus_t(* | OtaStartTimer_t) (OtaTimerId_t otaTimerId, const char *const pTimerName, const uint32_t timeout, OtaTimerCallback_t callback) |
Start timer. | |
typedef OtaOsStatus_t(* | OtaStopTimer_t) (OtaTimerId_t otaTimerId) |
Stop timer. | |
typedef OtaOsStatus_t(* | OtaDeleteTimer_t) (OtaTimerId_t otaTimerId) |
Delete a timer. | |
typedef void *(* | OtaMalloc_t) (size_t size) |
Allocate memory. | |
typedef void(* | OtaFree_t) (void *ptr) |
Free memory. | |
Enumerations | |
enum | OtaTimerId_t { OtaRequestTimer = 0 , OtaSelfTestTimer , OtaNumOfTimers } |
Enumeration for tracking multiple timers. | |
enum | OtaOsStatus_t { OtaOsSuccess = 0 , OtaOsEventQueueCreateFailed = 0x80U , OtaOsEventQueueSendFailed , OtaOsEventQueueReceiveFailed , OtaOsEventQueueDeleteFailed , OtaOsTimerCreateFailed , OtaOsTimerStartFailed , OtaOsTimerRestartFailed , OtaOsTimerStopFailed , OtaOsTimerDeleteFailed } |
The OTA OS interface return status. More... | |
Contains OTA OS Functional Interface statuses, type definitions and structures to store interface routines.
typedef OtaOsStatus_t(* OtaInitEvent_t) (OtaEventContext_t *pEventCtx) |
Initialize the OTA events.
This function initializes the OTA events mechanism.
[pEventCtx] | Pointer to the OTA event context. |
typedef OtaOsStatus_t(* OtaSendEvent_t) (OtaEventContext_t *pEventCtx, const void *pEventMsg, unsigned int timeout) |
Sends an OTA event.
This function sends an event to OTA library event handler.
[pEventCtx] | Pointer to the OTA event context. |
[pEventMsg] | Event to be sent to the OTA handler. |
[timeout] | The maximum amount of time (msec) the task should block. |
typedef OtaOsStatus_t(* OtaReceiveEvent_t) (OtaEventContext_t *pEventCtx, void *pEventMsg, uint32_t timeout) |
Receive an OTA event.
This function receives next event from the pending OTA events.
[pEventCtx] | Pointer to the OTA event context. |
[pEventMsg] | Pointer to store message. |
[timeout] | The maximum amount of time (msec) the task should block. |
typedef OtaOsStatus_t(* OtaDeinitEvent_t) (OtaEventContext_t *pEventCtx) |
Deinitialize the OTA Events mechanism.
This function deinitialize the OTA events mechanism and frees any resources used.
[pEventCtx] | Pointer to the OTA event context. |
typedef void(* OtaTimerCallback_t) (OtaTimerId_t otaTimerId) |
Timer callback.
Type definition for timer callback.
[otaTimerId] | Timer ID of type otaTimerId_t |
typedef OtaOsStatus_t(* OtaStartTimer_t) (OtaTimerId_t otaTimerId, const char *const pTimerName, const uint32_t timeout, OtaTimerCallback_t callback) |
Start timer.
This function starts the timer or resets it if it has already started.
[otaTimerId] | Timer ID of type otaTimerId_t |
[pTimerName] | Timer name. |
[timeout] | Timeout for the timer in milliseconds. |
[callback] | Callback to be called when timer expires. |
typedef OtaOsStatus_t(* OtaStopTimer_t) (OtaTimerId_t otaTimerId) |
Stop timer.
This function stops the time.
[otaTimerId] | Timer ID of type otaTimerId_t |
typedef OtaOsStatus_t(* OtaDeleteTimer_t) (OtaTimerId_t otaTimerId) |
Delete a timer.
This function deletes a timer.
[otaTimerId] | Timer ID of type otaTimerId_t |
typedef void *(* OtaMalloc_t) (size_t size) |
Allocate memory.
This function allocates the requested memory and returns a pointer to it.
[size] | This is the size of the memory block, in bytes.. |
typedef void(* OtaFree_t) (void *ptr) |
Free memory.
This function deallocates the memory previously allocated by a call to allocation function of type OtaMalloc_t.
[ptr] | This is the pointer to a memory block previously allocated with function of type OtaMalloc_t. If a null pointer is passed as argument, no action occurs. |