Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / Demos / Device / ClassDriver / KeyboardMouse / Descriptors.c
index b76a1a5..2818b6e 100644 (file)
@@ -1,14 +1,14 @@
 /*\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
-  Copyright 2009  Denver Gingerich (denver [at] ossguy [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Denver Gingerich (denver [at] ossguy [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
   \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)\r
                },\r
                \r
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)\r
                },\r
                \r
-       .KeyboardInterface = \r
+       .HID1_KeyboardInterface = \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
@@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
-       .KeyboardHID = \r
+       .HID1_KeyboardHID = \r
                {  \r
                        .Header                 = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
                        \r
                {  \r
                        .Header                 = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
                        \r
@@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .HIDReportLength        = sizeof(KeyboardReport)\r
                },\r
                \r
                        .HIDReportLength        = sizeof(KeyboardReport)\r
                },\r
                \r
-       .KeyboardInEndpoint = \r
+       .HID1_ReportINEndpoint = \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
@@ -199,7 +199,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .PollingIntervalMS      = 0x0A\r
                },\r
 \r
                        .PollingIntervalMS      = 0x0A\r
                },\r
 \r
-       .MouseInterface = \r
+       .HID2_MouseInterface = \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
@@ -215,7 +215,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
-       .MouseHID = \r
+       .HID2_MouseHID = \r
                {  \r
                        .Header                 = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
                        \r
                {  \r
                        .Header                 = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
                        \r
@@ -226,7 +226,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .HIDReportLength        = sizeof(MouseReport)\r
                },\r
                \r
                        .HIDReportLength        = sizeof(MouseReport)\r
                },\r
                \r
-       .MouseInEndpoint = \r
+       .HID2_ReportINEndpoint = \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
@@ -315,12 +315,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
                case DTYPE_HID: \r
                        if (!(wIndex))\r
                        {\r
                case DTYPE_HID: \r
                        if (!(wIndex))\r
                        {\r
-                               Address = (void*)&ConfigurationDescriptor.KeyboardHID;\r
+                               Address = (void*)&ConfigurationDescriptor.HID1_KeyboardHID;\r
                                Size    = sizeof(USB_HID_Descriptor_t);\r
                        }\r
                        else\r
                        {\r
                                Size    = sizeof(USB_HID_Descriptor_t);\r
                        }\r
                        else\r
                        {\r
-                               Address = (void*)&ConfigurationDescriptor.MouseHID;\r
+                               Address = (void*)&ConfigurationDescriptor.HID2_MouseHID;\r
                                Size    = sizeof(USB_HID_Descriptor_t);                 \r
                        }\r
                        break;\r
                                Size    = sizeof(USB_HID_Descriptor_t);                 \r
                        }\r
                        break;\r