Analog Devices Wi-Fi Software Reference Manual
Release 1.0.0
|
Non-RTOS Framework Functions. More...
Macros | |
#define | ADI_WIFI_INIT_CORE_INIT_RSP_TIME_MS (5000u) |
Functions | |
ADI_WIFI_RESULT | adi_wifi_Init (ADI_CALLBACK const pCallbackFunc, void *const pCBParam) |
Initialize Framework Layer. More... | |
ADI_WIFI_RESULT | adi_wifi_DispatchEvents (const uint32_t nTimeoutMilliSeconds) |
Event dispatcher. More... | |
ADI_WIFI_RESULT | adi_wifi_WaitForResponseWithTimeout (const uint32_t nTimeoutMilliSeconds, ADI_WIFI_AT_CMDCODE eCommandType) |
Wait for response with a timeout. More... | |
void | adi_wifi_NoosCallback (void *pCBParam, uint32_t Event, void *pArg) |
Wi-Fi no operating system layer callback. More... | |
void | adi_wifi_TimerCallback (void *pCBParam, uint32_t Event, void *pArg) |
Timer callback. More... | |
void | adi_wifi_PingTimerCallback (void *pCBParam, uint32_t Event, void *pArg) |
Ping Request Timer callback. More... | |
uint8_t | adi_wifi_IsEventPending (void) |
Check event pending. More... | |
void | adi_wifi_ClearEventPending (void) |
Clear event pending. More... | |
uint32_t | adi_wifi_IsHardwareErrorPending (void) |
Check hardware error pending. More... | |
void | adi_wifi_ClearHardwareErrorPending (void) |
Clear hardware error pending. More... | |
uint8_t | adi_wifi_IsTimerDone (uint8_t nIsPingTimer) |
Timer peek function. More... | |
ADI_WIFI_RESULT | adi_wifi_StartTimer (const uint32_t nMilliSeconds, uint8_t nIsPingTimer) |
Timer start. More... | |
ADI_WIFI_RESULT | adi_wifi_StopTimer (uint8_t nIsPingTimer) |
Timer stop. More... | |
Non-RTOS Framework Functions.
The set of functions in this module provide an application with a a simple interface for waiting for events from the radio with a timeout. This module is for applications in a non-RTOS operating environment. This layer uses a General Purpose Timer to implement timeouts, the user can configure the timeout in this file.
#define ADI_WIFI_INIT_CORE_INIT_RSP_TIME_MS (5000u) |
Timeout value for #WIFI_EVENT_DISPATCH in adi_wifi_Init, note that this is just an upper limit.
void adi_wifi_ClearEventPending | ( | void | ) |
Clear event pending.
Clear the event flag, should be done immediately after the application has finished reading the full packet from the radio.
void adi_wifi_ClearHardwareErrorPending | ( | void | ) |
Clear hardware error pending.
Clear the hardware error flag.
ADI_WIFI_RESULT adi_wifi_DispatchEvents | ( | const uint32_t | nTimeoutMilliSeconds | ) |
Event dispatcher.
Dispatch any events received for a fixed amount of time to the application callback. This function will block the caller for the specified amount of time, and pass events to the callback.
[in] | nTimeoutMilliSeconds | : The time to wait (ms) if no event occurs. |
ADI_WIFI_RESULT adi_wifi_Init | ( | ADI_CALLBACK const | pCallbackFunc, |
void *const | pCBParam | ||
) |
Initialize Framework Layer.
Initialize companion module and register callback.
[in] | pCallbackFunc | : Application callback function for Wi-Fi events. |
[in] | pCBParam | : Pointer to the application callback parameter. |
uint8_t adi_wifi_IsEventPending | ( | void | ) |
Check event pending.
Check if a the radio issued an event. If so, the application should call adi_wifi_GetEvent() to read it from the radio.
uint32_t adi_wifi_IsHardwareErrorPending | ( | void | ) |
Check hardware error pending.
Check if a the radio issued n hardware error.
uint8_t adi_wifi_IsTimerDone | ( | uint8_t | nIsPingTimer | ) |
Timer peek function.
Check if timeout occurred.
[in] | nIsPingTimer | : Parameter to differentiate which timer event to check. |
void adi_wifi_NoosCallback | ( | void * | pCBParam, |
uint32_t | Event, | ||
void * | pArg | ||
) |
Wi-Fi no operating system layer callback.
Callback function passed to radio module to be called when a ESP8266 event occurs.
[in] | pCBParam | : Callback parameter. (unused) |
[in] | Event | : Callback event. (unused) |
[in] | pArg | : Callback argument. (only used in the case of a hardware error) |
void adi_wifi_PingTimerCallback | ( | void * | pCBParam, |
uint32_t | Event, | ||
void * | pArg | ||
) |
Ping Request Timer callback.
Function that gets executed when a Ping request to MQTT broker timeout event occurs.
[in] | pCBParam | : Callback parameter. (unused) |
[in] | Event | : Callback event. (unused) |
[in] | pArg | : Callback argument. (unused) |
ADI_WIFI_RESULT adi_wifi_StartTimer | ( | const uint32_t | nMilliSeconds, |
uint8_t | nIsPingTimer | ||
) |
Timer start.
Configure and start #ADI_WIFI_NOOS_GP_TIMER with a specific timeout value.
[in] | nMilliSeconds | : The number of milliseconds before timeout. |
[in] | nIsPingTimer | : Parameter to differentiate which timer to configure. |
ADI_WIFI_RESULT adi_wifi_StopTimer | ( | uint8_t | nIsPingTimer | ) |
Timer stop.
Disable the timer.
[in] | nIsPingTimer | : Parameter to differentiate which timer to stop. |
void adi_wifi_TimerCallback | ( | void * | pCBParam, |
uint32_t | Event, | ||
void * | pArg | ||
) |
Timer callback.
Function that gets executed when a timeout event occurs.
[in] | pCBParam | : Callback parameter. (unused) |
[in] | Event | : Callback event. (unused) |
[in] | pArg | : Callback argument. (unused) |
ADI_WIFI_RESULT adi_wifi_WaitForResponseWithTimeout | ( | const uint32_t | nTimeoutMilliSeconds, |
ADI_WIFI_AT_CMDCODE | eCommandType | ||
) |
Wait for response with a timeout.
This function will block until eCommandType occurs. If there is a duration of nTimeoutMilliSeconds between calling this function and the desired event, the function will timeout and return failure.
[in] | nTimeoutMilliSeconds | : The time to wait (ms) if no event occurs before erroring out. |
[in] | eCommandType | : The event we are expecting to receive. |