aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-09-29 13:56:52 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-09-29 13:56:52 +0000
commita509729b2d92b03a3d33ab0e1e1950ff65a96a09 (patch)
tree3d0b2af8b2bd50b8380d2e4f753134c997a81d6a /LUFA/Drivers/USB/HighLevel
parentc0e4f52e8fecf74bc26ba813522aa96300bb844e (diff)
downloadlufa-a509729b2d92b03a3d33ab0e1e1950ff65a96a09.tar.gz
lufa-a509729b2d92b03a3d33ab0e1e1950ff65a96a09.tar.bz2
lufa-a509729b2d92b03a3d33ab0e1e1950ff65a96a09.zip
Changed default value for the reset polarity parameter in the AVRISP-MKII project so that it defaults to active low drive.
Fixed incorrect USB_DeviceState value when unconfiguring the device without an address set.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel')
-rw-r--r--LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
index 83c85ded5..d13ac7439 100644
--- a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
@@ -191,7 +191,10 @@ static void USB_Device_SetConfiguration(void)
Endpoint_ClearStatusStage();
- USB_DeviceState = (USB_ConfigurationNumber) ? DEVICE_STATE_Configured : DEVICE_STATE_Addressed;
+ if (USB_ConfigurationNumber)
+ USB_DeviceState = DEVICE_STATE_Configured;
+ else
+ USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Configured : DEVICE_STATE_Powered;
EVENT_USB_Device_ConfigurationChanged();
}