Tentative fix for bug #16156: Problem with Si-Prog

Disable reset before closing.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@633 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2006-08-31 10:55:20 +00:00
parent fd71b3e437
commit 3a4ec709ff
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-08-31 Joerg Wunsch <j@uriah.heep.sax.de>
Tentative fix for bug #16156: Problem with Si-Prog
* serbb_posix.c: Disable reset before closing.
* serbb_win32.c: (Ditto.)
2006-08-30 Joerg Wunsch <j@uriah.heep.sax.de> 2006-08-30 Joerg Wunsch <j@uriah.heep.sax.de>
Rewrite the serbb code so the pin numbering matches the Rewrite the serbb code so the pin numbering matches the

View File

@ -240,8 +240,13 @@ static int serbb_open(PROGRAMMER *pgm, char *port)
} }
static void serbb_close(PROGRAMMER *pgm) static void serbb_close(PROGRAMMER *pgm)
{
if (pgm->fd != -1)
{ {
tcsetattr(pgm->fd, TCSANOW, &oldmode); tcsetattr(pgm->fd, TCSANOW, &oldmode);
pgm->setpin(pgm, pgm->pinno[PIN_AVR_RESET], 1);
close(pgm->fd);
}
return; return;
} }

View File

@ -334,7 +334,10 @@ static void serbb_close(PROGRAMMER *pgm)
{ {
HANDLE hComPort=(HANDLE)pgm->fd; HANDLE hComPort=(HANDLE)pgm->fd;
if (hComPort != INVALID_HANDLE_VALUE) if (hComPort != INVALID_HANDLE_VALUE)
{
pgm->setpin(pgm, pgm->pinno[PIN_AVR_RESET], 1);
CloseHandle (hComPort); CloseHandle (hComPort);
}
if (verbose > 2) if (verbose > 2)
fprintf(stderr, fprintf(stderr,
"%s: ser_close(): closed comm port handle 0x%x\n", "%s: ser_close(): closed comm port handle 0x%x\n",