aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel/Host.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-16 04:20:21 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-16 04:20:21 +0000
commitb5ca3990c2ec9dc240fb334002ed2f7c82eea853 (patch)
tree73449296c9effce9ba73cf744734e258edfbdfea /LUFA/Drivers/USB/LowLevel/Host.h
parentab76c52e1414c55a2f594999ca2a04918bbc7143 (diff)
downloadlufa-b5ca3990c2ec9dc240fb334002ed2f7c82eea853.tar.gz
lufa-b5ca3990c2ec9dc240fb334002ed2f7c82eea853.tar.bz2
lufa-b5ca3990c2ec9dc240fb334002ed2f7c82eea853.zip
Added new USB_Host_SetDeviceConfiguration() convenience function. Change over Low Level host demos to use the new routine.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Host.h')
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h
index 911b41bd9..7130c7579 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.h
+++ b/LUFA/Drivers/USB/LowLevel/Host.h
@@ -173,6 +173,19 @@
#define USB_Host_IsResumeFromWakeupRequestSent() ((UHCON & (1 << RESUME)) ? false : true)
#endif
+ /* Function Prototypes: */
+ /** Convenience function. This routine sends a SetConfiguration standard request to the attached
+ * device, with the given configuration index. This can be used to easily set the device
+ * configuration without creating and sending the request manually.
+ *
+ * \note After this routine returns, the control pipe will be selected.
+ *
+ * \param 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);
+
/* Enums: */
/** Enum for the various states of the USB Host state machine. Only some states are
* implemented in the LUFA library - other states are left to the user to implement.