Fix TeensyHID bootloader for the largest AVRs - only the ATMEGA128x needs the alternative addressing scheme.

This commit is contained in:
Dean Camera 2010-05-07 06:48:27 +00:00
parent 27eb17cb93
commit 2a2de8fea9
3 changed files with 11 additions and 10 deletions

View file

@ -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 */