Make verbose global. Make debug code in par_cmd() based on verbose=2.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@211 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
5c554ef79d
commit
36d980ee58
2
main.c
2
main.c
|
@ -91,6 +91,7 @@
|
|||
|
||||
char * version = "3.1.0";
|
||||
|
||||
int verbose; /* verbose output */
|
||||
char * progname;
|
||||
char progbuf[PATH_MAX]; /* temporary buffer of spaces the same
|
||||
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 ppiclrbits; /* bits to clear in ppi data register at exit */
|
||||
char * exitspecs; /* exit specs string from command line */
|
||||
int verbose; /* verbose output */
|
||||
char * pinconfig; /* programmer id */
|
||||
char * partdesc; /* part id */
|
||||
char configfile[PATH_MAX]; /* pin configuration file */
|
||||
|
|
14
par.c
14
par.c
|
@ -74,6 +74,7 @@ static struct ppipins_t pins[] = {
|
|||
|
||||
extern char * progname;
|
||||
extern int do_cycles;
|
||||
extern int verbose;
|
||||
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
#if 0
|
||||
fprintf(stderr, "avr_cmd(): [ ");
|
||||
if(verbose >= 2)
|
||||
{
|
||||
fprintf(stderr, "par_cmd(): [ ");
|
||||
for(i = 0; i < 4; i++)
|
||||
fprintf(stderr, "%02x ", cmd[i]);
|
||||
fprintf(stderr, "%02X ", cmd[i]);
|
||||
fprintf(stderr, "] [ ");
|
||||
for(i = 0; i < 4; i++)
|
||||
fprintf(stderr, "%02x ", res[i]);
|
||||
{
|
||||
fprintf(stderr, "%02X ", res[i]);
|
||||
}
|
||||
fprintf(stderr, "]\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue