From f336a49539be452e0c7a924d55a6273036b203fb Mon Sep 17 00:00:00 2001 From: ivizot Date: Fri, 16 Apr 2021 14:27:17 +0300 Subject: [PATCH 1/2] Update w5100.h added #define SPI_ETHERNET_SPEED to allow for an explicit change of SPI speed --- src/utility/w5100.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utility/w5100.h b/src/utility/w5100.h index 099556a6..90de6305 100644 --- a/src/utility/w5100.h +++ b/src/utility/w5100.h @@ -17,6 +17,11 @@ #include #include +// add SPI_ETHERNET_SPEED to allow for an explicit change of SPI speed +#ifndef SPI_ETHERNET_SPEED +#define SPI_ETHERNET_SPEED 14000000 +#endif + // Safe for all chips #define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) From 3cd7ccae19c5a71b9a2c66bd4fd8815443efbff5 Mon Sep 17 00:00:00 2001 From: ivizot Date: Fri, 16 Apr 2021 14:27:50 +0300 Subject: [PATCH 2/2] Update w5100.h --- src/utility/w5100.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/w5100.h b/src/utility/w5100.h index 90de6305..6b2620e5 100644 --- a/src/utility/w5100.h +++ b/src/utility/w5100.h @@ -23,7 +23,7 @@ #endif // Safe for all chips -#define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) +#define SPI_ETHERNET_SETTINGS SPISettings(SPI_ETHERNET_SPEED, MSBFIRST, SPI_MODE0) // Safe for W5200 and W5500, but too fast for W5100 // Uncomment this if you know you'll never need W5100 support.