Skip to content

Loading…

Workaround for gcc bug #42

Closed
wants to merge 1 commit into from

3 participants

This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 libraries/Ethernet/utility/w5100.h
View
5 libraries/Ethernet/utility/w5100.h
@@ -258,7 +258,10 @@ class W5100Class {
} \
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) \
Something went wrong with that request. Please try again.