Fix XMEGA architecture not correctly resetting the device address and endpoints in...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 9 Feb 2012 20:27:03 +0000 (20:27 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 9 Feb 2012 20:27:03 +0000 (20:27 +0000)
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c

index 154e4d7..27ffb06 100644 (file)
@@ -90,6 +90,9 @@ ISR(USB_BUSEVENT_vect)
                USB_DeviceState                = DEVICE_STATE_Default;
                USB_Device_ConfigurationNumber = 0;
 
+               USB_Device_SetDeviceAddress(0);
+
+               Endpoint_ClearEndpoints();
                Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
                                           ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
                                           ENDPOINT_BANK_SINGLE);