diff --git a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c index 4fc242f34b..98887009cc 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.c @@ -79,6 +79,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer, return ENDPOINT_RWCSTREAM_DeviceDisconnected; else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) return ENDPOINT_RWCSTREAM_BusSuspended; + else if (Endpoint_IsSETUPReceived()) + return ENDPOINT_RWCSTREAM_HostAborted; } return ENDPOINT_RWCSTREAM_NoError; diff --git a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c index 4fc242f34b..98887009cc 100644 --- a/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.c @@ -79,6 +79,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer, return ENDPOINT_RWCSTREAM_DeviceDisconnected; else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) return ENDPOINT_RWCSTREAM_BusSuspended; + else if (Endpoint_IsSETUPReceived()) + return ENDPOINT_RWCSTREAM_HostAborted; } return ENDPOINT_RWCSTREAM_NoError; diff --git a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c index 5bd4092e41..703f253c06 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c @@ -81,6 +81,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer, return ENDPOINT_RWCSTREAM_DeviceDisconnected; else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) return ENDPOINT_RWCSTREAM_BusSuspended; + else if (Endpoint_IsSETUPReceived()) + return ENDPOINT_RWCSTREAM_HostAborted; } return ENDPOINT_RWCSTREAM_NoError;