Fix Mass Storage Host Class driver GetMaxLUN command - incorrect function return codes used in comparison to check for success.

Add HID Host Class driver functions to set the report protocol, add more class driver documentation.
This commit is contained in:
Dean Camera 2009-09-17 13:12:21 +00:00
parent eaa914a4e4
commit 7c6b2019a3
10 changed files with 134 additions and 20 deletions

View file

@ -274,8 +274,10 @@ static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* MSInterfaceInf
if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t),
NO_STREAM_CALLBACK)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
{
return ErrorCode;
}
Pipe_ClearIN();
Pipe_Freeze();
@ -322,14 +324,10 @@ uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* MSInterfaceInfo, uint8_t* Max
Pipe_SelectPipe(PIPE_CONTROLPIPE);
if ((ErrorCode = USB_Host_SendControlRequest(MaxLUNIndex)) == HOST_SENDCONTROL_SetupStalled)
{
Pipe_ClearStall();
*MaxLUNIndex = 0;
}
if ((ErrorCode = USB_Host_SendControlRequest(MaxLUNIndex)) != HOST_SENDCONTROL_Successful)
*MaxLUNIndex = 0;
return HOST_SENDCONTROL_SetupStalled;
return ErrorCode;
}
uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* MSInterfaceInfo, uint8_t LUNIndex, SCSI_Inquiry_Response_t* InquiryData)