aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/ClassDriver
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-09 04:18:37 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-09 04:18:37 +0000
commitd2068d878c2ef6c4a68e85215d9d4a3b376089c2 (patch)
treec135a22d010e7167e9876122a2dc186b82501d73 /Demos/Host/ClassDriver
parent6f993a2f750f87e3632e41ff08ba9e49813e4719 (diff)
downloadlufa-d2068d878c2ef6c4a68e85215d9d4a3b376089c2.tar.gz
lufa-d2068d878c2ef6c4a68e85215d9d4a3b376089c2.tar.bz2
lufa-d2068d878c2ef6c4a68e85215d9d4a3b376089c2.zip
Finish Still Image Host class driver.
Diffstat (limited to 'Demos/Host/ClassDriver')
-rw-r--r--Demos/Host/ClassDriver/StillImageHost/StillImageHost.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
index ef073abd5..20648563d 100644
--- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
+++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
@@ -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");