From 4c52dfc91167aed87c44fa595d99b88d16629613 Mon Sep 17 00:00:00 2001 From: Eric Weddington Date: Thu, 20 Feb 2003 18:09:57 +0000 Subject: [PATCH] Add error message for fail to enter programming mode. Fix typos. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@203 81a1dc3b-b13d-400b-aceb-764788c761c2 --- stk500.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/stk500.c b/stk500.c index 858bd1eb..c4dd00e2 100644 --- a/stk500.c +++ b/stk500.c @@ -387,7 +387,16 @@ static int stk500_program_enable(PROGRAMMER * pgm, AVRPART * p) return -1; } - fprintf(stderr, "%s: stk500_program_enable(): unkown response=0x%02x\n", + if(buf[0] == Resp_STK_FAILED) + { + fprintf(stderr, + "%s: stk500_program_enable(): failed to enter programming mode\n", + progname); + return -1; + } + + + fprintf(stderr, "%s: stk500_program_enable(): unknown response=0x%02x\n", progname, buf[0]); return -1; @@ -585,7 +594,7 @@ static void stk500_disable(PROGRAMMER * pgm) return; } - fprintf(stderr, "%s: stk500_disable(): unkown response=0x%02x\n", + fprintf(stderr, "%s: stk500_disable(): unknown response=0x%02x\n", progname, buf[0]); return;