Submitted by Soren Jorvang:

bug #28611: -i delay not being applied to all serial port
bit banging state transitions
* serbb_win32.c: Apply ispdelay everywhere.
* serbb_posix.c: (Dito.)




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@917 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2010-01-15 16:40:17 +00:00
parent 46715b4296
commit cd5a2a9a47
3 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,11 @@
2010-01-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Soren Jorvang:
bug #28611: -i delay not being applied to all serial port
bit banging state transitions
* serbb_win32.c: Apply ispdelay everywhere.
* serbb_posix.c: (Dito.)
2010-01-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* stk500v2_private.h: Implement TPI mode for AVRISPmkII/STK600

View File

@ -97,7 +97,7 @@ static int serbb_setpin(PROGRAMMER * pgm, int pin, int value)
perror("ioctl(\"TIOCxBRK\")");
return -1;
}
return 0;
break;
case 4: /* dtr */
case 7: /* rts */
@ -115,11 +115,16 @@ static int serbb_setpin(PROGRAMMER * pgm, int pin, int value)
perror("ioctl(\"TIOCMSET\")");
return -1;
}
return 0;
break;
default: /* impossible */
return -1;
}
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
return 0;
}
static int serbb_getpin(PROGRAMMER * pgm, int pin)
@ -178,12 +183,7 @@ static int serbb_highpulsepin(PROGRAMMER * pgm, int pin)
return -1;
serbb_setpin(pgm, pin, 1);
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
serbb_setpin(pgm, pin, 0);
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
return 0;
}

View File

@ -125,6 +125,10 @@ static int serbb_setpin(PROGRAMMER * pgm, int pin, int value)
LocalFree(lpMsgBuf);
exit(1);
}
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
return 0;
}
@ -227,12 +231,7 @@ static int serbb_highpulsepin(PROGRAMMER * pgm, int pin)
return -1;
serbb_setpin(pgm, pin, 1);
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
serbb_setpin(pgm, pin, 0);
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
return 0;
}