Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
csk_wifi_api.c File Reference

Functions

 LOG_MODULE_REGISTER (csk_wifi, CONFIG_WIFI_LOG_LEVEL)
 
 K_MUTEX_DEFINE (wifi_api_mutex)
 
void wifi_dispatch_callbacks (csk_wifi_event_t events, void *event_data, uint32_t event_data_len)
 
int csk_wifi_add_callback (csk_wifi_event_cb_t *wifi_event_cb)
 Add an wifi event callback. More...
 
int csk_wifi_init ()
 CSK WiFi driver initialize. More...
 
int csk_wifi_deinit (void)
 CSK WiFi driver deinitialize. More...
 
int csk_wifi_scan_ap (csk_wifi_scan_info_t **ap_info, csk_wifi_result_t *result, k_timeout_t timeout)
 Scan the neighboring AP device. More...
 

Variables

static sys_slist_t wifi_callback_list
 

Function Documentation

◆ csk_wifi_add_callback()

int csk_wifi_add_callback ( csk_wifi_event_cb_t wifi_event_cb)

Add an wifi event callback.

Parameters
wifi_event_cb[in]Application's callback structure pointer.
Returns
0 if successful, negative errno code on failure.

◆ csk_wifi_deinit()

int csk_wifi_deinit ( void  )

CSK WiFi driver deinitialize.

Returns
0 if successful, negative errno code on failure.

◆ csk_wifi_init()

int csk_wifi_init ( void  )

CSK WiFi driver initialize.

Returns
0 if successful, negative errno code on failure.

◆ csk_wifi_scan_ap()

int csk_wifi_scan_ap ( csk_wifi_scan_info_t **  ap_info,
csk_wifi_result_t result,
k_timeout_t  timeout 
)

Scan the neighboring AP device.

Parameters
ap_info[in/out]Pointer to WiFi AP information structure
result[out]Pointer to WIFI operation result
timeout[in]How long to try to scan neighboring WIFI Access Point
Note
timeout parameter only supports K_FOREVER or K_NO_WAIT
Returns
Number of neighboring APs imformation
Return values
-EAGAIN(11)errno code if timeout or invalid state
-ENOMEM(12)errno code if insufficient memory
-EIO(5)errno code if wlan driver exceptions occur

◆ K_MUTEX_DEFINE()

K_MUTEX_DEFINE ( wifi_api_mutex  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( csk_wifi  ,
CONFIG_WIFI_LOG_LEVEL   
)

◆ wifi_dispatch_callbacks()

void wifi_dispatch_callbacks ( csk_wifi_event_t  events,
void event_data,
uint32_t  event_data_len 
)

Variable Documentation

◆ wifi_callback_list

sys_slist_t wifi_callback_list
static