~ubuntu-branches/debian/experimental/arduino/experimental

« back to all changes in this revision

Viewing changes to debian/patches/ethernet_lib.patch

  • Committer: Package Import Robot
  • Author(s): Scott Howard
  • Date: 2012-03-11 18:19:42 UTC
  • mfrom: (1.1.5) (5.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120311181942-be2clnbz1gcehixb
Tags: 1:1.0.1~rc1+dfsg-1
New upstream release, experimental.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Using the Ubuntu version of arduino-core and avr-gcc
2
 
 makes it impossible to get the example Arduino Webserver working.
3
 
Author: Christian Lins
4
 
Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645321
5
 
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/arduino/+bug/865266
6
 
 
7
 
Index: arduino/libraries/Ethernet/utility/w5100.h
8
 
===================================================================
9
 
--- arduino.orig/libraries/Ethernet/utility/w5100.h     2011-10-15 23:10:12.425924788 -0400
10
 
+++ arduino/libraries/Ethernet/utility/w5100.h  2011-10-15 23:11:29.917926630 -0400
11
 
@@ -270,7 +270,10 @@
12
 
   }                                                          \
13
 
   static uint16_t read##name(SOCKET _s) {                    \
14
 
     uint16_t res = readSn(_s, address);                      \
15
 
-    res = (res << 8) + readSn(_s, address + 1);              \
16
 
+    uint16_t res2 = readSn(_s,address + 1);                  \
17
 
+    res = res << 8;                                          \
18
 
+    res2 = res2 & 0xFF;                                      \
19
 
+    res = res | res2;                                        \
20
 
     return res;                                              \
21
 
   }
22
 
 #define __SOCKET_REGISTER_N(name, address, size)             \