X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/72c2922e38a2dfd14eb2d8e3692171704b5508f4..cf313989e6f451a3b6058db94929a51bc1b5e68b:/Projects/Magstripe/Descriptors.c diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c index 3d9dd08f4..68c98ed34 100644 --- a/Projects/Magstripe/Descriptors.c +++ b/Projects/Magstripe/Descriptors.c @@ -138,11 +138,11 @@ 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, - .TotalHIDDescriptors = 1, + .TotalReportDescriptors = 1, .HIDReportType = DTYPE_Report, .HIDReportLength = sizeof(KeyboardReport) }, @@ -154,7 +154,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM), .Attributes = EP_TYPE_INTERRUPT, .EndpointSize = KEYBOARD_EPSIZE, - .PollingIntervalMS = 0x04 + .PollingIntervalMS = 0x01 }, }; @@ -196,7 +196,7 @@ USB_Descriptor_String_t PROGMEM ProductString = * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the * USB host. */ -uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); const uint8_t DescriptorNumber = (wValue & 0xFF); @@ -234,7 +234,7 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c break; case DTYPE_HID: Address = (void*)&ConfigurationDescriptor.KeyboardHID; - Size = sizeof(USB_Descriptor_HID_t); + Size = sizeof(USB_HID_Descriptor_t); break; case DTYPE_Report: Address = (void*)&KeyboardReport;