X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/3d0e6d055b716d4e86dc5665a58167923aa1fff6..2e70de6194c4637efcf871cd878630bfaf99707e:/Bootloaders/Printer/Descriptors.c?ds=sidebyside diff --git a/Bootloaders/Printer/Descriptors.c b/Bootloaders/Printer/Descriptors.c index b1b1a5898..9e0e1901f 100644 --- a/Bootloaders/Printer/Descriptors.c +++ b/Bootloaders/Printer/Descriptors.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2013. + Copyright (C) Dean Camera, 2014. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -47,7 +47,7 @@ const USB_Descriptor_Device_t DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, - .USBSpecification = VERSION_BCD(01.10), + .USBSpecification = VERSION_BCD(1,1,0), .Class = USB_CSCP_NoDeviceClass, .SubClass = USB_CSCP_NoDeviceSubclass, .Protocol = USB_CSCP_NoDeviceProtocol, @@ -56,10 +56,10 @@ const USB_Descriptor_Device_t DeviceDescriptor = .VendorID = 0x03EB, .ProductID = 0x206B, - .ReleaseNumber = VERSION_BCD(00.01), + .ReleaseNumber = VERSION_BCD(0,0,1), - .ManufacturerStrIndex = 0x01, - .ProductStrIndex = 0x02, + .ManufacturerStrIndex = STRING_ID_Manufacturer, + .ProductStrIndex = STRING_ID_Product, .SerialNumStrIndex = NO_DESCRIPTOR, .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS @@ -91,7 +91,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - .InterfaceNumber = 0, + .InterfaceNumber = INTERFACE_ID_Printer, .AlternateSetting = 0, .TotalEndpoints = 2, @@ -186,17 +186,17 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, case DTYPE_String: switch (DescriptorNumber) { - case 0x00: + case STRING_ID_Language: Address = &LanguageString; - Size = pgm_read_byte(&LanguageString.Header.Size); + Size = LanguageString.Header.Size; break; - case 0x01: + case STRING_ID_Manufacturer: Address = &ManufacturerString; - Size = pgm_read_byte(&ManufacturerString.Header.Size); + Size = ManufacturerString.Header.Size; break; - case 0x02: + case STRING_ID_Product: Address = &ProductString; - Size = pgm_read_byte(&ProductString.Header.Size); + Size = ProductString.Header.Size; break; }