Skip to content

Commit 7ac1ad0

Browse files
authored
Allow MAX_SOCK_NUM to be overriden by previous define
1 parent 7c32bbe commit 7ac1ad0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Ethernet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@
3333
// up to 4 sockets. W5200 & W5500 can have up to 8 sockets. Several bytes
3434
// of RAM are used for each socket. Reducing the maximum can save RAM, but
3535
// you are limited to fewer simultaneous connections.
36+
#ifndef MAX_SOCK_NUM
3637
#if defined(RAMEND) && defined(RAMSTART) && ((RAMEND - RAMSTART) <= 2048)
3738
#define MAX_SOCK_NUM 4
3839
#else
3940
#define MAX_SOCK_NUM 8
4041
#endif
42+
#endif
4143

4244
// By default, each socket uses 2K buffers inside the WIZnet chip. If
4345
// MAX_SOCK_NUM is set to fewer than the chip's maximum, uncommenting

0 commit comments

Comments
 (0)