Move check for devices not supporting internal serials in demos which make use of...
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 1 Sep 2009 11:16:57 +0000 (11:16 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 1 Sep 2009 11:16:57 +0000 (11:16 +0000)
17 files changed:
Demos/Device/ClassDriver/CDC/Descriptors.c
Demos/Device/ClassDriver/CDC/Descriptors.h
Demos/Device/ClassDriver/DualCDC/Descriptors.c
Demos/Device/ClassDriver/DualCDC/Descriptors.h
Demos/Device/ClassDriver/MassStorage/Descriptors.c
Demos/Device/ClassDriver/MassStorage/Descriptors.h
Demos/Device/ClassDriver/USBtoSerial/Descriptors.c
Demos/Device/ClassDriver/USBtoSerial/Descriptors.h
Demos/Device/LowLevel/CDC/Descriptors.c
Demos/Device/LowLevel/CDC/Descriptors.h
Demos/Device/LowLevel/DualCDC/Descriptors.c
Demos/Device/LowLevel/DualCDC/Descriptors.h
Demos/Device/LowLevel/MassStorage/Descriptors.c
Demos/Device/LowLevel/MassStorage/Descriptors.h
Demos/Device/LowLevel/USBtoSerial/Descriptors.c
Demos/Device/LowLevel/USBtoSerial/Descriptors.h
LUFA/ManPages/ChangeLog.txt

index 5a8cc7a..c8e0a9c 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index a764b2b..33ceab9 100644 (file)
 \r
                #include <LUFA/Drivers/USB/USB.h>\r
                #include <LUFA/Drivers/USB/Class/CDC.h>\r
-               \r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
 \r
        /* Macros: */\r
                /** Endpoint number of the CDC device-to-host notification IN endpoint. */\r
index 8815b9e..d760195 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index 739303e..49befad 100644 (file)
                #include <LUFA/Drivers/USB/USB.h>\r
                #include <LUFA/Drivers/USB/Class/CDC.h>\r
 \r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
-\r
        /* Macros: */\r
                /** Endpoint number of the first CDC interface's device-to-host notification IN endpoint. */\r
                #define CDC1_NOTIFICATION_EPNUM        3\r
index b824923..4dcc4bb 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index 5cf653a..6d90b3d 100644 (file)
                #include <LUFA/Drivers/USB/USB.h>\r
                #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
 \r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
-\r
        /* Macros: */\r
                /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */\r
                #define MASS_STORAGE_IN_EPNUM          3        \r
index f88a5f8..60f2c32 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index f78f395..730acc6 100644 (file)
                #include <LUFA/Drivers/USB/USB.h>\r
                #include <LUFA/Drivers/USB/Class/CDC.h>\r
 \r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
-\r
        /* Macros: */\r
                /** Endpoint number of the CDC device-to-host notification IN endpoint. */\r
                #define CDC_NOTIFICATION_EPNUM         2\r
index e81b034..2d857a6 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index a3d101e..08e2e35 100644 (file)
                #include <LUFA/Drivers/USB/USB.h>\r
 \r
                #include <avr/pgmspace.h>\r
-\r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
                \r
        /* Macros: */\r
                /** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a\r
index a7f7b03..e64bfb1 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index 781ba5c..de4dd27 100644 (file)
                #include <LUFA/Drivers/USB/USB.h>\r
 \r
                #include <avr/pgmspace.h>\r
-\r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
                \r
        /* Macros: */\r
                /** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a\r
index b824923..4dcc4bb 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index 9b9dd7d..0fa147b 100644 (file)
 \r
                #include <avr/pgmspace.h>\r
 \r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
-\r
        /* Macros: */\r
                /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */\r
                #define MASS_STORAGE_IN_EPNUM          3        \r
index d3f7e92..495ab3e 100644 (file)
 \r
 #include "Descriptors.h"\r
 \r
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as\r
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.\r
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated\r
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices\r
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value\r
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and\r
+ * port location).\r
+ */\r
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
+       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
+#endif\r
+\r
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
  *  device characteristics, including the supported USB version, control endpoint size and the\r
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration\r
index a3d101e..08e2e35 100644 (file)
                #include <LUFA/Drivers/USB/USB.h>\r
 \r
                #include <avr/pgmspace.h>\r
-\r
-               #if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)\r
-                       #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.\r
-               #endif\r
                \r
        /* Macros: */\r
                /** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a\r
index 14dab76..3280e8e 100644 (file)
@@ -13,7 +13,7 @@
   *  - Added flag to the HID report parser to indicate if a device has multiple reports\r
   *  - Added new EVENT_USB_Device_StartOfFrame() event, controlled by the new USB_Device_EnableSOFEvents() and\r
   *    USB_Device_DisableSOFEvents() macros to give bus-synchronised millisecond interrupts when in USB device mode\r
-  *  - Added new Endpoint_SetEndpointDirection() macro for bi-directional endpoints\r
+  *  - Added new Endpoint_SetEndpointDirection() macro for bidirectional endpoints\r
   *  - Added new AVRISP project, a LUFA powered clone of the Atmel AVRISP-MKII programmer\r
   *  - Added ShutDown() functions for all hardware peripheral drivers, so that peripherals can be turned off after use\r
   *  - Added new CDC_Device_Flush() command to the device mode CDC Class driver to flush Device->Host data\r