MT7697 API Reference  LinkIt SDK v4
Typedef

Overview

Typedefs

typedef int32_t(* wifi_event_handler_t) (wifi_event_t event, uint8_t *payload, uint32_t length)
 This defines the Wi-Fi event handler. More...
 
typedef wifi_event_handler_t wifi_event_handler
 This is only for compatibility purpose, so that applications implemented with an earlier version of the API can work with the updated API.
 
typedef int32_t(* wifi_rx_handler_t) (uint8_t *payload, uint32_t length)
 This defines the 802.11 RX raw packet handler. More...
 

Typedef Documentation

typedef int32_t(* wifi_event_handler_t) (wifi_event_t event, uint8_t *payload, uint32_t length)

This defines the Wi-Fi event handler.

Call wifi_connection_register_event_handler() to register a handler, then the Wi-Fi driver generates an event and sends it to the handler.

Parameters
[in]eventis an optional event to register. For more details, please refer to wifi_event_t.
[in]payloadis the payload for the event. When the event is WIFI_EVENT_IOT_CONNECTED in AP mode, payload is the connected STA's MAC address. When the event is WIFI_EVENT_IOT_CONNECTED in STA mode, payload is the connected AP's BSSID.
[in]lengthis the length of a packet.
Returns
The return value is reserved and it is ignored.
typedef int32_t(* wifi_rx_handler_t) (uint8_t *payload, uint32_t length)

This defines the 802.11 RX raw packet handler.

Call wifi_config_register_rx_handler() to register a handler, then the network processor will deliver the packets to the handler function instead of sending them to the IP stack.

Parameters
[in]payloadis the packet payload.
[in]lengthis the packet length.
Returns
1: handled, and the packet won't be processed by other tasks 0: not handled, it will be processed by other tasks.