X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/d4ca7fb44c7d326b96cf391f0275dc323dbe24de..57fe6b4fb97668eb15c4fa56095c0abd746d6c99:/Bootloaders/TeensyHID/Descriptors.h diff --git a/Bootloaders/TeensyHID/Descriptors.h b/Bootloaders/TeensyHID/Descriptors.h index cf8e8349a..8ef964d2a 100644 --- a/Bootloaders/TeensyHID/Descriptors.h +++ b/Bootloaders/TeensyHID/Descriptors.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -66,9 +66,9 @@ typedef struct { USB_Descriptor_Configuration_Header_t Config; - USB_Descriptor_Interface_t Interface; - USB_Descriptor_HID_t HIDDescriptor; - USB_Descriptor_Endpoint_t HIDEndpoint; + USB_Descriptor_Interface_t HID_Interface; + USB_Descriptor_HID_t HID_VendorHID; + USB_Descriptor_Endpoint_t HID_ReportINEndpoint; } USB_Descriptor_Configuration_t; /* Macros: */ @@ -83,6 +83,30 @@ /** Descriptor header type value, to indicate a HID class HID report descriptor. */ #define DTYPE_Report 0x22 + + /** Vendor usage page for the Teensy 1.0 board */ + #define TEENSY_USAGEPAGE_10 0x19 + + /** Vendor usage page for the Teensy++ 1.0 board */ + #define TEENSY_USAGEPAGE_10PP 0x1A + + /** Vendor usage page for the Teensy 2.0 board */ + #define TEENSY_USAGEPAGE_20 0x1B + + /** Vendor usage page for the Teensy++ 2.0 board */ + #define TEENSY_USAGEPAGE_20PP 0x1C + + #if (defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__)) + #define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_10 + #elif defined(__AVR_ATmega32U4__) + #define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_20 + #elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)) + #define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_10PP + #elif (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)) + #define TEENSY_USAGEPAGE TEENSY_USAGEPAGE_20PP + #else + #error The selected AVR model is not currently supported by the TeensyHID bootloader. + #endif /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)