* descriptor does not exist.\r
*/\r
#define NO_DESCRIPTOR 0\r
+\r
+ #if (!defined(NO_INTERNAL_SERIAL) && (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))) || defined(__DOXYGEN__)\r
+ /** String descriptor index for the device's unique serial number string descriptor within the device.\r
+ * This unique serial number is used by the host to associate resources to the device (such as drivers or COM port\r
+ * number allocations) to a device regardless of the port it is plugged in to on the host. Some USB AVRs contain\r
+ * a unique serial number internally, and setting the device descriptors serial number string index to this value\r
+ * will cause it to use the internal serial number.\r
+ *\r
+ * On unsupported devices, this will evaluate to NO_DESCRIPTOR and so will force the host to create a pseduo-serial\r
+ * number for the device.\r
+ */\r
+ #define USE_INTERNAL_SERIAL 0xDC\r
+ #else\r
+ #define USE_INTERNAL_SERIAL NO_DESCRIPTOR\r
+ #endif\r
\r
/** Macro to calculate the power value for the device descriptor, from a given number of milliamps. */\r
#define USB_CONFIG_POWER_MA(mA) (mA >> 1)\r
uint8_t SerialNumStrIndex; /**< String index for the product's globally unique hexadecimal\r
* serial number, in uppercase Unicode ASCII.\r
*\r
+ * \note On some AVR models, there is an embedded serial number\r
+ * in the chip which can be used for the device serial number.\r
+ * To use this serial number, set this to USE_INTERNAL_SERIAL.\r
+ * On unsupported devices, this will evaluate to 0 and will cause\r
+ * the host to generate a pseudo-unique value for the device upon\r
+ * insertion.\r
+ *\r
* \see ManufacturerStrIndex structure entry.\r
*/\r
\r