From 7ac1ad05321e50be5880f22c1eacab17db0807ff Mon Sep 17 00:00:00 2001 From: Flole998 Date: Wed, 22 Sep 2021 20:21:24 +0200 Subject: [PATCH] Allow MAX_SOCK_NUM to be overriden by previous define --- src/Ethernet.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ethernet.h b/src/Ethernet.h index 745fa4a3..5ed8a769 100644 --- a/src/Ethernet.h +++ b/src/Ethernet.h @@ -33,11 +33,13 @@ // 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. +#ifndef 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 // MAX_SOCK_NUM is set to fewer than the chip's maximum, uncommenting