X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/2ee9fc707784e115d744dbc229bdc893f4bb6bc1..f51017f8fb5a02029bce577e3d7226cb5158d830:/LUFA/Drivers/USB/LowLevel/LowLevel.c?ds=inline diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c index 346420f47..82705db96 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.c +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c @@ -38,6 +38,8 @@ volatile uint8_t USB_CurrentMode = USB_MODE_NONE; volatile uint8_t USB_Options; #endif +volatile bool FrameElapsed; + void USB_Init( #if defined(USB_CAN_BE_BOTH) const uint8_t Mode @@ -150,6 +152,8 @@ void USB_ResetInterface(void) USB_INT_DisableAllInterrupts(); USB_INT_ClearAllInterrupts(); + FrameElapsed = false; + USB_IsConnected = false; #if defined(USB_CAN_BE_HOST) @@ -206,7 +210,7 @@ void USB_ResetInterface(void) { USB_Descriptor_Device_t* DeviceDescriptorPtr; - if (USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr) != NO_DESCRIPTOR) + if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr) != NO_DESCRIPTOR) { #if defined(USE_RAM_DESCRIPTORS) USB_ControlEndpointSize = DeviceDescriptorPtr->Endpoint0Size; @@ -224,7 +228,6 @@ void USB_ResetInterface(void) #if defined(USB_DEVICE_ONLY) USB_INT_Enable(USB_INT_SUSPEND); USB_INT_Enable(USB_INT_EORSTI); - #if defined(CONTROL_ONLY_DEVICE) UENUM = ENDPOINT_CONTROLEP; #endif