Added new ENDPOINT_*_BusSuspended error code to the Endpoint function, so that the stream functions early-abort if the bus is suspended before or during a transfer.
This commit is contained in:
parent
5c0c0327d5
commit
eed7d4df6a
9 changed files with 34 additions and 10 deletions
|
@ -120,6 +120,8 @@ uint8_t Endpoint_WaitUntilReady(void)
|
|||
|
||||
if (USB_DeviceState == DEVICE_STATE_Unattached)
|
||||
return ENDPOINT_READYWAIT_DeviceDisconnected;
|
||||
else if (USB_DeviceState == DEVICE_STATE_Suspended)
|
||||
return ENDPOINT_READYWAIT_BusSuspended;
|
||||
else if (Endpoint_IsStalled())
|
||||
return ENDPOINT_READYWAIT_EndpointStalled;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue