X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/101ed6b74e0d6549e53a7c8216147af37ffc70df..305ca461acf37a5a2237afe7d2ce552ce25075a5:/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c diff --git a/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c b/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c index de5e49ec6..313d64bce 100644 --- a/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c +++ b/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2019. + Copyright (C) Dean Camera, 2020. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2019 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2020 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 @@ -59,7 +59,7 @@ void PRNT_Device_ProcessControlRequest(USB_ClassInfo_PRNT_Device_t* const PRNTIn } uint16_t IEEEStringLen = strlen(PRNTInterfaceInfo->Config.IEEE1284String); - Endpoint_Write_16_BE(IEEEStringLen); + Endpoint_Write_16_BE(IEEEStringLen + sizeof(uint16_t)); Endpoint_Write_Control_Stream_LE(PRNTInterfaceInfo->Config.IEEE1284String, IEEEStringLen); Endpoint_ClearStatusStage(); } @@ -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(); }