X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/cce8760b9169dffe1a126e221f4b4c48c83192b9..01fecac0a70b02ccb197091935052fcfc9955b26:/LUFA/Drivers/USB/LowLevel/Device.h 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