'esp_wifi_get_inactive_time' was not declared in this scope
Posted: Mon Dec 28, 2020 10:36 am
ESP-IDF function esp_wifi_get_inactive_time() is found in esp_wifi.h, but code below won't compile in Arduino IDE 1.8.13 due to 'esp_wifi_get_inactive_time' was not declared in this scope
other functions in esp_wifi.h e.g. esp_wifi_set_bandwidth() are fine.
Checked spelling, conflicts, etc & I can't find the cause. Thanks!
other functions in esp_wifi.h e.g. esp_wifi_set_bandwidth() are fine.
Checked spelling, conflicts, etc & I can't find the cause. Thanks!
Code: Select all
#include <WiFi.h>
#include "esp_wifi.h"
void setup() {
ESP_ERROR_CHECK(esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
ESP_ERROR_CHECK(esp_wifi_set_bandwidth(ESP_IF_WIFI_AP, WIFI_BW_HT20));
uint16_t sec;
ESP_ERROR_CHECK(esp_wifi_get_inactive_time(ESP_IF_WIFI_AP, &sec));
}
void loop() {}