X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..d11ed10c5314c44dc01c06954d1d73d4894cbff8:/LUFA/Drivers/USB/Class/Host/Printer.h diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h index b7a1ae7a3..06a1f8433 100644 --- a/LUFA/Drivers/USB/Class/Host/Printer.h +++ b/LUFA/Drivers/USB/Class/Host/Printer.h @@ -100,15 +100,6 @@ }; /* Function Prototypes: */ - /** General management task for a given Printer host class interface, required for the correct operation of - * the interface. This should be called frequently in the main program loop, before the master USB management task - * \ref USB_USBTask(). - * - * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state - */ - void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); - - /** Host interface configuration routine, to configure a given Printer host interface instance using the * Configuration Descriptor read from an attached USB device. This function automatically updates the given Printer * instance's state values and configures the pipes required to communicate with the interface if it is found within @@ -156,6 +147,9 @@ * printer is able to understand - for example, PCL data. Not all printers accept all printer languages; see * \ref PRNT_Host_GetDeviceID() for details on determining acceptable languages for an attached printer. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state * \param[in] PrinterCommands Pointer to a buffer containing the raw command stream to send to the printer * \param[in] CommandSize Size in bytes of the command stream to be sent @@ -181,6 +175,19 @@ uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, char* DeviceIDString, uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(1); + /* Inline Functions: */ + /** General management task for a given Printer host class interface, required for the correct operation of + * the interface. This should be called frequently in the main program loop, before the master USB management task + * \ref USB_USBTask(). + * + * \param[in,out] PRNTInterfaceInfo Pointer to a structure containing a Printer Class host configuration and state + */ + static inline void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo); + static inline void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo) + { + (void)PRNTInterfaceInfo; + } + /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) /* Macros: */