aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h')
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h9
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;