diff options
author | martin <martin@pkgsrc.org> | 2004-11-29 08:22:27 +0000 |
---|---|---|
committer | martin <martin@pkgsrc.org> | 2004-11-29 08:22:27 +0000 |
commit | e2d8b23d9eccd27cedcb808f9a1e95222a351e36 (patch) | |
tree | e95e8ea39c1da4df3c170114518d066845992276 /misc | |
parent | b59325d8a5ad1158750408c71e802df8af2a4171 (diff) | |
download | pkgsrc-e2d8b23d9eccd27cedcb808f9a1e95222a351e36.tar.gz |
Update to open2300-1.8.
This removes a lot of the previous hacks, replacing them with a fixed setup
for the serial port.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/open2300/Makefile.common | 4 | ||||
-rw-r--r-- | misc/open2300/distinfo | 16 | ||||
-rw-r--r-- | misc/open2300/patches/patch-aa | 8 | ||||
-rw-r--r-- | misc/open2300/patches/patch-ab | 516 | ||||
-rw-r--r-- | misc/open2300/patches/patch-ac | 57 | ||||
-rw-r--r-- | misc/open2300/patches/patch-ad | 31 | ||||
-rw-r--r-- | misc/open2300/patches/patch-ae | 13 | ||||
-rw-r--r-- | misc/open2300/patches/patch-af | 13 | ||||
-rw-r--r-- | misc/open2300/patches/patch-ag | 13 | ||||
-rw-r--r-- | misc/open2300/patches/patch-ah | 13 |
10 files changed, 18 insertions, 666 deletions
diff --git a/misc/open2300/Makefile.common b/misc/open2300/Makefile.common index 341154d17d6..9f0c366d463 100644 --- a/misc/open2300/Makefile.common +++ b/misc/open2300/Makefile.common @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.common,v 1.2 2004/11/11 10:19:29 martin Exp $ +# $NetBSD: Makefile.common,v 1.3 2004/11/29 08:22:27 martin Exp $ # -DISTNAME= open2300-1.7 +DISTNAME= open2300-1.8 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=open2300/} diff --git a/misc/open2300/distinfo b/misc/open2300/distinfo index 09e1e1ebafa..c20f4cdbc6b 100644 --- a/misc/open2300/distinfo +++ b/misc/open2300/distinfo @@ -1,12 +1,6 @@ -$NetBSD: distinfo,v 1.3 2004/11/12 19:01:57 kristerw Exp $ +$NetBSD: distinfo,v 1.4 2004/11/29 08:22:27 martin Exp $ -SHA1 (open2300-1.7.tar.gz) = 12227964e6a74f41c1efbbd58c4af67fc8ca3151 -Size (open2300-1.7.tar.gz) = 330103 bytes -SHA1 (patch-aa) = f63fcb9632729e32750f6e1129e2011bbe5c4419 -SHA1 (patch-ab) = abf7bc87a25d1894ecc32d09ed48bd479f076fe3 -SHA1 (patch-ac) = 5ddd6e4c0ce2df718c4fcb7efed1d9553c415684 -SHA1 (patch-ad) = 68fe348565fbc7434d58613b9578d499513bf1e4 -SHA1 (patch-ae) = 062f9d02e839c3c01a31d8b5ac6824a688742c2b -SHA1 (patch-af) = eaeda5057a9d268c0034c0edff080bb488861296 -SHA1 (patch-ag) = 1239d4d60865e75aa61bba1f04e760c74e84d68c -SHA1 (patch-ah) = 00d5dfd3a86691f7b2c0cef6360fc52103be6f17 +SHA1 (open2300-1.8.tar.gz) = 86fd2dcdef995498ed17062dd4b8df5db6b3383d +Size (open2300-1.8.tar.gz) = 330320 bytes +SHA1 (patch-aa) = 3f2cc9994e45a77d2bfc6907515e5c7c4a6d13d3 +SHA1 (patch-ab) = 9437137a36e434fcabde6acc5373be04523357e9 diff --git a/misc/open2300/patches/patch-aa b/misc/open2300/patches/patch-aa index 39980ad8176..4004f8fb607 100644 --- a/misc/open2300/patches/patch-aa +++ b/misc/open2300/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.2 2004/11/11 10:19:29 martin Exp $ +$NetBSD: patch-aa,v 1.3 2004/11/29 08:22:27 martin Exp $ ---- Makefile.orig 2004-08-01 11:51:08.000000000 +0200 -+++ Makefile 2004-11-11 10:43:54.000000000 +0100 +--- Makefile.orig 2004-11-13 01:25:31.000000000 +0100 ++++ Makefile 2004-11-29 09:12:16.000000000 +0100 @@ -4,7 +4,7 @@ # Default locations are # 1. Path to config file including filename given as parameter @@ -22,7 +22,7 @@ $NetBSD: patch-aa,v 1.2 2004/11/11 10:19:29 martin Exp $ @@ -37,7 +37,7 @@ - VERSION = 1.7 + VERSION = 1.8 -CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\" +CFLAGS += -DVERSION=\"$(VERSION)\" -DSYSCONFDIR=\"$(PKG_SYSCONFDIR)\" -I /usr/pkg/include/mysql diff --git a/misc/open2300/patches/patch-ab b/misc/open2300/patches/patch-ab index 2134d32e91e..3f24dd91b4b 100644 --- a/misc/open2300/patches/patch-ab +++ b/misc/open2300/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.2 2004/11/11 10:19:29 martin Exp $ +$NetBSD: patch-ab,v 1.3 2004/11/29 08:22:27 martin Exp $ ---- rw2300.c.orig 2004-08-01 11:51:08.000000000 +0200 -+++ rw2300.c 2004-11-11 10:45:50.000000000 +0100 +--- rw2300.c.orig 2004-11-13 13:10:39.000000000 +0100 ++++ rw2300.c 2004-11-29 09:15:14.000000000 +0100 @@ -9,6 +9,7 @@ * This program is published under the GNU General Public license */ @@ -10,517 +10,15 @@ $NetBSD: patch-ab,v 1.2 2004/11/11 10:19:29 martin Exp $ #include "rw2300.h" /********************************************************************/ -@@ -30,7 +31,7 @@ - int address=0x346; - int bytes=2; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - if (temperature_conv) -@@ -70,7 +71,7 @@ - int address=0x34B; - int bytes=15; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *temp_min = ((data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 + -@@ -125,7 +126,7 @@ - address=0x346; - number=2; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -137,7 +138,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -208,7 +209,7 @@ - int address=0x373; - int bytes=2; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - if (temperature_conv) -@@ -248,7 +249,7 @@ - int address=0x378; - int bytes=15; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *temp_min = ((data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 + -@@ -304,7 +305,7 @@ - address=0x373; - number=2; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -316,7 +317,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -387,7 +388,7 @@ - int address=0x3CE; - int bytes=2; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - if (temperature_conv) -@@ -427,7 +428,7 @@ - int address=0x3D3; - int bytes=15; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *dp_min = ((data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 + -@@ -483,7 +484,7 @@ - address=0x3CE; - number=2; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -495,7 +496,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -562,7 +563,7 @@ - int address=0x3FB; - int bytes=1; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - return ((data[0] >> 4) * 10 + (data[0] & 0xF)); -@@ -591,7 +592,7 @@ - int address=0x3FB; - int bytes=13; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *hum_min = (data[1] >> 4) * 10 + (data[1] & 0xF); -@@ -638,7 +639,7 @@ - address=0x3FB; - number=1; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -648,7 +649,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -715,7 +716,7 @@ - int address=0x419; - int bytes=1; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - return ((data[0] >> 4) * 10 + (data[0] & 0xF)); -@@ -745,7 +746,7 @@ - int address=0x419; - int bytes=13; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *hum_min = (data[1] >> 4) * 10 + (data[1] & 0xF); -@@ -792,7 +793,7 @@ - address=0x419; - number=1; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -802,7 +803,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -879,7 +880,7 @@ - - for (i=0; i<MAXWINDRETRIES; i++) - { -- if (read_safe(ws2300, address, bytes, data, command)!=bytes) //Wind -+ if (read_safe(ws2300, address, bytes, data, command, 1)!=bytes) //Wind - read_error_exit(); - - if ( (data[0]!=0x00) || //Invalid wind data -@@ -935,7 +936,12 @@ - - for (i=0; i<MAXWINDRETRIES; i++) - { -- if (read_safe(ws2300, address, bytes, data, command)!=bytes) //Wind -+ // do not verify checksum here - the result is ~5.5 bytes -+ // and apparently the weather station calculates it differently -+ // than what we expect. example: -+ // 0x00, 0x00, 0xd0, 0xdd, 0xdd, 0x0a - with checksum 0x97 -+ // instead of the expected 0x94. -+ if (read_safe(ws2300, address, bytes, data, command, 0)!=bytes) //Wind - read_error_exit(); - - if ( (data[0]!=0x00) || //Invalid wind data -@@ -999,7 +1005,7 @@ - int address=0x4EE; - int bytes=15; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - if (wind_min != NULL) -@@ -1057,7 +1063,7 @@ - - for (i=0; i<MAXWINDRETRIES; i++) - { -- if (read_safe(ws2300, address, number, data_read, command)!=number) -+ if (read_safe(ws2300, address, number, data_read, command, 1)!=number) - read_error_exit(); - - if ((data_read[0]!=0x00) || //Invalid wind data -@@ -1083,7 +1089,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -1157,7 +1163,7 @@ - int address=0x3A0; - int bytes=2; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - if (temperature_conv) -@@ -1199,7 +1205,7 @@ - int address=0x3A5; - int bytes=15; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *wc_min = ( (data[1]>>4)*10 + (data[1]&0xF) + (data[0]>>4)/10.0 + -@@ -1255,7 +1261,7 @@ - address=0x3A0; - number=2; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -1267,7 +1273,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -1337,7 +1343,7 @@ - int address=0x4B4; - int bytes=3; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - return ( ((data[2] >> 4) * 1000 + (data[2] & 0xF) * 100 + -@@ -1371,7 +1377,7 @@ - int address=0x4B4; - int bytes=11; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *rain_max = ((data[5] >> 4) * 1000 + (data[5] & 0xF) * 100 + -@@ -1415,7 +1421,7 @@ - address=0x4B4; - number=3; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -1429,7 +1435,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -1516,7 +1522,7 @@ - int address=0x497; - int bytes=3; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - return (((data[2] >> 4) * 1000 + (data[2] & 0xF) * 100 + -@@ -1551,7 +1557,7 @@ - int address=0x497; - int bytes=11; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *rain_max = ((data[5] >> 4) * 1000 + (data[5] & 0xF) * 100 + -@@ -1595,7 +1601,7 @@ - address=0x497; - number=3; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value[0] = data_read[0]&0xF; -@@ -1609,7 +1615,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -1697,7 +1703,7 @@ - int address=0x4D2; - int bytes=3; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - return (((data[2] >> 4) * 1000 + (data[2] & 0xF) * 100 + -@@ -1730,7 +1736,7 @@ - int address=0x4D2; - int bytes=8; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - time_since->minute = ((data[3] >> 4) * 10) + (data[3] & 0xF); -@@ -1771,7 +1777,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -1822,7 +1828,7 @@ - int address=0x5E2; - int bytes=3; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - -@@ -1860,7 +1866,7 @@ - int address=0x600; - int bytes=13; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *pres_min = ((data[2]&0xF)*1000 + (data[1]>>4)*100 + -@@ -1874,7 +1880,7 @@ - address=0x61E; //Relative pressure time and date for min/max - bytes=10; - -- if (read_safe(ws2300, address, bytes, data, command)!=bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1)!=bytes) - read_error_exit(); - - time_min->minute = ((data[0] >> 4) * 10) + (data[0] & 0xF); -@@ -1911,7 +1917,7 @@ - int address=0x5D8; - int bytes=3; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - -@@ -1949,7 +1955,7 @@ - int address=0x5F6; - int bytes=13; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *pres_min = ((data[2]&0xF)*1000 + (data[1]>>4)*100 + -@@ -1963,7 +1969,7 @@ - address=0x61E; //Relative pressure time and date for min/max - bytes=10; - -- if (read_safe(ws2300, address, bytes, data, command)!=bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1)!=bytes) - read_error_exit(); - - time_min->minute = ((data[0] >> 4) * 10) + (data[0] & 0xF); -@@ -2009,7 +2015,7 @@ - address=0x5D8; - number=8; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_value_abs[0] = data_read[0]&0xF; -@@ -2028,7 +2034,7 @@ - address=0x23B; - number=6; - -- if (read_safe(ws2300, address, number, data_read, command) != number) -+ if (read_safe(ws2300, address, number, data_read, command, 1) != number) - read_error_exit(); - - data_time[0] = data_read[0]&0xF; -@@ -2112,7 +2118,7 @@ - int address=0x5EC; - int bytes=3; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - -@@ -2147,7 +2153,7 @@ - const char *tendency_values[] = { "Steady", "Rising", "Falling" }; - const char *forecast_values[] = { "Rainy", "Cloudy", "Sunny" }; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - strcpy(tendency, tendency_values[data[0] >> 4]); -@@ -2180,7 +2186,7 @@ - int address=0x6B2; - int bytes=10; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - *interval = (data[1] & 0xF)*256 + data[0] + 1; -@@ -2244,7 +2250,7 @@ - - address = 0x6C6 + record*19; - -- if (read_safe(ws2300, address, bytes, data, command) != bytes) -+ if (read_safe(ws2300, address, bytes, data, command, 1) != bytes) - read_error_exit(); - - tempint = (data[4]<<12) + (data[3]<<4) + (data[2] >> 4); -@@ -2767,7 +2773,8 @@ - * - ********************************************************************/ - int read_data(WEATHERSTATION ws2300, int address, int number, -- unsigned char *readdata, unsigned char *commanddata) -+ unsigned char *readdata, unsigned char *commanddata, -+ int verify_checksum) - { - - unsigned char answer; -@@ -2806,8 +2813,10 @@ +@@ -2805,8 +2806,10 @@ //Read and verify checksum if (read_device(ws2300, &answer, 1) != 1) return -1; - if (answer != data_checksum(readdata, number)) -+ if (answer != data_checksum(readdata, number) && verify_checksum) { -+ errno = EIO; // make perror() output something meaningfull ++ if (answer != data_checksum(readdata, number)) { ++ errno = EIO; // perror is used - so errno needs to be meaningfull return -1; + } - + return i; -@@ -2906,7 +2915,8 @@ - * - ********************************************************************/ - int read_safe(WEATHERSTATION ws2300, int address, int number, -- unsigned char *readdata, unsigned char *commanddata) -+ unsigned char *readdata, unsigned char *commanddata, -+ int verify_checksum) - { - int j; - -@@ -2915,7 +2925,7 @@ - reset_06(ws2300); - - // Read the data. If expected number of bytes read break out of loop. -- if (read_data(ws2300, address, number, readdata, commanddata)==number) -+ if (read_data(ws2300, address, number, readdata, commanddata, verify_checksum)==number) - { - break; - } diff --git a/misc/open2300/patches/patch-ac b/misc/open2300/patches/patch-ac deleted file mode 100644 index 02d70d07cd4..00000000000 --- a/misc/open2300/patches/patch-ac +++ /dev/null @@ -1,57 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 2004/11/10 08:19:46 martin Exp $ - ---- linux2300.c.orig 2004-04-23 17:36:58.000000000 +0200 -+++ linux2300.c 2004-11-08 09:33:56.000000000 +0100 -@@ -13,6 +13,7 @@ - #ifndef WIN32 - #define DEBUG 0 - -+#include <errno.h> - #include "rw2300.h" - - /******************************************************************** -@@ -84,7 +85,7 @@ - exit(0); - } - -- tcflush(ws2300, TCIFLUSH); -+ tcflush(ws2300, TCIOFLUSH); - - // Set DTR low and RTS high and leave other ctrl lines untouched - -@@ -149,7 +150,7 @@ - - usleep(50000 * i); //we sleep longer and longer for each retry - } -- printf("\nCould not reset\n"); -+ fprintf(stderr, "\nCould not reset\n"); - exit(0); - } - -@@ -168,7 +169,14 @@ - ********************************************************************/ - int read_device(WEATHERSTATION serdevice, unsigned char *buffer, int size) - { -- return read(serdevice, buffer, size); -+ int ret; -+ -+ for (;;) { -+ ret = read(serdevice, buffer, size); -+ if (ret == 0 && errno == EINTR) -+ continue; -+ return ret; -+ } - } - - /******************************************************************** -@@ -184,7 +192,9 @@ - ********************************************************************/ - int write_device(WEATHERSTATION serdevice, unsigned char *buffer, int size) - { -- return write(serdevice, buffer, size); -+ int ret = write(serdevice, buffer, size); -+ tcdrain(serdevice); // wait for all output written -+ return ret; - } - - /******************************************************************** diff --git a/misc/open2300/patches/patch-ad b/misc/open2300/patches/patch-ad deleted file mode 100644 index dea5e49dbd9..00000000000 --- a/misc/open2300/patches/patch-ad +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-ad,v 1.2 2004/11/12 19:01:57 kristerw Exp $ - ---- rw2300.h.orig Sun Nov 7 12:18:45 2004 -+++ rw2300.h Fri Nov 12 19:57:46 2004 -@@ -20,7 +20,6 @@ - #include <stdio.h> - #include <time.h> - #include <stdlib.h> --#include <stdbool.h> - #include <math.h> - #include <sys/types.h> - #include <sys/stat.h> -@@ -283,14 +282,16 @@ - void reset_06(WEATHERSTATION ws2300); - - int read_data(WEATHERSTATION ws2300, int address, int number, -- unsigned char *readdata, unsigned char *commanddata); -+ unsigned char *readdata, unsigned char *commanddata, -+ int verify_checksum); - - int write_data(WEATHERSTATION ws2300, int address, int number, - unsigned char encode_constant, unsigned char *writedata, - unsigned char *commanddata); - - int read_safe(WEATHERSTATION ws2300, int address, int number, -- unsigned char *readdata, unsigned char *commanddata); -+ unsigned char *readdata, unsigned char *commanddata, -+ int verify_checksum); - - int write_safe(WEATHERSTATION ws2300, int address, int number, - unsigned char encode_constant, unsigned char *writedata, diff --git a/misc/open2300/patches/patch-ae b/misc/open2300/patches/patch-ae deleted file mode 100644 index 6d5ad0e3caa..00000000000 --- a/misc/open2300/patches/patch-ae +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ae,v 1.1 2004/11/11 10:19:29 martin Exp $ - ---- dump2300.c.orig 2004-04-23 17:36:24.000000000 +0200 -+++ dump2300.c 2004-11-10 23:53:23.000000000 +0100 -@@ -110,7 +110,7 @@ - } - - // Read the data. If expected number of bytes read break out of loop. -- if (read_data(ws2300, address, bytes, data, command)==bytes) -+ if (read_data(ws2300, address, bytes, data, command, 1)==bytes) - { - break; - } diff --git a/misc/open2300/patches/patch-af b/misc/open2300/patches/patch-af deleted file mode 100644 index fac74478210..00000000000 --- a/misc/open2300/patches/patch-af +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-af,v 1.1 2004/11/11 10:19:29 martin Exp $ - ---- history2300.c.orig 2004-04-23 17:36:58.000000000 +0200 -+++ history2300.c 2004-11-10 23:54:22.000000000 +0100 -@@ -102,7 +102,7 @@ - - - // Read the data. If expected number of bytes read break out of loop. -- if (read_data(ws2300, address, bytes, data, command)==bytes) -+ if (read_data(ws2300, address, bytes, data, command, 1)==bytes) - { - break; - } diff --git a/misc/open2300/patches/patch-ag b/misc/open2300/patches/patch-ag deleted file mode 100644 index 586b9ec346f..00000000000 --- a/misc/open2300/patches/patch-ag +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ag,v 1.1 2004/11/11 10:19:29 martin Exp $ - ---- bin2300.c.orig 2004-04-23 17:36:10.000000000 +0200 -+++ bin2300.c 2004-11-10 23:55:08.000000000 +0100 -@@ -109,7 +109,7 @@ - } - - // Read the data. If expected number of bytes read break out of loop. -- if (read_data(ws2300, address, bytes, data, command)==bytes) -+ if (read_data(ws2300, address, bytes, data, command, 1)==bytes) - { - break; - } diff --git a/misc/open2300/patches/patch-ah b/misc/open2300/patches/patch-ah deleted file mode 100644 index 2b3b60c9780..00000000000 --- a/misc/open2300/patches/patch-ah +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2004/11/11 10:19:30 martin Exp $ - ---- open2300.c.orig 2004-04-23 17:36:58.000000000 +0200 -+++ open2300.c 2004-11-10 23:57:57.000000000 +0100 -@@ -190,7 +190,7 @@ - reset_06(ws2300); - - // Read the data. If expected number of bytes read break out of loop. -- if (read_data(ws2300, address, bytes, data, command)==bytes) -+ if (read_data(ws2300, address, bytes, data, command, 1)==bytes) - { - break; - } |