diff options
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Device.h')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Device.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index 300793612..a37e6d939 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -221,7 +221,8 @@ static inline void USB_Device_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void USB_Device_SetDeviceAddress(const uint8_t Address) { - UDADDR = ((1 << ADDEN) | (Address & 0x7F)); + UDADDR = ((UDADDR & (1 << ADDEN)) | (Address & 0x7F)); + UDADDR |= (1 << ADDEN); } #endif |