Update Studio Integration DLL, to include package logging.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / PrinterClassDevice.h
index 45f49d4..c86aec8 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2013.
+     Copyright (C) Dean Camera, 2015.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2013  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
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 /** \ingroup Group_USBClassPrinter
  *  \defgroup Group_USBClassPrinterDevice Printer Class Device Mode Driver
  *
 /** \ingroup Group_USBClassPrinter
  *  \defgroup Group_USBClassPrinterDevice Printer Class Device Mode Driver
  *
- *  \section Sec_Dependencies Module Source Dependencies
+ *  \section Sec_USBClassPrinterDevice_Dependencies Module Source Dependencies
  *  The following files must be built with any user project that uses this module:
  *    - LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
  *
  *  The following files must be built with any user project that uses this module:
  *    - LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
  *
- *  \section Sec_ModDescription Module Description
+ *  \section Sec_USBClassPrinterDevice_ModDescription Module Description
  *  Device Mode USB Class driver framework interface, for the Printer USB Class driver.
  *
  *  @{
  *  Device Mode USB Class driver framework interface, for the Printer USB Class driver.
  *
  *  @{
                                        USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
 
                                        char* IEEE1284String; /**< IEEE 1284 identification string, sent to the host during enumeration
                                        USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
 
                                        char* IEEE1284String; /**< IEEE 1284 identification string, sent to the host during enumeration
-                                                              *   to identify the printer model, manufacturer and other characteristics. */
+                                                              *   to identify the printer model, manufacturer and other characteristics.
+                                                              */
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section
                                           *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.
                                           */
                                struct
                                {
                                        uint8_t PortStatus; /**< Current status of the Printer virtual port, a collection of \c PRNT_PORTSTATUS_*
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section
                                           *   <b>must</b> be set or the interface will fail to enumerate and operate correctly.
                                           */
                                struct
                                {
                                        uint8_t PortStatus; /**< Current status of the Printer virtual port, a collection of \c PRNT_PORTSTATUS_*
-                                                            *   bitmask values. */
+                                                            *   bitmask values.
+                                                            */
+
+                                       volatile bool IsPrinterReset; /**< Flag indicating that the host has requested that the Printer interface be reset
+                                                                                              *   and that all current Mass Storage operations should immediately abort.
+                                                                                              */
                                } State; /**< State data for the USB class interface within the device. All elements in this section
                                          *   are reset to their defaults when the interface is enumerated.
                                          */
                                } State; /**< State data for the USB class interface within the device. All elements in this section
                                          *   are reset to their defaults when the interface is enumerated.
                                          */
                         */
                        void PRNT_Device_USBTask(USB_ClassInfo_PRNT_Device_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                         */
                        void PRNT_Device_USBTask(USB_ClassInfo_PRNT_Device_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
+                       /** Printer class driver event for a soft reset request on a Printer interface. This event fires each time the host
+                        *  requests a reset of the printer interface's internal state, and may be hooked in the user program by declaring a
+                        *  handler function with the same name and parameters listed here.
+                        *
+                        *  \param[in,out] PRNTInterfaceInfo  Pointer to a structure containing a Printer Class configuration and state.
+                        */
+                       void EVENT_PRNT_Device_SoftReset(USB_ClassInfo_PRNT_Device_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+
                        /** Sends a given data buffer to the attached USB host, if connected. If a host is not connected when the function is
                         *  called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank
                         *  becomes full, or the \ref PRNT_Device_Flush() function is called to flush the pending data to the host. This allows
                        /** Sends a given data buffer to the attached USB host, if connected. If a host is not connected when the function is
                         *  called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank
                         *  becomes full, or the \ref PRNT_Device_Flush() function is called to flush the pending data to the host. This allows