mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-13 12:24:18 +00:00
Call USB_USBTask() in the Endpoint stream functions between packets if INTERRUPT_CONTROL_ENDPOINT is not set. Remove calls to USB_USBTask in the Mass Storage class driver stream read/write continuation checks, since this is now done inside the stream function.
This commit is contained in:
parent
f555ad7ced
commit
154f934b22
@ -166,10 +166,6 @@ static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInte
|
|||||||
(sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) ==
|
(sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) ==
|
||||||
ENDPOINT_RWSTREAM_IncompleteTransfer)
|
ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||||
{
|
{
|
||||||
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
|
||||||
USB_USBTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (MSInterfaceInfo->State.IsMassStoreReset)
|
if (MSInterfaceInfo->State.IsMassStoreReset)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -192,10 +188,6 @@ static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInte
|
|||||||
MSInterfaceInfo->State.CommandBlock.SCSICommandLength, &BytesProcessed) ==
|
MSInterfaceInfo->State.CommandBlock.SCSICommandLength, &BytesProcessed) ==
|
||||||
ENDPOINT_RWSTREAM_IncompleteTransfer)
|
ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||||
{
|
{
|
||||||
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
|
||||||
USB_USBTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (MSInterfaceInfo->State.IsMassStoreReset)
|
if (MSInterfaceInfo->State.IsMassStoreReset)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -236,10 +228,6 @@ static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInt
|
|||||||
sizeof(MS_CommandStatusWrapper_t), &BytesProcessed) ==
|
sizeof(MS_CommandStatusWrapper_t), &BytesProcessed) ==
|
||||||
ENDPOINT_RWSTREAM_IncompleteTransfer)
|
ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||||
{
|
{
|
||||||
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
|
||||||
USB_USBTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (MSInterfaceInfo->State.IsMassStoreReset)
|
if (MSInterfaceInfo->State.IsMassStoreReset)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,8 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
|||||||
return PIPE_RWSTREAM_IncompleteTransfer;
|
return PIPE_RWSTREAM_IncompleteTransfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USB_USBTask();
|
||||||
|
|
||||||
if ((ErrorCode = Pipe_WaitUntilReady()))
|
if ((ErrorCode = Pipe_WaitUntilReady()))
|
||||||
return ErrorCode;
|
return ErrorCode;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer,
|
|||||||
return ENDPOINT_RWSTREAM_IncompleteTransfer;
|
return ENDPOINT_RWSTREAM_IncompleteTransfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
||||||
|
USB_USBTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((ErrorCode = Endpoint_WaitUntilReady()))
|
if ((ErrorCode = Endpoint_WaitUntilReady()))
|
||||||
return ErrorCode;
|
return ErrorCode;
|
||||||
}
|
}
|
||||||
|
@ -156,10 +156,6 @@ uint8_t Endpoint_WaitUntilReady(void)
|
|||||||
return ENDPOINT_READYWAIT_NoError;
|
return ENDPOINT_READYWAIT_NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
|
||||||
USB_USBTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t USB_DeviceState_LCL = USB_DeviceState;
|
uint8_t USB_DeviceState_LCL = USB_DeviceState;
|
||||||
|
|
||||||
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
|
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
|
||||||
|
@ -172,10 +172,6 @@ uint8_t Pipe_WaitUntilReady(void)
|
|||||||
return PIPE_READYWAIT_NoError;
|
return PIPE_READYWAIT_NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
|
|
||||||
USB_USBTask();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Pipe_IsStalled())
|
if (Pipe_IsStalled())
|
||||||
return PIPE_READYWAIT_PipeStalled;
|
return PIPE_READYWAIT_PipeStalled;
|
||||||
else if (USB_HostState == HOST_STATE_Unattached)
|
else if (USB_HostState == HOST_STATE_Unattached)
|
||||||
|
Loading…
Reference in New Issue
Block a user