aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-07-08 07:25:56 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-07-08 07:25:56 +0000
commit137ce280c1e9c33e9393f1dfd6bb160c131bd1a4 (patch)
tree9db0900f06376a93ef2b6d9e9ef1edbfdc2a1f79 /LUFA/Drivers/USB/Core/UC3/Host_UC3.h
parentbcb627e1a1bb9f013670d981ead2db97d7c70608 (diff)
downloadlufa-137ce280c1e9c33e9393f1dfd6bb160c131bd1a4.tar.gz
lufa-137ce280c1e9c33e9393f1dfd6bb160c131bd1a4.tar.bz2
lufa-137ce280c1e9c33e9393f1dfd6bb160c131bd1a4.zip
Updated all host mode demos and projects to use the EVENT_USB_Host_DeviceEnumerationComplete() event callback for device configuration instead of manual host state machine manipulations in the main application task.
Added new USB_Host_ConfigurationNumber global variable to indicate the selected configuration in an attached device. Renamed global state variables that are specific to a certain USB mode to clearly indicate which mode the variable relates to, by changing the USB_* prefix to USB_Device_* or USB_Host_*. Removed the HOST_STATE_WaitForDeviceRemoval and HOST_STATE_Suspended host state machine states, as these are no longer required. Altered the USB_Host_SetDeviceConfiguration() function to update the new USB_Host_ConfigurationNumber global as required. Moved out the Host mode standard request convenience/helper functions from the architecture specific Host driver files to the architecture agnostic HostStandardReq.c driver file.
Diffstat (limited to 'LUFA/Drivers/USB/Core/UC3/Host_UC3.h')
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Host_UC3.h70
1 files changed, 3 insertions, 67 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3/Host_UC3.h b/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
index 7fd46a313..4bcba566b 100644
--- a/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
@@ -208,6 +208,9 @@
/** Suspends the USB bus, preventing any communications from occurring between the host and attached
* device until the bus has been resumed. This stops the transmission of the 1MS Start Of Frame
* messages to the device.
+ *
+ * \note While the USB bus is suspended, all USB interrupt sources are also disabled; this means that
+ * some events (such as device disconnections) will not fire until the bus is resumed.
*/
static inline void USB_Host_SuspendBus(void) ATTR_ALWAYS_INLINE;
static inline void USB_Host_SuspendBus(void)
@@ -277,73 +280,6 @@
return AVR32_USBB.UHCON.resume;
}
- /* Function Prototypes: */
- /** Convenience function. This routine sends a SET CONFIGURATION 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[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(const uint8_t ConfigNumber);
-
- /** Convenience function. This routine sends a GET DESCRIPTOR 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* const DeviceDescriptorPtr);
-
- /** Convenience function. This routine sends a GET DESCRIPTOR standard request to the attached
- * device, requesting the string descriptor of the specified index. This can be used to easily
- * retrieve string descriptors from the device by index, after the index is obtained from the
- * Device or Configuration descriptors.
- *
- * \note After this routine returns, the control pipe will be selected.
- *
- * \param[in] Index Index of the string index to retrieve.
- * \param[out] Buffer Pointer to the destination buffer where the retrieved string descriptor is
- * to be stored.
- * \param[in] BufferLength Maximum size of the string descriptor which can be stored into the buffer.
- *
- * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
- */
- uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
- void* const Buffer,
- const uint8_t BufferLength);
-
- /** Clears a stall condition on the given pipe, via a CLEAR FEATURE standard 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, including the endpoint's direction.
- *
- * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
- */
- uint8_t USB_Host_ClearPipeStall(const uint8_t EndpointIndex);
-
- /** Selects a given alternative setting for the specified interface, via a SET INTERFACE standard request to
- * the attached device.
- *
- * \note After this routine returns, the control pipe will be selected.
- *
- * \param[in] InterfaceIndex Index of the interface whose alternative setting is to be altered.
- * \param[in] AltSetting Index of the interface's alternative setting which is to be selected.
- *
- * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
- */
- uint8_t USB_Host_SetInterfaceAltSetting(const uint8_t InterfaceIndex,
- const uint8_t AltSetting);
-
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */