Make the retrier in case of rx timeouts more robust, by increasing

the receive timeout once a timeout happened.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@458 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2005-05-11 16:58:12 +00:00
parent bc4ae31394
commit f827a94c0f
1 changed files with 6 additions and 2 deletions

View File

@ -1234,8 +1234,10 @@ static int jtagmkII_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
"%s: jtagmkII_paged_write(): " "%s: jtagmkII_paged_write(): "
"timeout/error communicating with programmer (status %d)\n", "timeout/error communicating with programmer (status %d)\n",
progname, status); progname, status);
if (tries++ < 3) if (tries++ < 4) {
serial_recv_timeout *= 2;
goto retry; goto retry;
}
fprintf(stderr, fprintf(stderr,
"%s: jtagmkII_paged_write(): fatal timeout/" "%s: jtagmkII_paged_write(): fatal timeout/"
"error communicating with programmer (status %d)\n", "error communicating with programmer (status %d)\n",
@ -1326,8 +1328,10 @@ static int jtagmkII_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
"%s: jtagmkII_paged_load(): " "%s: jtagmkII_paged_load(): "
"timeout/error communicating with programmer (status %d)\n", "timeout/error communicating with programmer (status %d)\n",
progname, status); progname, status);
if (tries++ < 3) if (tries++ < 4) {
serial_recv_timeout *= 2;
goto retry; goto retry;
}
fprintf(stderr, fprintf(stderr,
"%s: jtagmkII_paged_load(): fatal timeout/" "%s: jtagmkII_paged_load(): fatal timeout/"
"error communicating with programmer (status %d)\n", "error communicating with programmer (status %d)\n",