Fixed Mass Storage Host Class driver and Low Level demo not clearing the error condition if an attached device returns a STALL to a GET MAX LUN request (thanks to Martin Luxen).
This commit is contained in:
parent
478d9dc04f
commit
c49bdcb7c9
4 changed files with 20 additions and 4 deletions
|
@ -305,7 +305,7 @@ uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
|
|||
|
||||
uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_t* const MaxLUNIndex)
|
||||
{
|
||||
uint8_t ErrorCode;
|
||||
uint8_t ErrorCode = HOST_SENDCONTROL_Successful;
|
||||
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
{
|
||||
|
@ -319,7 +319,10 @@ uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_
|
|||
Pipe_SelectPipe(PIPE_CONTROLPIPE);
|
||||
|
||||
if ((ErrorCode = USB_Host_SendControlRequest(MaxLUNIndex)) != HOST_SENDCONTROL_Successful)
|
||||
*MaxLUNIndex = 0;
|
||||
{
|
||||
*MaxLUNIndex = 0;
|
||||
ErrorCode = HOST_SENDCONTROL_Successful;
|
||||
}
|
||||
|
||||
return ErrorCode;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue