mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
fix: validation GPIO and reset wifi for arduino-esp32 core 3.x.x fixed
This commit is contained in:
@@ -182,9 +182,9 @@ namespace NetworkUtils {
|
||||
|
||||
wifi_station_dhcpc_set_maxtry(5);
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
// Nothing. Because memory leaks when turn off WiFi on ESP32, bug?
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && ESP_ARDUINO_VERSION_MAJOR < 3
|
||||
// Nothing. Because memory leaks when turn off WiFi on ESP32 SDK < 3.0.0
|
||||
return true;
|
||||
#else
|
||||
return WiFi.mode(WIFI_OFF);
|
||||
|
||||
@@ -123,7 +123,9 @@
|
||||
#define PROGMEM
|
||||
#endif
|
||||
|
||||
#ifndef GPIO_IS_VALID_GPIO
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
#include <driver/gpio.h>
|
||||
#elif !defined(GPIO_IS_VALID_GPIO)
|
||||
#define GPIO_IS_VALID_GPIO(gpioNum) (gpioNum >= 0 && gpioNum <= 16)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user