BUGfix: wrong configuration selection by incomplete macro
authorStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sat, 9 Nov 2013 11:21:51 +0000 (12:21 +0100)
committerStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sat, 9 Nov 2013 11:28:49 +0000 (11:28 +0000)
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 <stephan.baerwolf@tu-ilmenau.de>
firmware/bootloaderconfig.h

index d4ce8ec..29a5a74 100644 (file)
@@ -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