Minor correction to MagStripe demo to fix build problems.
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Host.h
index 4457c07..08b21f6 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
                                #define USB_Host_IsResumeFromWakeupRequestSent() ((UHCON &   (1 << RESUME)) ? false : true)\r
                        #endif\r
 \r
+               /* Function Prototypes: */\r
+                       /** Convenience function. This routine sends a SetConfiguration standard request to the attached\r
+                        *  device, with the given configuration index. This can be used to easily set the device\r
+                        *  configuration without creating and sending the request manually.\r
+                        *\r
+                        *  \note After this routine returns, the control pipe will be selected.\r
+                        *\r
+                        *  \param[in] ConfigNumber  Configuration index to send to the device\r
+                        *\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[out] 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(void* 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[in] 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
                         *  implemented in the LUFA library - other states are left to the user to implement.\r
                                HOST_STATE_Suspended                    = 13, /**< May be implemented by the user project. */\r
                        };\r
                        \r
-                       /** Enum for the error codes for the \ref USB_HostError event.\r
+                       /** Enum for the error codes for the \ref EVENT_USB_HostError() event.\r
                         *\r
                         *  \see \ref Group_Events for more information on this event.\r
                         */\r
                                                                      */\r
                        };\r
                        \r
-                       /** Enum for the error codes for the \ref USB_DeviceEnumerationFailed event.\r
+                       /** Enum for the error codes for the \ref EVENT_USB_DeviceEnumerationFailed() event.\r
                         *\r
                         *  \see \ref Group_Events for more information on this event.\r
                         */\r
                        enum USB_Host_EnumerationErrorCodes_t\r
                        {\r
                                HOST_ENUMERROR_NoError          = 0, /**< No error occurred. Used internally, this is not a valid\r
-                                                                     *   ErrorCode parameter value for the \ref USB_DeviceEnumerationFailed\r
+                                                                     *   ErrorCode parameter value for the \ref EVENT_USB_DeviceEnumerationFailed()\r
                                                                      *   event.\r
                                                                      */\r
                                HOST_ENUMERROR_WaitStage        = 1, /**< One of the delays between enumeration steps failed\r