Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / Projects / AVRISP-MKII / Descriptors.c
index a2765d3..af28b4b 100644 (file)
@@ -1,21 +1,21 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, distribute, and sell this \r
+  software and its documentation for any purpose is hereby granted\r
+  without fee, provided that the above copyright notice appear in \r
+  all copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting \r
+  documentation, and that the name of the author not be used in \r
+  advertising or publicity pertaining to distribution of the \r
   software without specific, written prior permission.\r
 \r
   The author disclaim all warranties with regard to this\r
   software without specific, written prior permission.\r
 \r
   The author disclaim all warranties with regard to this\r
@@ -81,12 +81,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .ConfigurationNumber    = 1,\r
                        .ConfigurationStrIndex  = NO_DESCRIPTOR,\r
                                \r
                        .ConfigurationNumber    = 1,\r
                        .ConfigurationStrIndex  = NO_DESCRIPTOR,\r
                                \r
-                       .ConfigAttributes       = USB_CONFIG_ATTR_SELFPOWERED,\r
+                       .ConfigAttributes       = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
                        \r
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)\r
                },\r
 \r
                        \r
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)\r
                },\r
 \r
-       .AVRISPInterface = \r
+       .AVRISP_Interface = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
 \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
 \r
@@ -102,25 +102,25 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
-       .DataInEndpoint = \r
+       .AVRISP_DataInEndpoint = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
-                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | AVRISP_DATA_EPNUM),\r
+                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | AVRISP_DATA_IN_EPNUM),\r
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
                        .EndpointSize           = AVRISP_DATA_EPSIZE,\r
                        .PollingIntervalMS      = 0x00\r
                },\r
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
                        .EndpointSize           = AVRISP_DATA_EPSIZE,\r
                        .PollingIntervalMS      = 0x00\r
                },\r
-
-       .DataOutEndpoint =\r
+\r
+       .AVRISP_DataOutEndpoint =\r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
-                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_OUT | AVRISP_DATA_EPNUM),\r
+                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_OUT | AVRISP_DATA_OUT_EPNUM),\r
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
                        .EndpointSize           = AVRISP_DATA_EPSIZE,\r
                        .PollingIntervalMS      = 0x00\r
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
                        .EndpointSize           = AVRISP_DATA_EPSIZE,\r
                        .PollingIntervalMS      = 0x00\r
-               },
+               },\r
 };\r
 \r
 /** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests\r
 };\r
 \r
 /** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests\r
@@ -151,11 +151,14 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
  */\r
 USB_Descriptor_String_t PROGMEM ProductString =\r
 {\r
  */\r
 USB_Descriptor_String_t PROGMEM ProductString =\r
 {\r
-       .Header                 = {.Size = USB_STRING_LEN(33), .Type = DTYPE_String},\r
+       .Header                 = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String},\r
                \r
                \r
-       .UnicodeString          = L"LUFA AVRISP MkII Clone Programmer"\r
+       .UnicodeString          = L"LUFA AVRISP MkII Clone"\r
 };\r
 \r
 };\r
 \r
+/** Serial number string. This is a Unicode string containing the device's unique serial number, expressed as a\r
+ *  series of uppercase hexadecimal digits.\r
+ */\r
 USB_Descriptor_String_t PROGMEM SerialString =\r
 {\r
        .Header                 = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},\r
 USB_Descriptor_String_t PROGMEM SerialString =\r
 {\r
        .Header                 = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},\r