From 14ba13eb029f3f76ee6446c89adeea6f5627a258 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Tue, 27 Sep 2022 22:57:30 +0200 Subject: [PATCH] Add HASP_USE_ETHSPI --- lib/ETHSPI/ETHSPI.cpp | 7 +++++-- lib/ETHSPI/ETHSPI.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ETHSPI/ETHSPI.cpp b/lib/ETHSPI/ETHSPI.cpp index 7bdbe7a5..7931dcb6 100644 --- a/lib/ETHSPI/ETHSPI.cpp +++ b/lib/ETHSPI/ETHSPI.cpp @@ -1,19 +1,20 @@ /* MIT License - Copyright (c) 2022 Ben Suffolk, ben@vanilla.net For full license information read the LICENSE file in the project folder */ +#if defined(HASP_USE_ETHSPI) + #include "ETHSPI.h" #include "esp_netif.h" #include "esp_eth.h" +#include "esp_eth_mac.h" #include "esp_event.h" #include "esp_log.h" #include "driver/gpio.h" #include "sdkconfig.h" #include "lwip/err.h" #include "lwip/dns.h" - extern void tcpipInit(); - ETHSPIClass::ETHSPIClass() :initialized(false) ,staticIP(false) @@ -339,3 +340,5 @@ String ETHSPIClass::macAddress(void) } ETHSPIClass ETHSPI; + +#endif \ No newline at end of file diff --git a/lib/ETHSPI/ETHSPI.h b/lib/ETHSPI/ETHSPI.h index 309add0f..03b12e0f 100644 --- a/lib/ETHSPI/ETHSPI.h +++ b/lib/ETHSPI/ETHSPI.h @@ -10,7 +10,7 @@ #include "driver/spi_master.h" #ifndef ETHSPI_HOST -#define ETHSPI_HOST HSPI_HOST +#define ETHSPI_HOST SPI2_HOST #endif #ifndef ETHSPI_CLOCK_MHZ