X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b7b8a9edfacb000c138eb6e7ad77c515c3a82050..e61345f872fc7f1a8b95e53ee68b4dbdea0650db:/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c?ds=sidebyside diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c index ac0ca9a2b..0b75d7507 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c @@ -56,11 +56,8 @@ uint8_t Printer_SendData(const void* const PrinterCommands, return ErrorCode; Pipe_ClearOUT(); - while (!(Pipe_IsOUTReady())) - { - if (USB_HostState == HOST_STATE_Unattached) - return PIPE_RWSTREAM_DeviceDisconnected; - } + + Pipe_WaitUntilReady(); Pipe_Freeze();