aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h')
-rw-r--r--LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h b/LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h
index 7d4802722..73abc107e 100644
--- a/LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h
+++ b/LUFA/Drivers/USB/Core/UC3B/Device_UC3B.h
@@ -82,23 +82,16 @@
#define USB_DEVICE_OPT_FULLSPEED (0 << 0)
//@}
- #if (!defined(NO_INTERNAL_SERIAL) && \
- (defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) || \
- defined(__AVR_ATmega32U6__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) || \
- defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega8U2__)))
- /** String descriptor index for the device's unique serial number string descriptor within the device.
- * This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
- * number allocations) to a device regardless of the port it is plugged in to on the host. Some USB AVRs contain
- * a unique serial number internally, and setting the device descriptors serial number string index to this value
- * will cause it to use the internal serial number.
- *
- * On unsupported devices, this will evaluate to NO_DESCRIPTOR and so will force the host to create a pseudo-serial
- * number for the device.
- */
- #define USE_INTERNAL_SERIAL 0xDC
- #else
- #define USE_INTERNAL_SERIAL NO_DESCRIPTOR
- #endif
+ /** String descriptor index for the device's unique serial number string descriptor within the device.
+ * This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
+ * number allocations) to a device regardless of the port it is plugged in to on the host. Some USB AVRs contain
+ * a unique serial number internally, and setting the device descriptors serial number string index to this value
+ * will cause it to use the internal serial number.
+ *
+ * On unsupported devices, this will evaluate to \ref NO_DESCRIPTOR and so will force the host to create a pseudo-serial
+ * number for the device.
+ */
+ #define USE_INTERNAL_SERIAL NO_DESCRIPTOR
/* Function Prototypes: */
/** Sends a Remote Wakeup request to the host. This signals to the host that the device should
@@ -205,7 +198,7 @@
static inline void USB_Device_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE;
static inline void USB_Device_SetDeviceAddress(const uint8_t Address)
{
- AVR32_USBB.udcon = (AVR32_USBB.udcon & ~AVR32_USBB_UADD_MASK) | Address;
+ AVR32_USBB.UDCON.uadd = Address;
AVR32_USBB.UDCON.adden = true;
}