From fda4f3c777fd656867e398b3bc38f2a3e18df5ed Mon Sep 17 00:00:00 2001 From: Stephan Baerwolf Date: Sat, 9 Nov 2013 12:21:51 +0100 Subject: [PATCH] BUGfix: wrong configuration selection by incomplete macro As datasheet for ATmega128 (http://www.atmel.com/Images/doc2467.pdf) indicates, INT0 is located at PD0 instead of PD2. So "USB_CFG_INTPORT_BIT" is the same as for ATmega640, ATmega1280, ATmega1281, ATmega2560 and ATmega2561. Special thanks to trkien, who indirectly indicated this BUG to me in: http://forums.obdev.at/viewtopic.php?f=8&t=8691&sid=020c08aa877e11fdd65d9b1638ac5bd3#p26140 Signed-off-by: Stephan Baerwolf --- firmware/bootloaderconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index d4ce8ec..29a5a74 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -57,7 +57,7 @@ these macros are defined, the boot loader usees them. * "B", the registers PORTB, PINB and DDRB will be used. */ #ifndef USB_CFG_INTPORT_BIT - #if (defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__)) + #if (defined(__AVR_ATmega640__) || defined (__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__)) #define USB_CFG_INTPORT_BIT 0 #else #define USB_CFG_INTPORT_BIT 2 -- 2.11.0