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 77e0502890
commit d8cf3f8d44
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> 2010-01-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* stk500v2_private.h: Implement TPI mode for AVRISPmkII/STK600 * 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\")"); perror("ioctl(\"TIOCxBRK\")");
return -1; return -1;
} }
return 0; break;
case 4: /* dtr */ case 4: /* dtr */
case 7: /* rts */ case 7: /* rts */
@ -115,11 +115,16 @@ static int serbb_setpin(PROGRAMMER * pgm, int pin, int value)
perror("ioctl(\"TIOCMSET\")"); perror("ioctl(\"TIOCMSET\")");
return -1; return -1;
} }
return 0; break;
default: /* impossible */ default: /* impossible */
return -1; return -1;
} }
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
return 0;
} }
static int serbb_getpin(PROGRAMMER * pgm, int pin) static int serbb_getpin(PROGRAMMER * pgm, int pin)
@ -178,12 +183,7 @@ static int serbb_highpulsepin(PROGRAMMER * pgm, int pin)
return -1; return -1;
serbb_setpin(pgm, pin, 1); serbb_setpin(pgm, pin, 1);
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
serbb_setpin(pgm, pin, 0); serbb_setpin(pgm, pin, 0);
if (pgm->ispdelay > 1)
bitbang_delay(pgm->ispdelay);
return 0; return 0;
} }

View File

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