Merge pull request #121 from NicoHood/internalserial
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 18 Feb 2018 06:44:49 +0000 (17:44 +1100)
committerGitHub <noreply@github.com>
Sun, 18 Feb 2018 06:44:49 +0000 (17:44 +1100)
Allow user override of the USE_INTERNAL_SERIAL serial number string index (thanks to Nicohood).

LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
LUFA/Drivers/USB/Core/UC3/Device_UC3.h
LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h

index d3c979e..6b5c319 100644 (file)
                                 *  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.
                                 */
+                               #ifndef USE_INTERNAL_SERIAL
                                #define USE_INTERNAL_SERIAL            0xDC
+                               #endif
 
                                /** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
                                 *  model.
index 2abbfe0..dde7166 100644 (file)
                                 *  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.
                                 */
+                               #ifndef USE_INTERNAL_SERIAL
                                #define USE_INTERNAL_SERIAL             0xDC
+                               #endif
 
                                /** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
                                 *  model.
index 6b2ea60..526fae0 100644 (file)
                                 *  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.
                                 */
+                               #ifndef USE_INTERNAL_SERIAL
                                #define USE_INTERNAL_SERIAL            0xDC
+                               #endif
 
                                /** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
                                 *  model.