Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/utility/w5100.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include <SPI.h>

// 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.
Expand Down