Fixed hardware race condition that could cause failed device enumerations for AVR8...
[pub/USBasp.git] / LUFA / Drivers / USB / Core / UC3 / Device_UC3.h
index 35e081b..603caad 100644 (file)
                        static inline void USB_Device_SetDeviceAddress(const uint8_t Address)
                        {
                                AVR32_USBB.UDCON.uadd  = Address;
-                               AVR32_USBB.UDCON.adden = (Address ? true : false);
+                       }
+
+                       static inline void USB_Device_EnableDeviceAddress(void) ATTR_ALWAYS_INLINE;
+                       static inline void USB_Device_EnableDeviceAddress(void)
+                       {
+                               AVR32_USBB.UDCON.adden = true;
                        }
 
                        static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;