Fix TeensyHID bootloader for the largest AVRs - only the ATMEGA128x needs the alternative addressing scheme.
This commit is contained in:
parent
27eb17cb93
commit
2a2de8fea9
3 changed files with 11 additions and 10 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue