From: Dean Camera Date: Mon, 15 Jun 2020 12:02:06 +0000 (+1000) Subject: Fix control request hang in Printer device class driver (thanks to Juergen Borleis). X-Git-Tag: LUFA-210130~7 X-Git-Url: http://git.linex4red.de/pub/USBasp.git/commitdiff_plain/79780cea57fd5c742e24d4a982417c2a065e662f Fix control request hang in Printer device class driver (thanks to Juergen Borleis). --- diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index a84ca3d57..557587b21 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -34,6 +34,7 @@ * - Fixed USB_STRING_DESCRIPTOR_ARRAY() not accepting more than two byte long arrays * - Fixed HID report parser corruption when parsing PUSH and POP report item elements * - Fixed HID report parser incorrectly decoding 32-bit USAGE elements + * - Fixed control request hangs in the Printer device class driver (thanks to Juergen Borleis) * - Library Applications: * - Fixed bootloaders not disabling global interrupts during erase and write operations (thanks to Zoltan) * - Fixed bootloaders accepting flash writes to the bootloader region (thanks to NicoHood) diff --git a/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c b/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c index d6cd09516..940aacf13 100644 --- a/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c +++ b/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c @@ -77,6 +77,8 @@ void PRNT_Device_ProcessControlRequest(USB_ClassInfo_PRNT_Device_t* const PRNTIn } Endpoint_Write_8(PRNTInterfaceInfo->State.PortStatus); + Endpoint_ClearIN(); + Endpoint_ClearStatusStage(); }