Update Atmel Studio blob - use sane method to extract the extension's bundled Getting...
[pub/USBasp.git] / Demos / Device / ClassDriver / KeyboardMouseMultiReport / Descriptors.c
index ccfe5a6..1cd4493 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2013.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2013  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
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
@@ -77,7 +77,7 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM HIDReport[] =
                HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_RELATIVE),
            HID_RI_END_COLLECTION(0),
        HID_RI_END_COLLECTION(0),
-       
+
        /* Keyboard Report */
        HID_RI_USAGE_PAGE(8, 0x01), /* Generic Desktop */
        HID_RI_USAGE(8, 0x06), /* Keyboard */
@@ -158,7 +158,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .ConfigurationNumber    = 1,
                        .ConfigurationStrIndex  = NO_DESCRIPTOR,
 
-                       .ConfigAttributes       = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+                       .ConfigAttributes       = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_SELFPOWERED),
 
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)
                },
@@ -194,10 +194,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                {
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
 
-                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | HID_IN_EPNUM),
+                       .EndpointAddress        = HID_IN_EPADDR,
                        .Attributes             = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
                        .EndpointSize           = HID_EPSIZE,
-                       .PollingIntervalMS      = 0x01
+                       .PollingIntervalMS      = 0x05
                },
 };
 
@@ -280,7 +280,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                        break;
                case HID_DTYPE_HID:
                        Address = &ConfigurationDescriptor.HID_HIDData;
-                       Size    = sizeof(USB_HID_Descriptor_HID_t);                     
+                       Size    = sizeof(USB_HID_Descriptor_HID_t);
                        break;
                case HID_DTYPE_Report:
                        Address = &HIDReport;