Fix descriptors

pull/115/head
Alex Voinea 2021-09-20 15:14:37 +02:00
parent 26fd53251b
commit 895671aeb2
3 changed files with 17 additions and 12 deletions

View File

@ -9,7 +9,6 @@ add_library(
lufa/LUFA/Drivers/USB/Core/Events.c
lufa/LUFA/Drivers/USB/Core/DeviceStandardReq.c
lufa/LUFA/Drivers/USB/Core/USBTask.c
lufa/LUFA/CodeTemplates/DeviceTemplate/Descriptors.c
lufa/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
Descriptors.c
)

View File

@ -54,8 +54,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
.VendorID = 0x03EB,
.ProductID = 0x2044,
.VendorID = 0x2C99,
.ProductID = 0x0004,
.ReleaseNumber = VERSION_BCD(0,0,1),
.ManufacturerStrIndex = STRING_ID_Manufacturer,
@ -185,13 +185,13 @@ const USB_Descriptor_String_t PROGMEM LanguageString = USB_STRING_DESCRIPTOR_ARR
* form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
const USB_Descriptor_String_t PROGMEM ManufacturerString = USB_STRING_DESCRIPTOR(L"LUFA Library");
const USB_Descriptor_String_t PROGMEM ManufacturerString = USB_STRING_DESCRIPTOR(L"Prusa3D");
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
const USB_Descriptor_String_t PROGMEM ProductString = USB_STRING_DESCRIPTOR(L"LUFA CDC Demo");
const USB_Descriptor_String_t PROGMEM ProductString = USB_STRING_DESCRIPTOR(L"Original Prusa i3 MK3 Multi Material 2.0 upgrade");
/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
* documentation) by the application code so that the address and size of a requested descriptor can be given

View File

@ -76,11 +76,17 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
},
};
void testFunc(uint8_t i) {
char str[30];
sprintf_P(str, PSTR("testFunc(%hu)\n"), i);
hal::usart::usart1.puts(str);
}
// void testFunc1(uint8_t i) {
// char str[30];
// sprintf_P(str, PSTR("testFunc1(%hu)\n"), i);
// hal::usart::usart1.puts(str);
// }
// void testFunc2(uint8_t i) {
// char str[30];
// sprintf_P(str, PSTR("testFunc2(%hu)\n"), i);
// hal::usart::usart1.puts(str);
// }
/** Event handler for the library USB Connection event. */
void EVENT_USB_Device_Connect(void)
@ -102,8 +108,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
ConfigSuccess &= CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
// LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
char str1[] = "ready";
char str0[] = "error";
char str1[] = "ready\n";
char str0[] = "error\n";
hal::usart::usart1.puts("EVENT_USB_Device_ConfigurationChanged:");
hal::usart::usart1.puts(ConfigSuccess ? str1 : str0);
}