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

Function rt_wlan_dev_get_rssi

components/drivers/wlan/dev_wlan.c:233–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233int rt_wlan_dev_get_rssi(struct rt_wlan_device *device)
234{
235 int rssi = 0;
236 rt_err_t result = RT_EOK;
237
238 if (device == RT_NULL)
239 {
240 rt_set_errno(-RT_EIO);
241 return 0;
242 }
243
244 result = rt_device_control(RT_DEVICE(device), RT_WLAN_CMD_GET_RSSI, &rssi);
245 if (result != RT_EOK)
246 {
247 rt_set_errno(result);
248 return 0;
249 }
250
251 return rssi;
252}
253
254rt_err_t rt_wlan_dev_get_info(struct rt_wlan_device *device, struct rt_wlan_info *info)
255{

Callers 1

rt_wlan_get_rssiFunction · 0.85

Calls 2

rt_set_errnoFunction · 0.85
rt_device_controlFunction · 0.85

Tested by

no test coverage detected