Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / Demos / Host / LowLevel / PrinterHost / Lib / PrinterCommands.c
index c4fc546..79cfc0d 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -44,7 +44,7 @@
  *\r
  *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum\r
  */\r
  *\r
  *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum\r
  */\r
-uint8_t Printer_SendData(void* PrinterCommands, uint16_t CommandSize)\r
+uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t CommandSize)\r
 {\r
        uint8_t ErrorCode;\r
 \r
 {\r
        uint8_t ErrorCode;\r
 \r
@@ -74,7 +74,7 @@ uint8_t Printer_SendData(void* PrinterCommands, uint16_t CommandSize)
  *\r
  *  \return A value from the USB_Host_SendControlErrorCodes_t enum\r
  */\r
  *\r
  *  \return A value from the USB_Host_SendControlErrorCodes_t enum\r
  */\r
-uint8_t Printer_GetDeviceID(char* DeviceIDString, uint16_t BufferSize)\r
+uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize)\r
 {\r
        uint8_t  ErrorCode = HOST_SENDCONTROL_Successful;\r
        uint16_t DeviceIDStringLength = 0;\r
 {\r
        uint8_t  ErrorCode = HOST_SENDCONTROL_Successful;\r
        uint16_t DeviceIDStringLength = 0;\r
@@ -124,7 +124,7 @@ uint8_t Printer_GetDeviceID(char* DeviceIDString, uint16_t BufferSize)
  *\r
  *  \return A value from the USB_Host_SendControlErrorCodes_t enum\r
  */\r
  *\r
  *  \return A value from the USB_Host_SendControlErrorCodes_t enum\r
  */\r
-uint8_t Printer_GetPortStatus(uint8_t* PortStatus)\r
+uint8_t Printer_GetPortStatus(uint8_t* const PortStatus)\r
 {\r
        USB_ControlRequest = (USB_Request_Header_t)\r
                {\r
 {\r
        USB_ControlRequest = (USB_Request_Header_t)\r
                {\r