
Originally Posted by
stevech
...thus relies on some driver code to calculate the buffer size - which it may not do. Instead, it may rely on code or constants to define the buffer size for each socket, and the RX and TX for that socket may differ.
Yep, you're right, w5100.cpp sets the buffer size to 4096
Code:
...
CH_BASE = 0x4000;
SSIZE = 4096;
SMASK = 0x0FFF;
TXBUF_BASE = 0x8000;
RXBUF_BASE = 0xC000;
for (i=0; i<MAX_SOCK_NUM; i++) {
writeSnRX_SIZE(i, SSIZE >> 10);
writeSnTX_SIZE(i, SSIZE >> 10);
}
for (; i<8; i++) {
writeSnRX_SIZE(i, 0);
writeSnTX_SIZE(i, 0);
}
...