Commit of new class abstraction APIs for all device demos other than the MIDI demo...
[pub/USBasp.git] / Projects / Magstripe / Descriptors.h
index 9948085..0fff2c2 100644 (file)
 #define _DESCRIPTORS_H_\r
 \r
        /* Includes: */\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-\r
                #include <avr/pgmspace.h>\r
 \r
-       /* Type Defines: */\r
-               /** Type define for the HID class specific HID descriptor. A HID descriptor is used in HID class devices\r
-                *  to give information about the HID device, including the HID specification used, and the report descriptors\r
-                *  the device contains to describe how the HID device should be controlled.\r
-                */\r
-               typedef struct\r
-               {\r
-                       USB_Descriptor_Header_t Header; /**< Standard USB descriptor header */\r
-                               \r
-                       uint16_t                HIDSpec; /**< HID specification implemented by the device, in BCD form */\r
-                       uint8_t                 CountryCode; /**< Country code for the country the HID device is localised for */\r
-               \r
-                       uint8_t                 TotalHIDDescriptors; /**< Total number of HID reports linked to this HID interface */\r
-\r
-                       uint8_t                 HIDReportType; /**< Type of the first HID report descriptor */\r
-                       uint16_t                HIDReportLength; /**< Length of the first HID report descriptor */\r
-               } USB_Descriptor_HID_t;\r
-\r
-               /** Type define for the data type used for the HID Report descriptor data elements. A HID report\r
-                *  descriptor contains an array of this data type, indicating how the reports from and to the\r
-                *  device are formatted and how the report data is to be used by the host.\r
-                */\r
-               typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/USB/Class/Device/HID.h>\r
 \r
+       /* Type Defines: */\r
                /** Type define for the device configuration descriptor structure. This must be defined in the\r
                 *  application code, as the configuration descriptor contains several sub-descriptors which\r
                 *  vary between devices, and which describe the device's usage to the host.\r
                /** Size of the keyboard report endpoints, in bytes. */\r
                #define KEYBOARD_EPSIZE              8\r
 \r
-               /** Descriptor type value for a HID descriptor. */\r
-               #define DTYPE_HID                    0x21\r
-\r
-               /** Descriptor type value for a HID report. */\r
-               #define DTYPE_Report                 0x22\r
-\r
        /* Function Prototypes: */\r
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
 \r
 #endif\r