diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2014-06-08 15:33:29 +1000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2014-06-08 15:33:29 +1000 |
commit | b8f7dae24ca990ee664fc0e63c8498007d2e9ffb (patch) | |
tree | c7037704a321edc2587c30e3d97533347d9fc185 /LUFA/Drivers/USB/Core/XMEGA/Template | |
parent | 910c6eb59966714870e4f10db12d2963fe97baf6 (diff) | |
download | lufa-b8f7dae24ca990ee664fc0e63c8498007d2e9ffb.tar.gz lufa-b8f7dae24ca990ee664fc0e63c8498007d2e9ffb.tar.bz2 lufa-b8f7dae24ca990ee664fc0e63c8498007d2e9ffb.zip |
Fix possible infinite loop in the control stream write template functions.
Diffstat (limited to 'LUFA/Drivers/USB/Core/XMEGA/Template')
-rw-r--r-- | LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 5bd4092e4..703f253c0 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; |