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.
This commit is contained in:
Dean Camera committed 2010-09-19 05:46:17 +00:00
1 parent cce8760b91
commit 01fecac0a7
8 files changed
+38 -15

No files matched your search

+2 -1
View File
@@ -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