Fixed incorrect USB device state set when a suspended LUFA device is woken while addressed but not configured (thanks to Balaji Krishnan)

This commit is contained in:
Dean Camera 2013-07-15 20:47:43 +02:00
parent 37ba9ec326
commit 7cd9e0dbc4
4 changed files with 4 additions and 3 deletions

View file

@ -150,7 +150,7 @@ ISR(USB_GEN_vect, ISR_BLOCK)
if (USB_Device_ConfigurationNumber)
USB_DeviceState = DEVICE_STATE_Configured;
else
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Configured : DEVICE_STATE_Powered;
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Addressed : DEVICE_STATE_Powered;
#if defined(USB_SERIES_2_AVR) && !defined(NO_LIMITED_CONTROLLER_CONNECT)
EVENT_USB_Device_Connect();

View file

@ -103,7 +103,7 @@ ISR(USB_GEN_vect)
if (USB_Device_ConfigurationNumber)
USB_DeviceState = DEVICE_STATE_Configured;
else
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Configured : DEVICE_STATE_Powered;
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Addressed : DEVICE_STATE_Powered;
EVENT_USB_Device_WakeUp();
}

View file

@ -77,7 +77,7 @@ ISR(USB_BUSEVENT_vect)
if (USB_Device_ConfigurationNumber)
USB_DeviceState = DEVICE_STATE_Configured;
else
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Configured : DEVICE_STATE_Powered;
USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Addressed : DEVICE_STATE_Powered;
#if !defined(NO_LIMITED_CONTROLLER_CONNECT)
EVENT_USB_Device_Connect();