Added new USB_Host_ClearPipeStall() convenience function to clear a stall condition...
[pub/lufa.git] / LUFA / Drivers / USB / LowLevel / Host.h
index 7130c75..2a40a1d 100644 (file)
@@ -47,6 +47,8 @@
 \r
                #include "../../../Common/Common.h"\r
                #include "../HighLevel/USBInterrupt.h"\r
+               #include "../HighLevel/StdDescriptors.h"\r
+               #include "Pipe.h"\r
 \r
        /* Enable C linkage for C++ Compilers: */\r
                #if defined(__cplusplus)\r
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.\r
                         */\r
                        uint8_t USB_Host_SetDeviceConfiguration(uint8_t ConfigNumber);\r
+                       \r
+                       /** Convenience function. This routine sends a GetDescriptor standard request to the attached\r
+                        *  device, requesting the device descriptor. This can be used to easily retrieve information\r
+                        *  about the device such as its VID, PID and power requirements.\r
+                        *\r
+                        *  \note After this routine returns, the control pipe will be selected.\r
+                        *\r
+                        *  \param DeviceDescriptorPtr  Pointer to the destination device descriptor structure where\r
+                        *                              the read data is to be stored\r
+                        *\r
+                        *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.\r
+                        */\r
+                       uint8_t USB_Host_GetDeviceDescriptor(USB_Descriptor_Device_t* DeviceDescriptorPtr);\r
+                       \r
+                       /** Clears a stall condition on the given pipe, via a ClearFeature request to the attached device.\r
+                        *\r
+                        *  \note After this routine returns, the control pipe will be selected.\r
+                        *\r
+                        *  \param EndpointIndex  Index of the endpoint to clear\r
+                        *\r
+                        *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.\r
+                        */                     \r
+                       uint8_t USB_Host_ClearPipeStall(uint8_t EndpointIndex);\r
 \r
                /* Enums: */\r
                        /** Enum for the various states of the USB Host state machine. Only some states are\r