From 9d506553aa750264ff6045ff9180397993cb37c0 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 21 Jun 2009 08:04:10 +0000
Subject: [PATCH] Trim unique serial number created by the USE_INTERNAL_SERIAL
 option to 12 characters rather than 20 - apparently Windows will implode if a
 serial number is too long.

---
 Demos/Host/ClassDriver/CDCHost/CDCHost.txt | 2 +-
 LUFA/Drivers/Misc/TerminalCodes.h          | 2 +-
 LUFA/Drivers/USB/LowLevel/DevChapter9.c    | 4 ++--
 LUFA/ManPages/FutureChanges.txt            | 1 +
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.txt b/Demos/Host/ClassDriver/CDCHost/CDCHost.txt
index 4fac1d03d..0db804c25 100644
--- a/Demos/Host/ClassDriver/CDCHost/CDCHost.txt
+++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.txt
@@ -40,7 +40,7 @@
  *  
  *  This demo prints out received CDC data through the serial port.
  *  
- *  Not that this demo is only compatible with devices which report the correct CDC
+ *  Note that this demo is only compatible with devices which report the correct CDC
  *  and ACM class, subclass and protocol values. Most USB-Serial cables have vendor
  *  specific features, thus use vendor-specific class/subclass/protocol codes to force
  *  the user to use specialized drivers. This demo is not compatible with such devices.
diff --git a/LUFA/Drivers/Misc/TerminalCodes.h b/LUFA/Drivers/Misc/TerminalCodes.h
index 11dcc03cb..0e67f941d 100644
--- a/LUFA/Drivers/Misc/TerminalCodes.h
+++ b/LUFA/Drivers/Misc/TerminalCodes.h
@@ -47,7 +47,7 @@
  *
  *  \note If desired, the macro DISABLE_TERMINAL_CODES can be defined in the project makefile and passed to the GCC
  *        compiler via the -D switch to disable the terminal codes without modifying the source, for use with non
- *        compatible terminals (any terminal code then equate to empty strings).
+ *        compatible terminals (any terminal codes then equate to empty strings).
  *
  *  Example Usage:
  *  \code
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index 9acf30099..55b49b803 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@ -182,14 +182,14 @@ static void USB_Device_GetDescriptor(void)
 	#if defined(USE_INTERNAL_SERIAL)
 	if (USB_ControlRequest.wValue == ((DTYPE_String << 8) | USE_INTERNAL_SERIAL))
 	{
-		uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 20)];
+		uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 12)];
 
 		SignatureDescriptor[0] = sizeof(SignatureDescriptor);
 		SignatureDescriptor[1] = DTYPE_String;
 		
 		uint16_t* SigUnicodeChars = (uint16_t*)&SignatureDescriptor[2];
 
-		for (uint8_t SerialByteNum = 0; SerialByteNum < 10; SerialByteNum++)
+		for (uint8_t SerialByteNum = 0; SerialByteNum < 6; SerialByteNum++)
 		{
 			char ConvSigString[3];
 
diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt
index 8231ca958..9704131b1 100644
--- a/LUFA/ManPages/FutureChanges.txt
+++ b/LUFA/ManPages/FutureChanges.txt
@@ -24,4 +24,5 @@
   *  - Master LUFA include file
   *  - Debug mode for pipe/endpoint calls
   *  - Add hub support to match Atmel's stack
+  *  - Update Host mode Class Driver demo .txt files
   */
-- 
GitLab