![]() |
WE310F5
39.00.000
|
This section describes the M2MB API for Network Interface for RAW data transfer over WiFi. More...
typedef INT32(* | M2MB_NWIF_RAW_CB_T) (VOID *userCtx, UINT8 *pData, INT32 len) |
User callback prototype to receive data from Wi-Fi interface. More... | |
INT32 | m2mb_nwif_raw_init (UINT8 mode, M2MB_NWIF_RAW_CB_T *pCB, VOID *userCtx) |
m2mb_nwif_raw_init is called to initialize the module. More... | |
INT32 | m2mb_nwif_raw_send (UINT8 *data, INT32 length) |
m2mb_nwif_raw_send is called to send data over Wi-Fi interface. More... | |
This section describes the M2MB API for Network Interface for RAW data transfer over WiFi.
To send data and receive data over WiFi without the module network stack user can use this module. This module attaches to the Wi-Fi interface to receive and send data detaching the network stack.
User callback prototype to receive data from Wi-Fi interface.
Type definition of user callback to handle data received from Wi-Fi interface. This callback is called from the thread context, but user has to handle it quickly and return, so that packets arriving from Wi-Fi interface can be handled else buffer to handle the packets will get filled and the interface will start dropping the received packets. Once the callback is called the buffer will be freed bythe module. User has to copy it for further processing.
Definition at line 68 of file m2mb_nwif_raw.h.
INT32 m2mb_nwif_raw_init | ( | UINT8 | mode, |
M2MB_NWIF_RAW_CB_T * | pCB, | ||
VOID * | userCtx | ||
) |
m2mb_nwif_raw_init is called to initialize the module.
m2mb_nwif_raw_init detaches the network stack with Wi-Fi and registers the user callback.
[out] | mode | Interface to use. This can be STA or AP mode. Please look at the M2MB_NCM_INIT_MODE_E for more details. |
[out] | pCB | User callback to handle data received over Wi-Fi interface. |
[out] | userCtx | User context to be passed in the user callback. |
m2mb_nwif_raw_send is called to send data over Wi-Fi interface.
m2mb_nwif_raw_send sends the data given over Wi-Fi interface.
[out] | data | Pointer to the data. |
[out] | length | Length of bytes to be sent from the data pointer. |