diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-21 09:22:31 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-21 09:22:31 +0000 |
commit | 730624f745648cbd32bec7da64833cb2aadd44ea (patch) | |
tree | 1fc67eab7c45f67d3005d3dfdb614629a47c3567 /LUFA/Drivers/USB/LowLevel | |
parent | 9d506553aa750264ff6045ff9180397993cb37c0 (diff) | |
download | lufa-730624f745648cbd32bec7da64833cb2aadd44ea.tar.gz lufa-730624f745648cbd32bec7da64833cb2aadd44ea.tar.bz2 lufa-730624f745648cbd32bec7da64833cb2aadd44ea.zip |
Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number, added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code. Updated Mass Storage and CDC based demos to use the new device serial number if the device it is compiled for supports it.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/DevChapter9.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/DevChapter9.h | 11 |
2 files changed, 2 insertions, 11 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/LowLevel/DevChapter9.c index 55b49b803..4014ed1ca 100644 --- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c +++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.c @@ -179,7 +179,7 @@ static void USB_Device_GetDescriptor(void) void* DescriptorPointer;
uint16_t DescriptorSize;
- #if defined(USE_INTERNAL_SERIAL)
+ #if !defined(NO_INTERNAL_SERIAL) && (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
if (USB_ControlRequest.wValue == ((DTYPE_String << 8) | USE_INTERNAL_SERIAL))
{
uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 12)];
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h index 65fa0418c..505256e68 100644 --- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h +++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h @@ -45,21 +45,12 @@ #include "../HighLevel/USBTask.h"
#include "LowLevel.h"
- /* Preprocessor Checks: */
- #if defined(USE_INTERNAL_SERIAL) && !(defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
- #error USE_INTERNAL_SERIAL invalid, the selected AVR model does not contain unique serial bytes.
- #endif
-
- #if defined(USE_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL <= 1)
- #error USE_INTERNAL_SERIAL must be defined to the string descriptor index chosen for the serial number descriptor.
- #endif
-
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
#endif
- /* Public Interface - May be used in end-application: */
+ /* Public Interface - May be used in end-application: */
/* Global Variables: */
/** Indicates the currently set configuration number of the device. USB devices may have several
* different configurations which the host can select between; this indicates the currently selected
|