FreeBSD Bugzilla – Attachment 101754 Details for
Bug 141385
[Maintainer Update] devel/picprog 0.8.1 -> 0.9.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel_picprog.patch
devel_picprog.patch (text/plain), 7.36 KB, created by
Erik Greenwald
on 2009-12-11 21:40:02 UTC
(
hide
)
Description:
devel_picprog.patch
Filename:
MIME Type:
Creator:
Erik Greenwald
Created:
2009-12-11 21:40:02 UTC
Size:
7.36 KB
patch
obsolete
>Index: devel/picprog/Makefile >=================================================================== >RCS file: /home/ncvs/ports/devel/picprog/Makefile,v >retrieving revision 1.17 >diff -u -r1.17 Makefile >--- devel/picprog/Makefile 25 Jul 2008 09:38:43 -0000 1.17 >+++ devel/picprog/Makefile 11 Dec 2009 21:35:24 -0000 >@@ -6,7 +6,7 @@ > # > > PORTNAME= picprog >-PORTVERSION= 1.8.1 >+PORTVERSION= 1.9.0 > CATEGORIES= devel > MASTER_SITES= http://hyvatti.iki.fi/~jaakko/pic/ > >Index: devel/picprog/distinfo >=================================================================== >RCS file: /home/ncvs/ports/devel/picprog/distinfo,v >retrieving revision 1.8 >diff -u -r1.8 distinfo >--- devel/picprog/distinfo 5 Jun 2006 13:47:17 -0000 1.8 >+++ devel/picprog/distinfo 11 Dec 2009 21:35:24 -0000 >@@ -1,3 +1,3 @@ >-MD5 (picprog-1.8.1.tar.gz) = 723369d679c5343af7b7dd5036299877 >-SHA256 (picprog-1.8.1.tar.gz) = 1e9e17a764611828a6af028cb1a6eda4abd6ad4c7fed17ca4b6ea246c74a4a19 >-SIZE (picprog-1.8.1.tar.gz) = 58040 >+MD5 (picprog-1.9.0.tar.gz) = a43e33b760952834052695fbbe31b0f1 >+SHA256 (picprog-1.9.0.tar.gz) = 1af3febb62855847a4de884c1a4d98c88f8d6c02f8193c876bce0b760c7606e6 >+SIZE (picprog-1.9.0.tar.gz) = 64398 >Index: devel/picprog/files/patch-main.cc >=================================================================== >RCS file: /home/ncvs/ports/devel/picprog/files/patch-main.cc,v >retrieving revision 1.3 >diff -u -r1.3 patch-main.cc >--- devel/picprog/files/patch-main.cc 13 Jul 2005 20:02:34 -0000 1.3 >+++ devel/picprog/files/patch-main.cc 11 Dec 2009 21:35:24 -0000 >@@ -1,49 +0,0 @@ >---- main.cc.orig Thu Apr 29 00:41:25 2004 >-+++ main.cc Fri Jul 8 22:02:29 2005 >-@@ -31,6 +31,7 @@ >- >- #include <sysexits.h> >- #include <unistd.h> >-+#define HAVE_DECL_GETOPT 1 >- #include <getopt.h> >- #include <string.h> >- >-@@ -41,7 +42,7 @@ >- >- program prog; >- >--char short_opts [] = "d:p:i:o:c:qh?"; >-+char short_opts [] = "d:p:i:o:c:qsh?"; >- >- int >- main (int argc, char **argv) >-@@ -52,7 +53,7 @@ >- int opt_usage = 0; >- >- int opt_format = hexfile::unknown; >-- char *opt_port = (char *)"/dev/ttyS0"; >-+ char *opt_port = (char *)"/dev/cuaa0"; >- char *opt_input = NULL; >- char *opt_output = NULL; >- char *opt_cc = NULL; >-@@ -81,6 +82,7 @@ >- {"erase", no_argument, &opt_erase, 1}, >- {"burn", no_argument, &opt_burn, 1}, >- {"force-calibration", no_argument, &opt_calibration, 1}, >-+ {"slow", no_argument, NULL, 's'}, >- {0, 0, 0, 0} >- }; >- >-@@ -113,6 +115,12 @@ >- case 'q': >- opt_quiet = 1; >- break; >-+ case 's': >-+ // Add extra delays for capacity added by very long cable >-+ picport::t_edge = 10; // 10 us >-+ picport::t_on = 200000; // 200 ms >-+ picport::t_off = 700000; // 700 ms - I'm not kidding ! >-+ break; >- default: // -? -h --help unknown flag >- opt_usage = 1; >- } >Index: devel/picprog/files/patch-picport.cc >=================================================================== >RCS file: /home/ncvs/ports/devel/picprog/files/patch-picport.cc,v >retrieving revision 1.5 >diff -u -r1.5 patch-picport.cc >--- devel/picprog/files/patch-picport.cc 13 Jul 2005 20:02:34 -0000 1.5 >+++ devel/picprog/files/patch-picport.cc 11 Dec 2009 21:35:24 -0000 >@@ -1,89 +1,19 @@ >---- picport.cc.orig Thu Apr 29 00:08:10 2004 >-+++ picport.cc Fri Jul 8 21:46:07 2005 >-@@ -40,7 +40,7 @@ >- #include <unistd.h> >- #include <termios.h> >- #include <sysexits.h> >--#include <string.h> >-+#include <string> >- #include <sched.h> >+--- picport.cc.orig 2009-12-11 16:33:39.000000000 -0500 >++++ picport.cc 2009-12-11 16:33:53.000000000 -0500 >+@@ -33,7 +33,6 @@ >+ #include <string> > >- #include "picport.h" >-@@ -54,6 +54,11 @@ >- unsigned int picport::tsc_1000ns = 0; >- int picport::use_nanosleep = -1; >- >-+// Extra delays for long cables, in us >-+int picport::t_on = 0; >-+int picport::t_off = 0; >-+int picport::t_edge = 0; >-+ >- void >- picport::set_clock_data (int rts, int dtr) >- { >-@@ -102,7 +107,7 @@ >- // Before first call to set_clock_data, read the modem status. >- ioctl (fd, TIOCMGET, &modembits); >- set_clock_data (0, 0); >-- usleep (50); >-+ usleep (50+t_edge); >- // Check the CTS. If it is up, even when we just lowered DTR, >- // we probably are not talking to a JDM type programmer. >- int i; >-@@ -200,13 +205,13 @@ >- cerr << "Unable to start break on tty " << tty << ":" << strerror (e) << endl; >- exit (EX_IOERR); >- } >-- usleep (10); >-+ usleep (10+t_off); >- } >- >- picport::~picport () >- { >- ioctl (fd, TIOCCBRK, 0); >-- usleep (1); >-+ usleep (1+t_off); >- tcsetattr (fd, TCSANOW, &saved); >- close (fd); >- delete [] portname; >-@@ -216,15 +221,15 @@ >- { >- set_clock_data (0, 0); >- ioctl (fd, TIOCCBRK, 0); >-- usleep (50); >-+ usleep (50+t_off); >- ioctl (fd, TIOCSBRK, 0); >-- usleep (10); >-+ usleep (10+t_on); >- addr = 0; >- } >- >- void picport::delay (long ns) >- { >-- if (1 == use_nanosleep) { >-+ if (1 == use_nanosleep && !t_edge) { >- timespec ts = {ns / 1000000000, ns % 1000000000}, ts2; >- while (nanosleep (&ts, &ts2) && EINTR == errno) >- ts = ts2; >-@@ -232,7 +237,7 @@ >+ #include <sys/ioctl.h> >+-#include <sys/io.h> >+ #include <fcntl.h> >+ #include <errno.h> >+ #include <time.h> >+@@ -159,8 +158,6 @@ >+ // Not root. Cannot use realtime scheduling. >+ use_nanosleep = 0; > } >+- if (iopl (3)) >+- disable_interrupts = 0; > >- #ifdef RDTSC_WORKS >-- if (tsc_1000ns > 1) { >-+ if (tsc_1000ns > 1 && !t_edge) { >- unsigned long a1, d1, a2, d2; >- asm volatile("rdtsc":"=a" (a1), "=d" (d1)); >- d2 = d1; >-@@ -259,10 +264,10 @@ >- volatile int i; >- gettimeofday (&tv1, 0); >- tv2.tv_sec = tv1.tv_sec; >-- tv2.tv_usec = 0xffffffff & (tv1.tv_usec + 1 + (ns + 999)/1000); >-+ tv2.tv_usec = 0xffffffff & (tv1.tv_usec + 1 + (ns + 999)/1000+t_edge); >- if (tv2.tv_usec < tv1.tv_usec) >- tv2.tv_sec++; >-- for (i = 0; i < 10000; i++) { >-+ for (i = 0; i < 10000 || t_edge; i++) { >- gettimeofday (&tv1, 0); >- if (tv1.tv_sec > tv2.tv_sec >- || tv1.tv_sec == tv2.tv_sec && tv1.tv_usec >= tv2.tv_usec) >+ #ifdef CPU_SETSIZE >+ // When computing the delay loops, we do not want the cpu's to change. >Index: devel/picprog/files/patch-picport.h >=================================================================== >RCS file: /home/ncvs/ports/devel/picprog/files/patch-picport.h,v >retrieving revision 1.2 >diff -u -r1.2 patch-picport.h >--- devel/picprog/files/patch-picport.h 16 Dec 2006 09:28:22 -0000 1.2 >+++ devel/picprog/files/patch-picport.h 11 Dec 2009 21:35:24 -0000 >@@ -1,22 +0,0 @@ >---- picport.h.orig Wed Jul 14 01:24:34 2004 >-+++ picport.h Fri Dec 15 16:43:35 2006 >-@@ -45,7 +45,7 @@ >- int W[16]; >- >- int modembits; >-- void picport::set_clock_data (int rts, int dtr); >-+ void set_clock_data (int rts, int dtr); >- >- void p_out (int b); >- int p_in (); >-@@ -58,6 +58,10 @@ >- static int use_nanosleep; >- >- public: >-+ >-+ static int t_on; >-+ static int t_off; >-+ static int t_edge; >- >- static void delay (long ns); >- >Index: devel/picprog/files/patch-program.h >=================================================================== >RCS file: /home/ncvs/ports/devel/picprog/files/patch-program.h,v >retrieving revision 1.3 >diff -u -r1.3 patch-program.h >--- devel/picprog/files/patch-program.h 13 Jul 2005 20:02:34 -0000 1.3 >+++ devel/picprog/files/patch-program.h 11 Dec 2009 21:35:24 -0000 >@@ -1,10 +0,0 @@ >---- program.h.orig Thu Jan 1 20:35:09 2004 >-+++ program.h Fri Jul 8 21:44:23 2005 >-@@ -30,6 +30,7 @@ >- #ifndef H_PROGRAM >- #define H_PROGRAM >- >-+#define HAVE_DECL_GETOPT 1 >- #include <getopt.h> >- >- class program {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 141385
: 101754