diff --git a/Bootloaders/TeensyHID/Descriptors.h b/Bootloaders/TeensyHID/Descriptors.h
index f72dec2510..8ef964d2af 100644
--- a/Bootloaders/TeensyHID/Descriptors.h
+++ b/Bootloaders/TeensyHID/Descriptors.h
@@ -96,15 +96,16 @@
/** Vendor usage page for the Teensy++ 2.0 board */
#define TEENSY_USAGEPAGE_20PP 0x1C
- #if defined(USB_SERIES_2_AVR)
+ #if (defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__))
#define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_10
- #elif defined(USB_SERIES_4_AVR)
+ #elif defined(__AVR_ATmega32U4__)
#define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_20
- #define TEENSY_USAGE TEENSY_USAGE_20
- #elif defined(USB_SERIES_6_AVR)
+ #elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__))
#define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_10PP
- #elif defined(USB_SERIES_7_AVR)
+ #elif (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__))
#define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_20PP
+ #else
+ #error The selected AVR model is not currently supported by the TeensyHID bootloader.
#endif
/* Function Prototypes: */
diff --git a/Bootloaders/TeensyHID/TeensyHID.c b/Bootloaders/TeensyHID/TeensyHID.c
index ff28927b4b..ffbaca8b32 100644
--- a/Bootloaders/TeensyHID/TeensyHID.c
+++ b/Bootloaders/TeensyHID/TeensyHID.c
@@ -115,10 +115,10 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
}
else
{
- #if (SPM_PAGESIZE == 128)
- uint16_t PageByteAddress = PageIndex;
- #else
+ #if (FLASHEND > 0xFFFF)
uint32_t PageByteAddress = ((uint32_t)PageIndex << 8);
+ #else
+ uint16_t PageByteAddress = PageIndex;
#endif
/* Erase the given FLASH page, ready to be programmed */
diff --git a/LUFA/ManPages/AlternativeStacks.txt b/LUFA/ManPages/AlternativeStacks.txt
index 28176ce480..0ce9150f5a 100644
--- a/LUFA/ManPages/AlternativeStacks.txt
+++ b/LUFA/ManPages/AlternativeStacks.txt
@@ -43,8 +43,8 @@
* via a bit-banged (emulated) version of the USB protocol. They are limited in their capabilities due to the cycles required
* to be dedicated to managing the USB bus, but offer a cheap way to implement USB functionality into a design.
*
- * - Name: AVR309: Software USB (Objective Development) \n
- * Cost: Free for some uses, see website for licensing \n
+ * - Name: AVR309: Software USB (Atmel) \n
+ * Cost: Free \n
* License: None Stated \n
* Website: http://www.atmel.com/dyn/Products/app_notes.asp?family_id=607 \n
* Description: Atmel's official software USB implementation, an Application Note containing work by Igor Cesko. This