forked from mfulz_github/qmk_firmware
Fix TeensyHID bootloader for the largest AVRs - only the ATMEGA128x needs the alternative addressing scheme.
This commit is contained in:
parent
27eb17cb93
commit
2a2de8fea9
|
@ -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: */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* - <b>Name:</b> AVR309: Software USB (<i>Objective Development</i>) \n
|
||||
* <b>Cost:</b> Free for some uses, see website for licensing \n
|
||||
* - <b>Name:</b> AVR309: Software USB (<i>Atmel</i>) \n
|
||||
* <b>Cost:</b> Free \n
|
||||
* <b>License:</b> None Stated \n
|
||||
* <b>Website:</b> http://www.atmel.com/dyn/Products/app_notes.asp?family_id=607 \n
|
||||
* <b>Description:</b> Atmel's official software USB implementation, an Application Note containing work by Igor Cesko. This
|
||||
|
|
Loading…
Reference in New Issue