Skip to content

Commit

Permalink
ESP8266: Support building with SDK 3.0 and 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Mar 1, 2021
1 parent b964451 commit cf73889
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/esp8266/esp_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <esp_common.h>
#else
#include <user_interface.h>
#include "version.h"
#if MGOS_ESP8266_WIFI_ENABLE_WPAENT
#include <wpa2_enterprise.h>
#endif
Expand Down Expand Up @@ -175,7 +176,11 @@ static bool mgos_wifi_remove_mode(uint8_t mode) {

bool mgos_wifi_dev_sta_setup(const struct mgos_config_wifi_sta *cfg) {
struct station_config sta_cfg = {
.all_channel_scan = mgos_sys_config_get_wifi_sta_all_chan_scan(),
#if ESP_SDK_VERSION_MAJOR >= 3
.all_channel_scan = mgos_sys_config_get_wifi_sta_all_chan_scan(),
#else
0
#endif
};

if (!cfg->enable) {
Expand Down

0 comments on commit cf73889

Please sign in to comment.