diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-01-03 10:53:47 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-01-03 10:53:47 +0000 |
commit | 2608fd1dd48096c1867676de337767ff3fb1a951 (patch) | |
tree | cca01486688aaa7dfa9426a0afdf23f0834f5c87 /LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h | |
parent | 7d037c7db812be4dac1a742c990f3631fbd82cb5 (diff) | |
download | lufa-2608fd1dd48096c1867676de337767ff3fb1a951.tar.gz lufa-2608fd1dd48096c1867676de337767ff3fb1a951.tar.bz2 lufa-2608fd1dd48096c1867676de337767ff3fb1a951.zip |
Fixed hardware race condition that could cause failed device enumerations for AVR8 and UC3 architectures (thanks to Mike Beyhs).
Fixed incorrect Minimus board LED definitions (thanks to Joonas Lahtinen).
Fixed incorrect LED masks for received data display in the Device GenericHID demos (thanks to Denys Berkovskyy).
Diffstat (limited to 'LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h')
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h index d60cb336a..e0435e21b 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h +++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h @@ -210,10 +210,13 @@ static inline void USB_Device_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void USB_Device_SetDeviceAddress(const uint8_t Address) { - uint8_t Temp = (UDADDR & (1 << ADDEN)) | (Address & 0x7F); + UDADDR = (UDADDR & (1 << ADDEN)) | (Address & 0x7F); + } - UDADDR = Temp; - UDADDR = Temp | (1 << ADDEN); + static inline void USB_Device_EnableDeviceAddress(void) ATTR_ALWAYS_INLINE; + static inline void USB_Device_EnableDeviceAddress(void) + { + UDADDR |= (1 << ADDEN); } static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; |