Oops - typo in the updated TeensyHID bootloader code when compiled for the non Teensy...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 6 May 2010 02:15:39 +0000 (02:15 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 6 May 2010 02:15:39 +0000 (02:15 +0000)
Bootloaders/TeensyHID/Descriptors.c
Bootloaders/TeensyHID/TeensyHID.c
Bootloaders/TeensyHID/makefile

index d421d90..52d6c73 100644 (file)
@@ -51,7 +51,7 @@ USB_Descriptor_HIDReport_Datatype_t HIDReport[] =
        0x0a, 0x19, 0x00,        /*   Usage (Vendor Defined)                        */\r
        0x75, 0x08,              /*   Report Size (8)                               */\r
 #if (SPM_PAGESIZE == 128)    /*   Report Count (SPM_PAGESIZE + 2)               */\r
-       0x95, (SPM_PAGESIZE + 2)\r
+       0x95, (SPM_PAGESIZE + 2),\r
 #else\r
        0x96, ((SPM_PAGESIZE + 2) & 0xFF), ((SPM_PAGESIZE + 2) >> 8),\r
 #endif\r
index 4e287bc..b93be6d 100644 (file)
@@ -120,7 +120,11 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
                                boot_spm_busy_wait();\r
                                \r
                                /* Write each of the FLASH page's bytes in sequence */\r
-                               for (uint16_t PageByte = 0; PageByte < SPM_PAGESIZE; PageByte += 2)\r
+                               #if (SPM_PAGESIZE == 128)\r
+                               for (uint8_t PageByte = 0; PageByte < SPM_PAGESIZE; PageByte += 2)                              \r
+                               #else\r
+                               for (uint16_t PageByte = 0; PageByte < SPM_PAGESIZE; PageByte += 2)                             \r
+                               #endif\r
                                {\r
                                        /* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
                                        if (!(Endpoint_BytesInEndpoint()))\r
index 0d12374..404b55f 100644 (file)
@@ -48,7 +48,7 @@
 \r
 \r
 # MCU name\r
-MCU = at90usb1287\r
+MCU = atmega32u4\r
 \r
 \r
 # Target board (see library "Board Types" documentation, NONE for projects not requiring\r
@@ -86,7 +86,7 @@ F_CLOCK = $(F_CPU)
 \r
 \r
 # Starting byte address of the bootloader\r
-BOOT_START = 0x1e000\r
+BOOT_START = 0x7000\r
 \r
 \r
 # Output format. (can be srec, ihex, binary)\r