X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/99abd1a8b7c096baf5ddaff84a8f8fdfb097dfc2..a9e0935a90346beb0c981924becc1f55d969a08b:/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c diff --git a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c index b299b71b9..2818b6e98 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c @@ -1,22 +1,22 @@ /* 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 2009 Denver Gingerich (denver [at] ossguy [dot] com) + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2010 Denver Gingerich (denver [at] ossguy [dot] com) - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, provided that the above copyright notice appear in all - copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) }, - .KeyboardInterface = + .HID1_KeyboardInterface = { .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, @@ -173,12 +173,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = 0x01, + .Protocol = HID_BOOT_KEYBOARD_PROTOCOL, .InterfaceStrIndex = NO_DESCRIPTOR }, - .KeyboardHID = + .HID1_KeyboardHID = { .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID}, @@ -189,17 +189,17 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .HIDReportLength = sizeof(KeyboardReport) }, - .KeyboardInEndpoint = + .HID1_ReportINEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x02 + .PollingIntervalMS = 0x0A }, - .MouseInterface = + .HID2_MouseInterface = { .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, @@ -210,12 +210,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = 0x02, + .Protocol = HID_BOOT_MOUSE_PROTOCOL, .InterfaceStrIndex = NO_DESCRIPTOR }, - .MouseHID = + .HID2_MouseHID = { .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID}, @@ -226,14 +226,14 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .HIDReportLength = sizeof(MouseReport) }, - .MouseInEndpoint = + .HID2_ReportINEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_IN_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x02 + .PollingIntervalMS = 0x0A } }; @@ -315,12 +315,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, case DTYPE_HID: if (!(wIndex)) { - Address = (void*)&ConfigurationDescriptor.KeyboardHID; + Address = (void*)&ConfigurationDescriptor.HID1_KeyboardHID; Size = sizeof(USB_HID_Descriptor_t); } else { - Address = (void*)&ConfigurationDescriptor.MouseHID; + Address = (void*)&ConfigurationDescriptor.HID2_MouseHID; Size = sizeof(USB_HID_Descriptor_t); } break;