X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/064e6a2f32719da5b7ed2ff3a8a32c5788e753d0..cf610c5c91c3eee02dec7ca848acc8da831ad98a:/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c index ef073abd5..d8146af29 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c @@ -51,7 +51,7 @@ USB_ClassInfo_SI_Host_t DigitalCamera_SI_Interface = }; /** Main program entry point. This routine configures the hardware required by the application, then - * starts the scheduler to run the application tasks. + * enters a loop to run the application tasks in sequence. */ int main(void) { @@ -111,7 +111,15 @@ int main(void) } printf("Turning off Device...\r\n"); - SImage_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, 0, 0, 0, NULL); + + SImage_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, NULL); + if (SImage_Host_ReceiveResponse(&DigitalCamera_SI_Interface)) + { + printf("Could not turn off device.\r\n"); + USB_HostState = HOST_STATE_WaitForDeviceRemoval; + break; + } + printf("Device Off.\r\n"); printf("Closing Session...\r\n");