From 45a364c076e5fff01313e6df575ccab5f9607953 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Wed, 24 Feb 2021 03:09:05 +0100 Subject: [PATCH] Fix build errors on ESP32 ethernet --- include/hasp_conf.h | 2 +- src/mqtt/hasp_mqtt.h | 1 + src/sys/net/hasp_ethernet_esp32.cpp | 4 +++- src/sys/net/hasp_ethernet_esp32.h | 1 + src/sys/net/hasp_ethernet_stm32.h | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/hasp_conf.h b/include/hasp_conf.h index 3c64ab88..eb034f37 100644 --- a/include/hasp_conf.h +++ b/include/hasp_conf.h @@ -160,7 +160,7 @@ static WiFiSpiClass WiFi; #define ETH_TYPE ETH_PHY_LAN8720 #define ETH_CLKMODE ETH_CLOCK_GPIO17_OUT -#include "net/hasp_ethernet_esp32.h" +#include "sys/net/hasp_ethernet_esp32.h" #warning Using ESP32 Ethernet LAN8720 #else diff --git a/src/mqtt/hasp_mqtt.h b/src/mqtt/hasp_mqtt.h index 8e47773c..18f007ea 100644 --- a/src/mqtt/hasp_mqtt.h +++ b/src/mqtt/hasp_mqtt.h @@ -5,6 +5,7 @@ #define HASP_MQTT_H #include +#include "ArduinoJson.h" #include "hasp_conf.h" diff --git a/src/sys/net/hasp_ethernet_esp32.cpp b/src/sys/net/hasp_ethernet_esp32.cpp index 6b78e836..c3244afe 100644 --- a/src/sys/net/hasp_ethernet_esp32.cpp +++ b/src/sys/net/hasp_ethernet_esp32.cpp @@ -2,10 +2,12 @@ For full license information read the LICENSE file in the project folder */ #include "hasp_conf.h" -#include "hal/hasp_hal.h" #include "hasp_debug.h" #include "hasp_network.h" +#include "hal/hasp_hal.h" +#include "dev/device.h" + #if HASP_USE_ETHERNET > 0 && defined(ARDUINO_ARCH_ESP32) IPAddress ip; diff --git a/src/sys/net/hasp_ethernet_esp32.h b/src/sys/net/hasp_ethernet_esp32.h index 3eb24e4e..8a25a147 100644 --- a/src/sys/net/hasp_ethernet_esp32.h +++ b/src/sys/net/hasp_ethernet_esp32.h @@ -9,6 +9,7 @@ static bool eth_connected = false; void ethernetSetup(); void ethernetLoop(void); +bool ethernetEverySecond(); bool ethernetEvery5Seconds(); void ethernet_get_statusupdate(char* buffer, size_t len); diff --git a/src/sys/net/hasp_ethernet_stm32.h b/src/sys/net/hasp_ethernet_stm32.h index ed3a76c1..f499069f 100644 --- a/src/sys/net/hasp_ethernet_stm32.h +++ b/src/sys/net/hasp_ethernet_stm32.h @@ -9,6 +9,7 @@ static bool eth_connected = false; void ethernetSetup(); void ethernetLoop(void); +bool ethernetEverySecond(); bool ethernetEvery5Seconds(); void ethernet_get_statusupdate(char* buffer, size_t len);