Add HASP_USE_ETHSPI

This commit is contained in:
fvanroie 2022-09-27 22:57:30 +02:00
parent ac2aa275c5
commit 14ba13eb02
2 changed files with 6 additions and 3 deletions

View File

@ -1,19 +1,20 @@
/* MIT License - Copyright (c) 2022 Ben Suffolk, ben@vanilla.net /* MIT License - Copyright (c) 2022 Ben Suffolk, ben@vanilla.net
For full license information read the LICENSE file in the project folder */ For full license information read the LICENSE file in the project folder */
#if defined(HASP_USE_ETHSPI)
#include "ETHSPI.h" #include "ETHSPI.h"
#include "esp_netif.h" #include "esp_netif.h"
#include "esp_eth.h" #include "esp_eth.h"
#include "esp_eth_mac.h"
#include "esp_event.h" #include "esp_event.h"
#include "esp_log.h" #include "esp_log.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "lwip/err.h" #include "lwip/err.h"
#include "lwip/dns.h" #include "lwip/dns.h"
extern void tcpipInit(); extern void tcpipInit();
ETHSPIClass::ETHSPIClass() ETHSPIClass::ETHSPIClass()
:initialized(false) :initialized(false)
,staticIP(false) ,staticIP(false)
@ -339,3 +340,5 @@ String ETHSPIClass::macAddress(void)
} }
ETHSPIClass ETHSPI; ETHSPIClass ETHSPI;
#endif

View File

@ -10,7 +10,7 @@
#include "driver/spi_master.h" #include "driver/spi_master.h"
#ifndef ETHSPI_HOST #ifndef ETHSPI_HOST
#define ETHSPI_HOST HSPI_HOST #define ETHSPI_HOST SPI2_HOST
#endif #endif
#ifndef ETHSPI_CLOCK_MHZ #ifndef ETHSPI_CLOCK_MHZ