From: Stephan Baerwolf Date: Sat, 9 Nov 2013 11:21:51 +0000 (+0100) Subject: BUGfix: wrong configuration selection by incomplete macro X-Git-Tag: testing-head~9 X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/commitdiff_plain/fda4f3c777fd656867e398b3bc38f2a3e18df5ed?ds=inline 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 --- 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