X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b9b03aadb219d06fbad9d110e508db93e45461af..31d8ebebc0796873f7c70db80a04acdcbb307ed8:/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c?ds=sidebyside diff --git a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c index c9a778feb..114d86357 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c @@ -137,7 +137,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .ProductStrIndex = 0x02, .SerialNumStrIndex = NO_DESCRIPTOR, - .NumberOfConfigurations = 1 + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS }; /** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage @@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .KeyboardHID = { - .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, @@ -194,9 +194,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_IN_EPNUM), - .Attributes = EP_TYPE_INTERRUPT, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x02 + .PollingIntervalMS = 0x0A }, .MouseInterface = @@ -217,7 +217,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MouseHID = { - .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, @@ -231,9 +231,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_IN_EPNUM), - .Attributes = EP_TYPE_INTERRUPT, + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x02 + .PollingIntervalMS = 0x0A } }; @@ -316,12 +316,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, if (!(wIndex)) { Address = (void*)&ConfigurationDescriptor.KeyboardHID; - Size = sizeof(USB_Descriptor_HID_t); + Size = sizeof(USB_HID_Descriptor_t); } else { Address = (void*)&ConfigurationDescriptor.MouseHID; - Size = sizeof(USB_Descriptor_HID_t); + Size = sizeof(USB_HID_Descriptor_t); } break; case DTYPE_Report: