aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/TeensyHID/Descriptors.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-05-06 02:06:12 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-05-06 02:06:12 +0000
commit298592383ad2a98922064a0d183390e896856483 (patch)
treef09ed904cb4954e5c86c1a8c6b45cae519faa55e /Bootloaders/TeensyHID/Descriptors.c
parentfc31973daffea3506051ce51a5f79383ce0867d6 (diff)
downloadlufa-298592383ad2a98922064a0d183390e896856483.tar.gz
lufa-298592383ad2a98922064a0d183390e896856483.tar.bz2
lufa-298592383ad2a98922064a0d183390e896856483.zip
Fixed TeensyHID bootloader so that it works with the official TeensyLoader GUI application with all supported AVR models.
Diffstat (limited to 'Bootloaders/TeensyHID/Descriptors.c')
-rw-r--r--Bootloaders/TeensyHID/Descriptors.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/Bootloaders/TeensyHID/Descriptors.c b/Bootloaders/TeensyHID/Descriptors.c
index 9cd987c4d..d421d90f4 100644
--- a/Bootloaders/TeensyHID/Descriptors.c
+++ b/Bootloaders/TeensyHID/Descriptors.c
@@ -45,16 +45,20 @@
*/
USB_Descriptor_HIDReport_Datatype_t HIDReport[] =
{
- 0x06, 0x9c, 0xff, /* Usage Page (Vendor Defined) */
- 0x09, 0x1B, /* Usage (Vendor Defined) */
- 0xa1, 0x01, /* Collection (Vendor Defined) */
- 0x0a, 0x19, 0x00, /* Usage (Vendor Defined) */
- 0x75, 0x08, /* Report Size (8) */
- 0x95, 0x82, /* Report Count (130) */
- 0x15, 0x00, /* Logical Minimum (0) */
- 0x25, 0xff, /* Logical Maximum (255) */
- 0x91, 0x02, /* Output (Data, Variable, Absolute) */
- 0xc0 /* End Collection */
+ 0x06, 0x9c, 0xff, /* Usage Page (Vendor Defined) */
+ 0x09, TEENSY_USAGEPAGE, /* Usage (Vendor Defined) */
+ 0xa1, 0x01, /* Collection (Vendor Defined) */
+ 0x0a, 0x19, 0x00, /* Usage (Vendor Defined) */
+ 0x75, 0x08, /* Report Size (8) */
+#if (SPM_PAGESIZE == 128) /* Report Count (SPM_PAGESIZE + 2) */
+ 0x95, (SPM_PAGESIZE + 2)
+#else
+ 0x96, ((SPM_PAGESIZE + 2) & 0xFF), ((SPM_PAGESIZE + 2) >> 8),
+#endif
+ 0x15, 0x00, /* Logical Minimum (0) */
+ 0x25, 0xff, /* Logical Maximum (255) */
+ 0x91, 0x02, /* Output (Data, Variable, Absolute) */
+ 0xc0 /* End Collection */
};
/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall