TuyaOS
宏定义 | 函数
wf_basic_intf.h 文件参考

basic wifi interface 更多...

#include "tuya_cloud_types.h"
#include "tal_sleep.h"
#include "tuya_hal_wifi.h"
wf_basic_intf.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define tuya_cpu_get_lp_mode   tal_cpu_get_lp_mode
 Get CPU lowpower mode 更多...
 
#define tuya_cpu_lp_disable   tal_cpu_lp_disable
 disable the cpu low power mode. 更多...
 
#define tuya_cpu_lp_enable   tal_cpu_lp_enable
 enable the cpu low power mode. 更多...
 
#define tuya_wifi_lp_disable   tal_wifi_lp_disable
 disable the wifi low power mode. 更多...
 
#define tuya_wifi_lp_enable   tal_wifi_lp_enable
 enable the wifi low power mode. 更多...
 
#define tuya_wifi_set_lps_dtim   tal_wifi_set_lps_dtim
 set the wifi low power dtim. 更多...
 
#define wf_all_ap_scan   tal_wifi_all_ap_scan
 do wifi Scan in all channels. 更多...
 
#define wf_ap_start   tal_wifi_ap_start
 start ap in ap mode. 更多...
 
#define wf_ap_stop   tal_wifi_ap_stop
 stop ap in ap mode. 更多...
 
#define wf_assign_ap_scan   tal_wifi_assign_ap_scan
 do wifi Scan with specificed SSID. 更多...
 
#define wf_fast_station_connect   tal_fast_station_connect
 do fast wifi connect. 更多...
 
#define wf_get_ap_mac   tal_wifi_get_ap_mac
 get the ap mac address. 更多...
 
#define wf_get_connected_ap_info   tal_wifi_get_connected_ap_info
 get connect ap info. 更多...
 
#define wf_get_cur_channel   tal_wifi_get_cur_channel
 get wifi channel. 更多...
 
#define wf_get_ip   tal_wifi_get_ip
 get wifi ip. 更多...
 
#define wf_get_mac   tal_wifi_get_mac
 get wifi mac address. 更多...
 
#define wf_release_ap   tal_wifi_release_ap
 free ap memory. 更多...
 
#define wf_rf_calibrated   tal_wifi_rf_calibrated
 do wifi calibration 更多...
 
#define wf_set_country_code   tal_wifi_set_country_code
 set the wifi country code. 更多...
 
#define wf_set_cur_channel   tal_wifi_set_cur_channel
 set wifi channel. 更多...
 
#define wf_set_mac   tal_wifi_set_mac
 set wifi mac address. 更多...
 
#define wf_sniffer_set   tal_wifi_sniffer_set
 enable or disable wifi sniffer. 更多...
 
#define wf_station_connect   tal_wifi_station_connect
 do wifi connect in station mode. 更多...
 
#define wf_station_disconnect   tal_wifi_station_disconnect
 do wifi disconnect in station mode. 更多...
 
#define wf_station_get_conn_ap_rssi   tal_wifi_station_get_conn_ap_rssi
 get rssi of the connected ap. 更多...
 
#define wf_station_stat_get   tal_wifi_station_get_status
 get wifi station stat. 更多...
 
#define wf_wk_mode_get   tal_wifi_get_work_mode
 get wifi work mode. 更多...
 
#define wf_wk_mode_set   tal_wifi_set_work_mode
 set wifi work mode. 更多...
 

函数

OPERATE_RET wf_get_country_code (IN CONST CHAR_T *p_country_code)
 get the wifi country code. 更多...
 

详细描述

basic wifi interface

版本
0.1
日期
2021-01-28

宏定义说明

◆ tuya_cpu_get_lp_mode

#define tuya_cpu_get_lp_mode   tal_cpu_get_lp_mode

Get CPU lowpower mode

返回
TRUE on lowpower, FALSE on normal

◆ tuya_cpu_lp_disable

#define tuya_cpu_lp_disable   tal_cpu_lp_disable

disable the cpu low power mode.

注解
called when exiting wifi low power mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_cpu_lp_enable

#define tuya_cpu_lp_enable   tal_cpu_lp_enable

enable the cpu low power mode.

注解
called when entering wifi low power mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_wifi_lp_disable

#define tuya_wifi_lp_disable   tal_wifi_lp_disable

disable the wifi low power mode.

注解
called when exiting wifi low power mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_wifi_lp_enable

#define tuya_wifi_lp_enable   tal_wifi_lp_enable

enable the wifi low power mode.

注解
called when entering wifi low power mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_wifi_set_lps_dtim

#define tuya_wifi_set_lps_dtim   tal_wifi_set_lps_dtim

set the wifi low power dtim.

注解
called before enter wifi low power mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_all_ap_scan

#define wf_all_ap_scan   tal_wifi_all_ap_scan

do wifi Scan in all channels.

参数
[out]ap_aryarray of ap infomation
[out]numnumber of array members
注解
do all channel scan, must set station mode first.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_ap_start

#define wf_ap_start   tal_wifi_ap_start

start ap in ap mode.

参数
[in]cfgthe configuration of the ap
注解
called in wifi ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_ap_stop

#define wf_ap_stop   tal_wifi_ap_stop

stop ap in ap mode.

注解
called in wifi ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_assign_ap_scan

#define wf_assign_ap_scan   tal_wifi_assign_ap_scan

do wifi Scan with specificed SSID.

参数
[in]ssidthe ssid to be scaned
[out]apap info of the ssid
注解
must set station mode first.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_fast_station_connect

#define wf_fast_station_connect   tal_fast_station_connect

do fast wifi connect.

参数
[in]fast_ap_infothe ap infomation of the ap to be connected
注解
called after wf_get_connected_ap_info is called
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_get_ap_mac

#define wf_get_ap_mac   tal_wifi_get_ap_mac

get the ap mac address.

注解
called in wifi ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_get_connected_ap_info

#define wf_get_connected_ap_info   tal_wifi_get_connected_ap_info

get connect ap info.

参数
[out]fast_ap_infothe ap infomation of the connected ap
注解
called after wifi connection has established in station mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_get_cur_channel

#define wf_get_cur_channel   tal_wifi_get_cur_channel

get wifi channel.

参数
[out]chanpointer that current wifi chan
注解
called after set station mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_get_ip

#define wf_get_ip   tal_wifi_get_ip

get wifi ip.

参数
[in]wfstation or ap
[out]ipip address of station or ap
注解
called in station mode or ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_get_mac

#define wf_get_mac   tal_wifi_get_mac

get wifi mac address.

参数
[in]wfstation or ap
[out]macmac address of station or ap
注解
called in station mode or ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_release_ap

#define wf_release_ap   tal_wifi_release_ap

free ap memory.

参数
[in]apthe ap info to be free
注解
called after wf_all_ap_scan or wf_assign_ap_scan
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_rf_calibrated

#define wf_rf_calibrated   tal_wifi_rf_calibrated

do wifi calibration

注解
called when test wifi
返回
true on success. faile on failure

◆ wf_set_country_code

#define wf_set_country_code   tal_wifi_set_country_code

set the wifi country code.

注解
called in wifi ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_set_cur_channel

#define wf_set_cur_channel   tal_wifi_set_cur_channel

set wifi channel.

参数
[in]chanthe chan to be set
注解
called after set station mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_set_mac

#define wf_set_mac   tal_wifi_set_mac

set wifi mac address.

参数
[in]wfstation or ap
[in]macmac address of station or ap
注解
called in station mode or ap mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_sniffer_set

#define wf_sniffer_set   tal_wifi_sniffer_set

enable or disable wifi sniffer.

参数
[in]enenable or disable wifi sniffer
[in]cbthe callback function that will get sniffer data
注解
called after set sniffer mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_station_connect

#define wf_station_connect   tal_wifi_station_connect

do wifi connect in station mode.

参数
[in]ssidthe ssid of the ap to be connected
[in]passwdthe passwd of the ap to be connected
注解
called in station mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_station_disconnect

#define wf_station_disconnect   tal_wifi_station_disconnect

do wifi disconnect in station mode.

注解
called in station mode after wf_station_connect
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_station_get_conn_ap_rssi

#define wf_station_get_conn_ap_rssi   tal_wifi_station_get_conn_ap_rssi

get rssi of the connected ap.

参数
[out]rssithe rssi of the connected ap
注解
called after connection has established in station mode
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_station_stat_get

#define wf_station_stat_get   tal_wifi_station_get_status

get wifi station stat.

参数
[out]statthe stat in the station mode,refer to WF_STATION_STAT_E
注解
called after wf_station_connect
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_wk_mode_get

#define wf_wk_mode_get   tal_wifi_get_work_mode

get wifi work mode.

参数
[out]modecurrent wifi work mode
注解
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ wf_wk_mode_set

#define wf_wk_mode_set   tal_wifi_set_work_mode

set wifi work mode.

参数
[in]modewifi work mode,such as station, soft ap...
注解
called before other wifi operation
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

函数说明

◆ wf_get_country_code()

OPERATE_RET wf_get_country_code ( IN CONST CHAR_T *  p_country_code)

get the wifi country code.

注解
called after wf_set_country_code
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h