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