From 6122ba93cf957bd495fdd1838bac16fb24896a17 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 4 Jan 2010 13:34:02 +0000 Subject: Fix MassStorageKeyboard demo USE_INTERNAL_SERIAL check being performed before the required library headers were included, causing a compilation error. Added notes to the class driver functions indicating which functions require what Device/Host state machine states to function. --- Projects/Incomplete/StandaloneProgrammer/DiskHost.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Projects/Incomplete/StandaloneProgrammer/DiskHost.c') diff --git a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c index ef69df2c6..e50fc30af 100644 --- a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c +++ b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c @@ -79,8 +79,6 @@ void DiskHost_USBTask(void) return; } - USB_HostState = HOST_STATE_Configured; - uint8_t MaxLUNIndex; if (MS_Host_GetMaxLUN(&DiskHost_MS_Interface, &MaxLUNIndex)) { @@ -96,6 +94,10 @@ void DiskHost_USBTask(void) return; } + USB_HostState = HOST_STATE_Configured; + + /* Note: For the RequestSense call to work, the host state machine must be in the + * Configured state, or the call will be aborted */ SCSI_Request_Sense_Response_t SenseData; if (MS_Host_RequestSense(&DiskHost_MS_Interface, 0, &SenseData) != 0) { -- cgit v1.2.3