X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b5ca3990c2ec9dc240fb334002ed2f7c82eea853..b462f2d457ec2f0cfa22a1c3db198cb22f6809a1:/LUFA/Drivers/USB/LowLevel/Host.h diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h index 7130c7579..08b21f688 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.h +++ b/LUFA/Drivers/USB/LowLevel/Host.h @@ -47,6 +47,8 @@ #include "../../../Common/Common.h" #include "../HighLevel/USBInterrupt.h" + #include "../HighLevel/StdDescriptors.h" + #include "Pipe.h" /* Enable C linkage for C++ Compilers: */ #if defined(__cplusplus) @@ -180,11 +182,34 @@ * * \note After this routine returns, the control pipe will be selected. * - * \param ConfigNumber Configuration index to send to the device + * \param[in] ConfigNumber Configuration index to send to the device * * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. */ uint8_t USB_Host_SetDeviceConfiguration(uint8_t ConfigNumber); + + /** Convenience function. This routine sends a GetDescriptor standard request to the attached + * device, requesting the device descriptor. This can be used to easily retrieve information + * about the device such as its VID, PID and power requirements. + * + * \note After this routine returns, the control pipe will be selected. + * + * \param[out] DeviceDescriptorPtr Pointer to the destination device descriptor structure where + * the read data is to be stored + * + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. + */ + uint8_t USB_Host_GetDeviceDescriptor(void* DeviceDescriptorPtr); + + /** Clears a stall condition on the given pipe, via a ClearFeature request to the attached device. + * + * \note After this routine returns, the control pipe will be selected. + * + * \param[in] EndpointIndex Index of the endpoint to clear + * + * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result. + */ + uint8_t USB_Host_ClearPipeStall(uint8_t EndpointIndex); /* Enums: */ /** Enum for the various states of the USB Host state machine. Only some states are