Skip to content

Commit b619a75

Browse files
author
chris
committed
coexist
1 parent bd0c1a3 commit b619a75

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

modules/io/wifi/esp32/wifi-esp32.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ void xs_wifi419_close(xsMachine *the)
183183

184184
static void initWiFi(void)
185185
{
186+
wifi_mode_t mode;
187+
if (ESP_OK == esp_wifi_get_mode(&mode)) {
188+
if (!gStation)
189+
gStation = esp_netif_get_handle_from_ifkey("WIFI_STA_DEF");
190+
return;
191+
}
192+
186193
if (gStation) return;
187194

188195
esp_netif_init();

0 commit comments

Comments
 (0)