MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_wlan_get_info

Function rt_wlan_get_info

components/drivers/wlan/dev_wlan_mgnt.c:1180–1201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180rt_err_t rt_wlan_get_info(struct rt_wlan_info *info)
1181{
1182 if (_sta_is_null())
1183 {
1184 return -RT_EIO;
1185 }
1186 RT_WLAN_LOG_D("%s is run", __FUNCTION__);
1187
1188 if (rt_wlan_is_connected() == RT_TRUE)
1189 {
1190 /* Initialize the information to the scan first */
1191 *info = _sta_mgnt.info;
1192 /* Try using get_info's API for more new information */
1193 if (rt_wlan_dev_get_info(STA_DEVICE(), info) != RT_EOK)
1194 {
1195 /* The get_info returns an error and gets the rssi value separately */
1196 info->rssi = rt_wlan_get_rssi();
1197 }
1198 return RT_EOK;
1199 }
1200 return -RT_ERROR;
1201}
1202
1203int rt_wlan_get_rssi(void)
1204{

Callers 1

wifi_statusFunction · 0.85

Calls 4

_sta_is_nullFunction · 0.85
rt_wlan_is_connectedFunction · 0.85
rt_wlan_dev_get_infoFunction · 0.85
rt_wlan_get_rssiFunction · 0.85

Tested by

no test coverage detected