2007-05-01 Colin O'Flynn <coflynn@newae.com>
safemode.c: added verbose output git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@732 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
914e2ed3ec
commit
7d0d997877
|
@ -1,3 +1,6 @@
|
|||
2007-05-01 Colin O'Flynn <coflynn@newae.com>
|
||||
* safemode.c: Added verbose output from safemode routines.
|
||||
|
||||
2007-03-25 Colin O'Flynn <coflynn@newae.com>
|
||||
|
||||
* stk500generic.c: Forgot to close the serial port before trying to
|
||||
|
|
48
safemode.c
48
safemode.c
|
@ -108,15 +108,27 @@ int safemode_readfuses (unsigned char * lfuse, unsigned char * hfuse,
|
|||
{
|
||||
safemode_fuse = 1 + value; //failed - ensure they differ
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 1, fuse value: %x\n",progname, safemode_fuse);
|
||||
}
|
||||
if(pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = 1 + safemode_fuse; //failed - ensure they differ
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 2, fuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_fuse) {
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = 1 + safemode_fuse;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 3, fuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_fuse)
|
||||
{
|
||||
fusegood = 1; /* Fuse read OK three times */
|
||||
|
@ -145,15 +157,27 @@ int safemode_readfuses (unsigned char * lfuse, unsigned char * hfuse,
|
|||
{
|
||||
safemode_lfuse = 1 + value;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 1, lfuse value: %x\n",progname, safemode_fuse);
|
||||
}
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = safemode_lfuse + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 2, lfuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_lfuse) {
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = safemode_lfuse + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 3, lfuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_lfuse){
|
||||
fusegood = 1; /* Fuse read OK three times */
|
||||
}
|
||||
|
@ -180,15 +204,27 @@ int safemode_readfuses (unsigned char * lfuse, unsigned char * hfuse,
|
|||
{
|
||||
safemode_hfuse = value + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 1, hfuse value: %x\n",progname, safemode_fuse);
|
||||
}
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = safemode_hfuse + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 2, hfuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_hfuse) {
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = safemode_hfuse + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 3, hfuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_hfuse){
|
||||
fusegood = 1; /* Fuse read OK three times */
|
||||
}
|
||||
|
@ -215,15 +251,27 @@ int safemode_readfuses (unsigned char * lfuse, unsigned char * hfuse,
|
|||
{
|
||||
safemode_efuse = value + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 1, efuse value: %x\n",progname, safemode_fuse);
|
||||
}
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = safemode_efuse + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 2, efuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_efuse) {
|
||||
if (pgm->read_byte(pgm, p, m, 0, &value) != 0)
|
||||
{
|
||||
value = safemode_efuse + 1;
|
||||
}
|
||||
if (verbose > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: safemode read 3, efuse value: %x\n",progname, value);
|
||||
}
|
||||
if (value == safemode_efuse){
|
||||
fusegood = 1; /* Fuse read OK three times */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue