X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8a68203d3451c50c573c6baf4850e72d8dbabfcb..c1be3073939c71d17c92fcbce4e1690d0a1443f0:/Demos/Host/LowLevel/StillImageHost/StillImageHost.c diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c index dfc7cb7c1..ca0771a94 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c @@ -166,14 +166,11 @@ void StillImage_Task(void) break; } + puts_P(PSTR("Still Image Device Enumerated.\r\n")); + USB_HostState = HOST_STATE_Configured; break; case HOST_STATE_Configured: - puts_P(PSTR("Still Image Device Enumerated.\r\n")); - - USB_HostState = HOST_STATE_Ready; - break; - case HOST_STATE_Ready: /* Indicate device busy via the status LEDs */ LEDs_SetAllLEDs(LEDMASK_USB_BUSY); @@ -331,9 +328,7 @@ void StillImage_Task(void) /* Indicate device no longer busy */ LEDs_SetAllLEDs(LEDMASK_USB_READY); - /* Wait until USB device disconnected */ - while (USB_IsConnected); - + USB_HostState = HOST_STATE_WaitForDeviceRemoval; break; } } @@ -352,7 +347,7 @@ void UnicodeToASCII(uint8_t* UnicodeString, char* Buffer) /* Loop through the entire unicode string */ while (CharactersRemaining--) { - /* Load in the next unicode character (only the lower byte, only Unicode coded ASCII supported) */ + /* Load in the next unicode character (only the lower byte, as only Unicode coded ASCII is supported) */ *(Buffer++) = *UnicodeString; /* Jump to the next unicode character */