Fix memory corruption in Host mode Mass Storage Class driver.
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 27 Aug 2009 08:01:33 +0000 (08:01 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 27 Aug 2009 08:01:33 +0000 (08:01 +0000)
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
Demos/Host/makefile
LUFA/Drivers/USB/Class/Host/MassStorage.c

index 57aba45..0155335 100644 (file)
@@ -98,7 +98,7 @@ int main(void)
                                        break;\r
                                }\r
                                \r
-                               printf("Mouse Enumerated.\r\n");\r
+                               printf("Mass Storage Device Enumerated.\r\n");\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
                        case HOST_STATE_Configured:\r
index 2da9893..aa7b4cf 100644 (file)
@@ -14,5 +14,5 @@
 # code.
 
 %:
-       #make -C ClassDriver/ $@  -- TODO: Re-enable once Host Mode class drivers complete
+       @echo TODO: Re-enable building of Host mode Class Driver demos once complete
        make -C LowLevel/ $@
index 6c01ed4..3db4aaf 100644 (file)
@@ -242,7 +242,7 @@ static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* MSInterfaceInfo,
 }\r
 \r
 static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* MSInterfaceInfo,\r
-                                           MS_CommandStatusWrapper_t* SCSICommandStatus)\r
+                                         MS_CommandStatusWrapper_t* SCSICommandStatus)\r
 {\r
        uint8_t ErrorCode = PIPE_RWSTREAM_NoError;\r
 \r
@@ -252,7 +252,7 @@ static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* MSInterfaceInf
        Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);\r
        Pipe_Unfreeze();\r
        \r
-       if ((ErrorCode = Pipe_Read_Stream_LE(&SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t))) != PIPE_RWSTREAM_NoError)\r
+       if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t))) != PIPE_RWSTREAM_NoError)\r
          return ErrorCode;\r
          \r
        Pipe_ClearIN();\r