From bb7be5efe6ef865faa525d6ada11c42ddcc8030e Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sat, 5 Jan 2019 23:16:11 +0000 Subject: [PATCH] Submitted by Martino Facchin: patch #9728: Fix UsbTiny programmer * usbtiny.c (usbtiny_initialize): Only consider pgm->program_enable successful if returning 0 git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1429 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 8 ++++++++ NEWS | 1 + usbtiny.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1bb1f105..98873aae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,3 +3,11 @@ Submitted by Milan Kupcevic: patch #9735: spelling error fix: psuedo -> pseudo * avrpart.c (avr_display): Spelling fix + +2019-01-05 Joerg Wunsch + + Submitted by Martino Facchin: + patch #9728: Fix UsbTiny programmer + * usbtiny.c (usbtiny_initialize): Only consider + pgm->program_enable successful if returning 0 + diff --git a/NEWS b/NEWS index a17af126..4781e31f 100644 --- a/NEWS +++ b/NEWS @@ -66,6 +66,7 @@ Current: patch #8128: Added new option to configure.ac script patch #8444: Proposal for modifications in -B and -U command options managment (partially) patch #9735: spelling error fix: psuedo -> pseudo + patch #9728: Fix UsbTiny programmer * Internals: - New avrdude.conf keyword "family_id", used to verify SIB attributes diff --git a/usbtiny.c b/usbtiny.c index 4d6da196..f28dd473 100644 --- a/usbtiny.c +++ b/usbtiny.c @@ -502,7 +502,7 @@ static int usbtiny_initialize (PROGRAMMER *pgm, AVRPART *p ) } for (tries = 0; tries < 4; ++tries) { - if (pgm->program_enable(pgm, p) >= 0) + if (pgm->program_enable(pgm, p) == 0) break; // no response, RESET and try again if (usb_control(pgm, USBTINY_POWERUP,