diff --git a/src/Ethernet.h b/src/Ethernet.h index 0045de88..45ec527e 100644 --- a/src/Ethernet.h +++ b/src/Ethernet.h @@ -33,10 +33,12 @@ // up to 4 sockets. W5200 & W5500 can have up to 8 sockets. Several bytes // of RAM are used for each socket. Reducing the maximum can save RAM, but // you are limited to fewer simultaneous connections. -#if defined(RAMEND) && defined(RAMSTART) && ((RAMEND - RAMSTART) <= 2048) -#define MAX_SOCK_NUM 4 -#else -#define MAX_SOCK_NUM 8 +#if !defined(MAX_SOCK_NUM) +# if defined(RAMEND) && defined(RAMSTART) && ((RAMEND - RAMSTART) <= 2048) +# define MAX_SOCK_NUM 4 +# else +# define MAX_SOCK_NUM 8 +# endif #endif // By default, each socket uses 2K buffers inside the WIZnet chip. If diff --git a/src/utility/w5100.h b/src/utility/w5100.h index b2e8ec83..b5b815a3 100644 --- a/src/utility/w5100.h +++ b/src/utility/w5100.h @@ -18,7 +18,9 @@ #include // Safe for all chips -#define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) +#if !defined(SPI_ETHERNET_SETTINGS) +# define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0) +#endif // Safe for W5200 and W5500, but too fast for W5100 // Uncomment this if you know you'll never need W5100 support.