diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-26 09:58:43 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-26 09:58:43 +0000 |
commit | 1756087c3e1ecd21a594eaf7415c12ba1c852a32 (patch) | |
tree | af19541b036148bfe72ff42e6166802a71f11e80 /Demos/Host/ClassDriver/CDCHost/CDCHost.c | |
parent | b2cf4d32221075c96a7487b1fc0baa2598d373fe (diff) | |
download | lufa-1756087c3e1ecd21a594eaf7415c12ba1c852a32.tar.gz lufa-1756087c3e1ecd21a594eaf7415c12ba1c852a32.tar.bz2 lufa-1756087c3e1ecd21a594eaf7415c12ba1c852a32.zip |
Optimize vendor/product description string display code in MassStorageHost.
Remove all Host mode class demos other than the CDCHost class driver demo, so that they can be re-added as they are made once the host mode class framework is designed.
Fixed USB_Host_SendControlRequest() not re-suspending the USB bus when initial device ready-wait fails.
Fixed USB Pad regulator not being disabled on some AVR models when the USB_OPT_REG_DISABLED option is used.
Diffstat (limited to 'Demos/Host/ClassDriver/CDCHost/CDCHost.c')
-rw-r--r-- | Demos/Host/ClassDriver/CDCHost/CDCHost.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.c b/Demos/Host/ClassDriver/CDCHost/CDCHost.c index 96b4b43ff..eb45afe80 100644 --- a/Demos/Host/ClassDriver/CDCHost/CDCHost.c +++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.c @@ -69,6 +69,21 @@ int main(void) for (;;)
{
+ switch (USB_HostState)
+ {
+ case HOST_STATE_Addressed:
+ if (!(CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface)))
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+
+ USB_HostState = HOST_STATE_Configured;
+ break;
+ case HOST_STATE_Configured:
+ USB_HostState = HOST_STATE_Ready;
+ break;
+ case HOST_STATE_Ready:
+ break;
+ }
+
CDC_Host_USBTask(&VirtualSerial_CDC_Interface);
USB_USBTask();
}
|