Skip to content

Commit 399f5c4

Browse files
committed
Format ESP8266 + tweak pio target
1 parent 179286d commit 399f5c4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

platformio.ini

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,12 @@ extra_scripts = pre:rename_usb_config.py
411411
[env:huzzah]
412412
extends=common:esp8266
413413
board = huzzah
414-
build_flags = -DARDUINO_ESP8266_ADAFRUIT_HUZZAH
414+
board_build.f_cpu = 80000000L
415+
; Arduino CLI uses this from adafruit_ci#ci-wippersnapper
416+
; esp8266:esp8266:huzzah:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200
417+
build_flags =
418+
-DARDUINO_ESP8266_ADAFRUIT_HUZZAH
419+
-DDEBUG_ESP_PORT=Serial
415420
board_build.filesystem = littlefs
416421
upload_port = /dev/cu.SLAB_USBtoUART
417422

src/network_interfaces/Wippersnapper_ESP8266.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
315315
delay(100);
316316
// ESP8266 MUST be in STA mode to avoid device acting as client/server
317317
WiFi.mode(WIFI_STA);
318-
// WiFi.begin(_ssid, _pass);
319318
_status = WS_NET_DISCONNECTED;
320319
delay(100);
321320

@@ -338,19 +337,19 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
338337

339338
long startRetry = millis();
340339
WS_DEBUG_PRINTLN("CONNECTING");
341-
340+
342341
while (_wifiMulti.run(5000) != WL_CONNECTED &&
343-
millis() - startRetry < 10000) {
342+
millis() - startRetry < 10000) {
344343
// ESP8266 WDT requires yield() during a busy-loop so it doesn't bite
345344
yield();
346345
}
347-
346+
348347
if (WiFi.status() == WL_CONNECTED) {
349348
_status = WS_NET_CONNECTED;
350349
} else {
351350
_status = WS_NET_DISCONNECTED;
352351
}
353-
352+
354353
WS.feedWDT();
355354
}
356355
}

0 commit comments

Comments
 (0)