X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5e14c194c9a2f5cb52a43f7efeacb795a38ced74..fc31973daffea3506051ce51a5f79383ce0867d6:/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c index 7868060fe..8a5be11f1 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c @@ -18,6 +18,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length) if (USB_DeviceState == DEVICE_STATE_Unattached) return ENDPOINT_RWCSTREAM_DeviceDisconnected; + else if (USB_DeviceState == DEVICE_STATE_Suspended) + return ENDPOINT_RWCSTREAM_BusSuspended; if (Endpoint_IsINReady()) { @@ -38,7 +40,9 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length) while (!(Endpoint_IsOUTReceived())) { if (USB_DeviceState == DEVICE_STATE_Unattached) - return ENDPOINT_RWCSTREAM_DeviceDisconnected; + return ENDPOINT_RWCSTREAM_DeviceDisconnected; + else if (USB_DeviceState == DEVICE_STATE_Suspended) + return ENDPOINT_RWCSTREAM_BusSuspended; } return ENDPOINT_RWCSTREAM_NoError;