From 112b6edd1c812e131763c7e61d7fafc7faed6992 Mon Sep 17 00:00:00 2001 From: David Fries Date: Thu, 1 Jan 2015 19:08:14 -0600 Subject: [PATCH] Set back to programming mode on quit Otherwise it can't read the fuses and the safe fuse code complains. --- src/term.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/term.c b/src/term.c index 96bf2bce..5c91931c 100644 --- a/src/term.c +++ b/src/term.c @@ -541,6 +541,10 @@ static int cmd_sig(PROGRAMMER * pgm, struct avrpart * p, static int cmd_quit(PROGRAMMER * pgm, struct avrpart * p, int argc, char * argv[]) { + /* FUSE bit verify will fail if left in SPI mode */ + if (spi_mode) { + cmd_pgm(pgm, p, 0, NULL); + } return 1; }