From 2f65672dfc65831bfb362da11605fdd19109d7cf Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sun, 22 Jul 2012 09:52:55 -0300 Subject: [PATCH] avrdude/patches/nanonote.patch: fix pin inversion in nanonote.c:nanonote_getpin --- avrdude/patches/nanonote.patch | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/avrdude/patches/nanonote.patch b/avrdude/patches/nanonote.patch index 66baed6..e265f61 100644 --- a/avrdude/patches/nanonote.patch +++ b/avrdude/patches/nanonote.patch @@ -1,7 +1,7 @@ -Index: avrdude/Makefile.am +Index: avrdude-5.10/Makefile.am =================================================================== ---- avrdude.orig/Makefile.am 2011-03-07 16:50:03.000000000 -0300 -+++ avrdude/Makefile.am 2011-03-07 16:50:06.000000000 -0300 +--- avrdude-5.10.orig/Makefile.am 2012-07-22 02:37:03.193005002 -0300 ++++ avrdude-5.10/Makefile.am 2012-07-22 09:49:49.796758405 -0300 @@ -111,6 +111,8 @@ lists.c \ lists.h \ @@ -11,10 +11,10 @@ Index: avrdude/Makefile.am par.c \ par.h \ pgm.c \ -Index: avrdude/config_gram.y +Index: avrdude-5.10/config_gram.y =================================================================== ---- avrdude.orig/config_gram.y 2011-03-07 16:50:03.000000000 -0300 -+++ avrdude/config_gram.y 2011-03-07 16:50:06.000000000 -0300 +--- avrdude-5.10.orig/config_gram.y 2012-07-22 09:49:49.768757480 -0300 ++++ avrdude-5.10/config_gram.y 2012-07-22 09:49:49.796758405 -0300 @@ -48,6 +48,7 @@ #include "avr.h" #include "jtagmkI.h" @@ -44,10 +44,10 @@ Index: avrdude/config_gram.y K_DESC TKN_EQUAL TKN_STRING { strncpy(current_prog->desc, $3->value.string, PGM_DESCLEN); current_prog->desc[PGM_DESCLEN-1] = 0; -Index: avrdude/lexer.l +Index: avrdude-5.10/lexer.l =================================================================== ---- avrdude.orig/lexer.l 2011-03-07 16:50:03.000000000 -0300 -+++ avrdude/lexer.l 2011-03-07 16:50:06.000000000 -0300 +--- avrdude-5.10.orig/lexer.l 2012-07-22 02:37:03.181004582 -0300 ++++ avrdude-5.10/lexer.l 2012-07-22 09:49:49.796758405 -0300 @@ -164,6 +164,7 @@ min_write_delay { yylval=NULL; return K_MIN_WRITE_DELAY; } miso { yylval=NULL; return K_MISO; } @@ -56,10 +56,10 @@ Index: avrdude/lexer.l num_banks { yylval=NULL; return K_NUM_PAGES; } num_pages { yylval=NULL; return K_NUM_PAGES; } nvm_base { yylval=NULL; return K_NVM_BASE; } -Index: avrdude/nanonote.c +Index: avrdude-5.10/nanonote.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ avrdude/nanonote.c 2011-03-07 17:07:16.000000000 -0300 ++++ avrdude-5.10/nanonote.c 2012-07-22 09:50:12.621513588 -0300 @@ -0,0 +1,374 @@ +/* + * avrdude - A Downloader/Uploader for AVR device programmers @@ -258,7 +258,7 @@ Index: avrdude/nanonote.c +fprintf(stderr, "pin %d (%u, %u): %d\n", +pin, pin_map[pin].port, pin_map[pin].bit, v); +#endif -+ return pin & PIN_INVERSE ? !v : v; ++ return invert ? !v : v; +} + + @@ -435,10 +435,10 @@ Index: avrdude/nanonote.c + } + PDATA(pgm)->clk = 0; +} -Index: avrdude/nanonote.h +Index: avrdude-5.10/nanonote.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ avrdude/nanonote.h 2011-03-07 16:50:06.000000000 -0300 ++++ avrdude-5.10/nanonote.h 2012-07-22 09:49:49.796758405 -0300 @@ -0,0 +1,6 @@ +#ifndef nanonote_h +#define nanonote_h