X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/253deb996f321c59c102a64e17f95d0b5b0a0e6d..4a8ac5e474741f14492597880e751b3f806cb965:/Demos/Device/GenericHID/Descriptors.c diff --git a/Demos/Device/GenericHID/Descriptors.c b/Demos/Device/GenericHID/Descriptors.c index a14fc5050..0eed6e9f3 100644 --- a/Demos/Device/GenericHID/Descriptors.c +++ b/Demos/Device/GenericHID/Descriptors.c @@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, - .TotalHIDReports = 0x01, + .TotalReportDescriptors = 1, .HIDReportType = DTYPE_Report, .HIDReportLength = sizeof(GenericReport) }, @@ -210,37 +210,37 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c switch (DescriptorType) { case DTYPE_Device: - Address = DESCRIPTOR_ADDRESS(DeviceDescriptor); + Address = (void*)&DeviceDescriptor; Size = sizeof(USB_Descriptor_Device_t); break; case DTYPE_Configuration: - Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor); + Address = (void*)&ConfigurationDescriptor; Size = sizeof(USB_Descriptor_Configuration_t); break; case DTYPE_String: switch (DescriptorNumber) { case 0x00: - Address = DESCRIPTOR_ADDRESS(LanguageString); + Address = (void*)&LanguageString; Size = pgm_read_byte(&LanguageString.Header.Size); break; case 0x01: - Address = DESCRIPTOR_ADDRESS(ManufacturerString); + Address = (void*)&ManufacturerString; Size = pgm_read_byte(&ManufacturerString.Header.Size); break; case 0x02: - Address = DESCRIPTOR_ADDRESS(ProductString); + Address = (void*)&ProductString; Size = pgm_read_byte(&ProductString.Header.Size); break; } break; case DTYPE_HID: - Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.GenericHID); + Address = (void*)&ConfigurationDescriptor.GenericHID; Size = sizeof(USB_Descriptor_HID_t); break; case DTYPE_Report: - Address = DESCRIPTOR_ADDRESS(GenericReport); + Address = (void*)&GenericReport; Size = sizeof(GenericReport); break; }