Make verbose global. Make debug code in par_cmd() based on verbose=2.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@211 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
988a0c60cb
commit
405decb3b0
|
@ -91,6 +91,7 @@
|
||||||
|
|
||||||
char * version = "3.1.0";
|
char * version = "3.1.0";
|
||||||
|
|
||||||
|
int verbose; /* verbose output */
|
||||||
char * progname;
|
char * progname;
|
||||||
char progbuf[PATH_MAX]; /* temporary buffer of spaces the same
|
char progbuf[PATH_MAX]; /* temporary buffer of spaces the same
|
||||||
length as progname; used for lining up
|
length as progname; used for lining up
|
||||||
|
@ -294,7 +295,6 @@ int main(int argc, char * argv [])
|
||||||
int ppisetbits; /* bits to set in ppi data register at exit */
|
int ppisetbits; /* bits to set in ppi data register at exit */
|
||||||
int ppiclrbits; /* bits to clear in ppi data register at exit */
|
int ppiclrbits; /* bits to clear in ppi data register at exit */
|
||||||
char * exitspecs; /* exit specs string from command line */
|
char * exitspecs; /* exit specs string from command line */
|
||||||
int verbose; /* verbose output */
|
|
||||||
char * pinconfig; /* programmer id */
|
char * pinconfig; /* programmer id */
|
||||||
char * partdesc; /* part id */
|
char * partdesc; /* part id */
|
||||||
char configfile[PATH_MAX]; /* pin configuration file */
|
char configfile[PATH_MAX]; /* pin configuration file */
|
||||||
|
|
|
@ -74,6 +74,7 @@ static struct ppipins_t pins[] = {
|
||||||
|
|
||||||
extern char * progname;
|
extern char * progname;
|
||||||
extern int do_cycles;
|
extern int do_cycles;
|
||||||
|
extern int verbose;
|
||||||
|
|
||||||
|
|
||||||
static int par_setpin (int fd, int pin, int value);
|
static int par_setpin (int fd, int pin, int value);
|
||||||
|
@ -294,15 +295,18 @@ static int par_cmd(PROGRAMMER * pgm, unsigned char cmd[4],
|
||||||
res[i] = par_txrx(pgm, cmd[i]);
|
res[i] = par_txrx(pgm, cmd[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
if(verbose >= 2)
|
||||||
fprintf(stderr, "avr_cmd(): [ ");
|
{
|
||||||
for (i=0; i<4; i++)
|
fprintf(stderr, "par_cmd(): [ ");
|
||||||
fprintf(stderr, "%02x ", cmd[i]);
|
for(i = 0; i < 4; i++)
|
||||||
fprintf(stderr, "] [ ");
|
fprintf(stderr, "%02X ", cmd[i]);
|
||||||
for (i=0; i<4; i++)
|
fprintf(stderr, "] [ ");
|
||||||
fprintf(stderr, "%02x ", res[i]);
|
for(i = 0; i < 4; i++)
|
||||||
fprintf(stderr, "]\n");
|
{
|
||||||
#endif
|
fprintf(stderr, "%02X ", res[i]);
|
||||||
|
}
|
||||||
|
fprintf(stderr, "]\n");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue