Arduino Ethernet Shield example WebServer.pde no longer works after upgrading Ubuntu to version 11.10
This patch must be applied to w5100.h located into library/Ethernet/utility.
--- w5100.h.orig 2011-10-03 13:43:10.536833701 +0200
+++ w5100.h 2011-10-03 13:47:26.764844567 +0200
@@ -258,7 +258,10 @@
} \
static uint16_t read##name(SOCKET _s) { \
uint16_t res = readSn(_s, address); \
- res = (res << 8 ) + readSn(_s, address + 1); \
+ uint16_t res2 = readSn(_s,address + 1); \
+ res = res << 8; \
+ res2 = res2 & 0xFF; \
+ res = res | res2; \
return res; \
}
#define __SOCKET_REGISTER_N(name, address, size) \