X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5a4def747897c1c6ffbe465506d846c7c686d3e9..3642ea0b9715cdf0196b10c9fc97898940eaefa6:/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c index da79e03cc..cbca61323 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. + Copyright (C) Dean Camera, 2015. dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2015 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 @@ -18,7 +18,7 @@ advertising or publicity pertaining to distribution of the software without specific, written prior permission. - The author disclaim all warranties with regard to this + The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages @@ -52,7 +52,7 @@ uint8_t Printer_SendData(const void* const PrinterCommands, Pipe_SelectPipe(PRINTER_DATA_OUT_PIPE); Pipe_Unfreeze(); - if ((ErrorCode = Pipe_Write_Stream_LE(PrinterCommands, CommandSize)) != PIPE_RWSTREAM_NoError) + if ((ErrorCode = Pipe_Write_Stream_LE(PrinterCommands, CommandSize, NULL)) != PIPE_RWSTREAM_NoError) return ErrorCode; Pipe_ClearOUT(); @@ -75,13 +75,13 @@ uint8_t Printer_SendData(const void* const PrinterCommands, uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize) { - uint8_t ErrorCode = HOST_SENDCONTROL_Successful; + uint8_t ErrorCode; uint16_t DeviceIDStringLength = 0; USB_ControlRequest = (USB_Request_Header_t) { .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE), - .bRequest = REQ_GetDeviceID, + .bRequest = PRNT_REQ_GetDeviceID, .wValue = 0, .wIndex = PrinterInterfaceNumber, .wLength = sizeof(DeviceIDStringLength), @@ -128,7 +128,7 @@ uint8_t Printer_GetPortStatus(uint8_t* const PortStatus) USB_ControlRequest = (USB_Request_Header_t) { .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE), - .bRequest = REQ_GetPortStatus, + .bRequest = PRNT_REQ_GetPortStatus, .wValue = 0, .wIndex = PrinterInterfaceNumber, .wLength = sizeof(uint8_t), @@ -149,7 +149,7 @@ uint8_t Printer_SoftReset(void) USB_ControlRequest = (USB_Request_Header_t) { .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE), - .bRequest = REQ_SoftReset, + .bRequest = PRNT_REQ_SoftReset, .wValue = 0, .wIndex = PrinterInterfaceNumber, .wLength = 0,