aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/TeensyHID/TeensyHID.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-05-07 06:48:27 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-05-07 06:48:27 +0000
commit2a2de8fea94d2a524e988725585b17746cd30dba (patch)
treea0fbba8939a0dac602d148eb8d0bf9b38b7874eb /Bootloaders/TeensyHID/TeensyHID.c
parent27eb17cb934dcd3807bacdfe87f853e32f0cfdb4 (diff)
downloadlufa-2a2de8fea94d2a524e988725585b17746cd30dba.tar.gz
lufa-2a2de8fea94d2a524e988725585b17746cd30dba.tar.bz2
lufa-2a2de8fea94d2a524e988725585b17746cd30dba.zip
Fix TeensyHID bootloader for the largest AVRs - only the ATMEGA128x needs the alternative addressing scheme.
Diffstat (limited to 'Bootloaders/TeensyHID/TeensyHID.c')
-rw-r--r--Bootloaders/TeensyHID/TeensyHID.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bootloaders/TeensyHID/TeensyHID.c b/Bootloaders/TeensyHID/TeensyHID.c
index ff28927b4..ffbaca8b3 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 */