diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-09-19 05:46:17 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-09-19 05:46:17 +0000 |
commit | 01fecac0a70b02ccb197091935052fcfc9955b26 (patch) | |
tree | 70077edc3850e20b9e680ba533155bada92cf079 /LUFA/Drivers/USB/LowLevel/Device.h | |
parent | cce8760b9169dffe1a126e221f4b4c48c83192b9 (diff) | |
download | lufa-01fecac0a70b02ccb197091935052fcfc9955b26.tar.gz lufa-01fecac0a70b02ccb197091935052fcfc9955b26.tar.bz2 lufa-01fecac0a70b02ccb197091935052fcfc9955b26.zip |
Ensure device address latch bit is not set at the same time as the new address, as per datasheet.
Minor documentation fixes.
Fix broken USB host mode due to the USB frame counter not being updated during the early enumeration steps, causing USB_Host_DelayMS() to spinloop forever.
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 |