From 41b54a2acd2d5515cc7f3f1ed1c3d3b17d1988a1 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 30 Jul 2009 11:03:58 +0000 Subject: Set all CDC and MassStorage device mode demos (LowLevel and ClassDriver) to use the USE_INTERNAL_SERIAL feature, add compile time warnings for devices which do not have an internal serial. --- Demos/Device/LowLevel/USBtoSerial/Descriptors.c | 2 +- Demos/Device/LowLevel/USBtoSerial/Descriptors.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Demos/Device/LowLevel/USBtoSerial') diff --git a/Demos/Device/LowLevel/USBtoSerial/Descriptors.c b/Demos/Device/LowLevel/USBtoSerial/Descriptors.c index 088ab5940..c586d68cc 100644 --- a/Demos/Device/LowLevel/USBtoSerial/Descriptors.c +++ b/Demos/Device/LowLevel/USBtoSerial/Descriptors.c @@ -59,7 +59,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .ManufacturerStrIndex = 0x01, .ProductStrIndex = 0x02, - .SerialNumStrIndex = NO_DESCRIPTOR, + .SerialNumStrIndex = USE_INTERNAL_SERIAL, .NumberOfConfigurations = 1 }; diff --git a/Demos/Device/LowLevel/USBtoSerial/Descriptors.h b/Demos/Device/LowLevel/USBtoSerial/Descriptors.h index bf9e7df1d..a3d101e8b 100644 --- a/Demos/Device/LowLevel/USBtoSerial/Descriptors.h +++ b/Demos/Device/LowLevel/USBtoSerial/Descriptors.h @@ -41,6 +41,10 @@ #include + #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR) + #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor. + #endif + /* Macros: */ /** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a * uniform structure but variable sized data payloads, thus cannot be represented accurately by -- cgit v1.2.3