Additional file renames and modifications to change CDC demos to VirtualSerial.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 7 Dec 2009 04:35:59 +0000 (04:35 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 7 Dec 2009 04:35:59 +0000 (04:35 +0000)
71 files changed:
Demos/Device/ClassDriver/DualVirtualSerial/Doxygen.conf
Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.c [deleted file]
Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.h [deleted file]
Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.txt [deleted file]
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c [new file with mode: 0644]
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h [new file with mode: 0644]
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt [new file with mode: 0644]
Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualCDC.inf [deleted file]
Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualVirtualSerial.inf [new file with mode: 0644]
Demos/Device/ClassDriver/DualVirtualSerial/makefile
Demos/Device/ClassDriver/VirtualSerial/CDC.c [deleted file]
Demos/Device/ClassDriver/VirtualSerial/CDC.h [deleted file]
Demos/Device/ClassDriver/VirtualSerial/CDC.txt [deleted file]
Demos/Device/ClassDriver/VirtualSerial/Doxygen.conf
Demos/Device/ClassDriver/VirtualSerial/LUFA CDC.inf [deleted file]
Demos/Device/ClassDriver/VirtualSerial/LUFA VirtualSerial.inf [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerial/makefile
Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.c [deleted file]
Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.h [deleted file]
Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.txt [deleted file]
Demos/Device/ClassDriver/VirtualSerialMouse/Doxygen.conf
Demos/Device/ClassDriver/VirtualSerialMouse/LUFA CDCMouse.inf [deleted file]
Demos/Device/ClassDriver/VirtualSerialMouse/LUFA VirtualSerialMouse.inf [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt [new file with mode: 0644]
Demos/Device/ClassDriver/VirtualSerialMouse/makefile
Demos/Device/ClassDriver/makefile
Demos/Device/LowLevel/DualVirtualSerial/Doxygen.conf
Demos/Device/LowLevel/DualVirtualSerial/DualCDC.c [deleted file]
Demos/Device/LowLevel/DualVirtualSerial/DualCDC.h [deleted file]
Demos/Device/LowLevel/DualVirtualSerial/DualCDC.txt [deleted file]
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c [new file with mode: 0644]
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h [new file with mode: 0644]
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt [new file with mode: 0644]
Demos/Device/LowLevel/DualVirtualSerial/LUFA DualCDC.inf [deleted file]
Demos/Device/LowLevel/DualVirtualSerial/LUFA DualVirtualSerial.inf [new file with mode: 0644]
Demos/Device/LowLevel/DualVirtualSerial/makefile
Demos/Device/LowLevel/VirtualSerial/CDC.c [deleted file]
Demos/Device/LowLevel/VirtualSerial/CDC.h [deleted file]
Demos/Device/LowLevel/VirtualSerial/CDC.txt [deleted file]
Demos/Device/LowLevel/VirtualSerial/Doxygen.conf
Demos/Device/LowLevel/VirtualSerial/LUFA CDC.inf [deleted file]
Demos/Device/LowLevel/VirtualSerial/LUFA VirtualSerial.inf [new file with mode: 0644]
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c [new file with mode: 0644]
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h [new file with mode: 0644]
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt [new file with mode: 0644]
Demos/Device/LowLevel/VirtualSerial/makefile
Demos/Device/LowLevel/makefile
Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.c [deleted file]
Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.h [deleted file]
Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.txt [deleted file]
Demos/Host/ClassDriver/VirtualSerialHost/Doxygen.conf
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c [new file with mode: 0644]
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h [new file with mode: 0644]
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.txt [new file with mode: 0644]
Demos/Host/ClassDriver/VirtualSerialHost/makefile
Demos/Host/ClassDriver/makefile
Demos/Host/LowLevel/VirtualSerialHost/CDCHost.c [deleted file]
Demos/Host/LowLevel/VirtualSerialHost/CDCHost.h [deleted file]
Demos/Host/LowLevel/VirtualSerialHost/CDCHost.txt [deleted file]
Demos/Host/LowLevel/VirtualSerialHost/Doxygen.conf
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c [new file with mode: 0644]
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h [new file with mode: 0644]
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.txt [new file with mode: 0644]
Demos/Host/LowLevel/VirtualSerialHost/makefile
Demos/Host/LowLevel/makefile
LUFA.pnproj

index 04af23b..b505cf5 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - Dual CDC Device Demo"\r
+PROJECT_NAME           = "LUFA Library - Dual Virtual Serial Device Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.c b/Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.c
deleted file mode 100644 (file)
index 000d18b..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the DualCDC demo. This file contains the main tasks of\r
- *  the demo and is responsible for the initial application hardware configuration.\r
- */\r
-\r
-#include "DualCDC.h"\r
-\r
-/** LUFA CDC Class driver interface configuration and state information. This structure is\r
- *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another. This is for the first CDC interface,\r
- *  which sends strings to the host for each joystick movement.\r
- */\r
-USB_ClassInfo_CDC_Device_t VirtualSerial1_CDC_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .ControlInterfaceNumber           = 0,\r
-\r
-                               .DataINEndpointNumber             = CDC1_TX_EPNUM,\r
-                               .DataINEndpointSize               = CDC_TXRX_EPSIZE,\r
-                               .DataINEndpointDoubleBank         = false,\r
-\r
-                               .DataOUTEndpointNumber            = CDC1_RX_EPNUM,\r
-                               .DataOUTEndpointSize              = CDC_TXRX_EPSIZE,\r
-                               .DataOUTEndpointDoubleBank        = false,\r
-\r
-                               .NotificationEndpointNumber       = CDC1_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize         = CDC_NOTIFICATION_EPSIZE,\r
-                               .NotificationEndpointDoubleBank   = false,\r
-                       },\r
-       };\r
-\r
-/** LUFA CDC Class driver interface configuration and state information. This structure is\r
- *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another. This is for the second CDC interface,\r
- *  which echos back all received data from the host.\r
- */\r
-USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .ControlInterfaceNumber           = 2,\r
-\r
-                               .DataINEndpointNumber             = CDC2_TX_EPNUM,\r
-                               .DataINEndpointSize               = CDC_TXRX_EPSIZE,\r
-                               .DataINEndpointDoubleBank         = false,\r
-\r
-                               .DataOUTEndpointNumber            = CDC2_RX_EPNUM,\r
-                               .DataOUTEndpointSize              = CDC_TXRX_EPSIZE,\r
-                               .DataOUTEndpointDoubleBank        = false,\r
-\r
-                               .NotificationEndpointNumber       = CDC2_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize         = CDC_NOTIFICATION_EPSIZE,\r
-                               .NotificationEndpointDoubleBank   = false,\r
-                       },\r
-       };\r
-\r
-/** Main program entry point. This routine contains the overall program flow, including initial\r
- *  setup of all components and the main program loop.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-       \r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
-       for (;;)\r
-       {\r
-               CheckJoystickMovement();\r
-\r
-               /* Discard all received data on the first CDC interface */\r
-               while (CDC_Device_BytesReceived(&VirtualSerial1_CDC_Interface))\r
-                 CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);\r
-\r
-               /* Echo all received data on the second CDC interface */\r
-               while (CDC_Device_BytesReceived(&VirtualSerial2_CDC_Interface))\r
-                 CDC_Device_SendByte(&VirtualSerial2_CDC_Interface, CDC_Device_ReceiveByte(&VirtualSerial2_CDC_Interface));\r
-                 \r
-               CDC_Device_USBTask(&VirtualSerial1_CDC_Interface);\r
-               CDC_Device_USBTask(&VirtualSerial2_CDC_Interface);\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       Joystick_Init();\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Checks for changes in the position of the board joystick, sending strings to the host upon each change\r
- *  through the first of the CDC interfaces.\r
- */\r
-void CheckJoystickMovement(void)\r
-{\r
-       uint8_t     JoyStatus_LCL = Joystick_GetStatus();\r
-       char*       ReportString  = NULL;\r
-       static bool ActionSent = false;\r
-\r
-       if (JoyStatus_LCL & JOY_UP)\r
-         ReportString = "Joystick Up\r\n";\r
-       else if (JoyStatus_LCL & JOY_DOWN)\r
-         ReportString = "Joystick Down\r\n";\r
-       else if (JoyStatus_LCL & JOY_LEFT)\r
-         ReportString = "Joystick Left\r\n";\r
-       else if (JoyStatus_LCL & JOY_RIGHT)\r
-         ReportString = "Joystick Right\r\n";\r
-       else if (JoyStatus_LCL & JOY_PRESS)\r
-         ReportString = "Joystick Pressed\r\n";\r
-       else\r
-         ActionSent = false;\r
-         \r
-       if ((ReportString != NULL) && (ActionSent == false))\r
-       {\r
-               ActionSent = true;\r
-               \r
-               CDC_Device_SendString(&VirtualSerial1_CDC_Interface, ReportString, strlen(ReportString));               \r
-       }\r
-}\r
-\r
-/** Event handler for the library USB Connection event. */\r
-void EVENT_USB_Device_Connect(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the library USB Disconnection event. */\r
-void EVENT_USB_Device_Disconnect(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the library USB Configuration Changed event. */\r
-void EVENT_USB_Device_ConfigurationChanged(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-\r
-       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial1_CDC_Interface)))\r
-         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-\r
-       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial2_CDC_Interface)))\r
-         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-}\r
-\r
-/** Event handler for the library USB Unhandled Control Request event. */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
-{\r
-       CDC_Device_ProcessControlRequest(&VirtualSerial1_CDC_Interface);\r
-       CDC_Device_ProcessControlRequest(&VirtualSerial2_CDC_Interface);\r
-}\r
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.h b/Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.h
deleted file mode 100644 (file)
index 2f12aca..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for DualCDC.c.\r
- */\r
-\r
-#ifndef _DUAL_CDC_H_\r
-#define _DUAL_CDC_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/power.h>\r
-               #include <string.h>\r
-\r
-               #include "Descriptors.h"\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-               #include <LUFA/Drivers/Board/Joystick.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/USB/Class/CDC.h>\r
-\r
-       /* Macros: */\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-               \r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void CheckJoystickMovement(void);\r
-\r
-               void EVENT_USB_Device_Connect(void);\r
-               void EVENT_USB_Device_Disconnect(void);\r
-               void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_UnhandledControlRequest(void);\r
-\r
-#endif\r
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.txt b/Demos/Device/ClassDriver/DualVirtualSerial/DualCDC.txt
deleted file mode 100644 (file)
index 761769e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage Dual Communications Device Class (Dual Virtual Serial Port) Device\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *  - Series 6 USB AVRs\r
- *  - Series 4 USB AVRs\r
- *  - Series 2 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Device</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Miscellaneous Device Class</td>\r
- *    <td>( Sub-Interface: Communications Device Class (CDC) )</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Common Class</td> \r
- *    <td>( Sub-Interface: Abstract Control Model (ACM) )</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF Interface Association Descriptor ECN</td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  Dual Communications Device Class demonstration application.\r
- *  This gives a simple reference application for implementing\r
- *  a compound device with dual CDC functions acting as a pair\r
- *  of virtual serial ports. This demo uses Interface Association\r
- *  Descriptors to link together the pair of related CDC\r
- *  descriptors for each virtual serial port, which may not be\r
- *  supported in all OSes - Windows Vista is supported, as is\r
- *  XP (although the latter may need a hotfix to function).\r
- *  \r
- *  Joystick actions are transmitted to the host as strings\r
- *  through the first serial port. The device does not respond to\r
- *  serial data sent from the host in the first serial port.\r
- *  \r
- *  The second serial port echoes back data sent from the host.\r
- *  \r
- *  After running this demo for the first time on a new computer,\r
- *  you will need to supply the .INF file located in this demo\r
- *  project's directory as the device's driver when running under\r
- *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
- *  negating the need for custom drivers for the device. Other\r
- *  Operating Systems should automatically use their own inbuilt\r
- *  CDC-ACM drivers.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
new file mode 100644 (file)
index 0000000..000d18b
--- /dev/null
@@ -0,0 +1,191 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the DualCDC demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
+\r
+#include "DualCDC.h"\r
+\r
+/** LUFA CDC Class driver interface configuration and state information. This structure is\r
+ *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another. This is for the first CDC interface,\r
+ *  which sends strings to the host for each joystick movement.\r
+ */\r
+USB_ClassInfo_CDC_Device_t VirtualSerial1_CDC_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .ControlInterfaceNumber           = 0,\r
+\r
+                               .DataINEndpointNumber             = CDC1_TX_EPNUM,\r
+                               .DataINEndpointSize               = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank         = false,\r
+\r
+                               .DataOUTEndpointNumber            = CDC1_RX_EPNUM,\r
+                               .DataOUTEndpointSize              = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank        = false,\r
+\r
+                               .NotificationEndpointNumber       = CDC1_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize         = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank   = false,\r
+                       },\r
+       };\r
+\r
+/** LUFA CDC Class driver interface configuration and state information. This structure is\r
+ *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another. This is for the second CDC interface,\r
+ *  which echos back all received data from the host.\r
+ */\r
+USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .ControlInterfaceNumber           = 2,\r
+\r
+                               .DataINEndpointNumber             = CDC2_TX_EPNUM,\r
+                               .DataINEndpointSize               = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank         = false,\r
+\r
+                               .DataOUTEndpointNumber            = CDC2_RX_EPNUM,\r
+                               .DataOUTEndpointSize              = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank        = false,\r
+\r
+                               .NotificationEndpointNumber       = CDC2_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize         = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank   = false,\r
+                       },\r
+       };\r
+\r
+/** Main program entry point. This routine contains the overall program flow, including initial\r
+ *  setup of all components and the main program loop.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+       \r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+       for (;;)\r
+       {\r
+               CheckJoystickMovement();\r
+\r
+               /* Discard all received data on the first CDC interface */\r
+               while (CDC_Device_BytesReceived(&VirtualSerial1_CDC_Interface))\r
+                 CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);\r
+\r
+               /* Echo all received data on the second CDC interface */\r
+               while (CDC_Device_BytesReceived(&VirtualSerial2_CDC_Interface))\r
+                 CDC_Device_SendByte(&VirtualSerial2_CDC_Interface, CDC_Device_ReceiveByte(&VirtualSerial2_CDC_Interface));\r
+                 \r
+               CDC_Device_USBTask(&VirtualSerial1_CDC_Interface);\r
+               CDC_Device_USBTask(&VirtualSerial2_CDC_Interface);\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       Joystick_Init();\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Checks for changes in the position of the board joystick, sending strings to the host upon each change\r
+ *  through the first of the CDC interfaces.\r
+ */\r
+void CheckJoystickMovement(void)\r
+{\r
+       uint8_t     JoyStatus_LCL = Joystick_GetStatus();\r
+       char*       ReportString  = NULL;\r
+       static bool ActionSent = false;\r
+\r
+       if (JoyStatus_LCL & JOY_UP)\r
+         ReportString = "Joystick Up\r\n";\r
+       else if (JoyStatus_LCL & JOY_DOWN)\r
+         ReportString = "Joystick Down\r\n";\r
+       else if (JoyStatus_LCL & JOY_LEFT)\r
+         ReportString = "Joystick Left\r\n";\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         ReportString = "Joystick Right\r\n";\r
+       else if (JoyStatus_LCL & JOY_PRESS)\r
+         ReportString = "Joystick Pressed\r\n";\r
+       else\r
+         ActionSent = false;\r
+         \r
+       if ((ReportString != NULL) && (ActionSent == false))\r
+       {\r
+               ActionSent = true;\r
+               \r
+               CDC_Device_SendString(&VirtualSerial1_CDC_Interface, ReportString, strlen(ReportString));               \r
+       }\r
+}\r
+\r
+/** Event handler for the library USB Connection event. */\r
+void EVENT_USB_Device_Connect(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the library USB Disconnection event. */\r
+void EVENT_USB_Device_Disconnect(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the library USB Configuration Changed event. */\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial1_CDC_Interface)))\r
+         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+\r
+       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial2_CDC_Interface)))\r
+         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+}\r
+\r
+/** Event handler for the library USB Unhandled Control Request event. */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
+{\r
+       CDC_Device_ProcessControlRequest(&VirtualSerial1_CDC_Interface);\r
+       CDC_Device_ProcessControlRequest(&VirtualSerial2_CDC_Interface);\r
+}\r
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h
new file mode 100644 (file)
index 0000000..2f12aca
--- /dev/null
@@ -0,0 +1,75 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for DualCDC.c.\r
+ */\r
+\r
+#ifndef _DUAL_CDC_H_\r
+#define _DUAL_CDC_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/power.h>\r
+               #include <string.h>\r
+\r
+               #include "Descriptors.h"\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
+               #include <LUFA/Drivers/Board/Joystick.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/USB/Class/CDC.h>\r
+\r
+       /* Macros: */\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
+               void CheckJoystickMovement(void);\r
+\r
+               void EVENT_USB_Device_Connect(void);\r
+               void EVENT_USB_Device_Disconnect(void);\r
+               void EVENT_USB_Device_ConfigurationChanged(void);\r
+               void EVENT_USB_Device_UnhandledControlRequest(void);\r
+\r
+#endif\r
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt
new file mode 100644 (file)
index 0000000..761769e
--- /dev/null
@@ -0,0 +1,84 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage Dual Communications Device Class (Dual Virtual Serial Port) Device\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *  - Series 6 USB AVRs\r
+ *  - Series 4 USB AVRs\r
+ *  - Series 2 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Device</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Miscellaneous Device Class</td>\r
+ *    <td>( Sub-Interface: Communications Device Class (CDC) )</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Common Class</td> \r
+ *    <td>( Sub-Interface: Abstract Control Model (ACM) )</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF Interface Association Descriptor ECN</td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  Dual Communications Device Class demonstration application.\r
+ *  This gives a simple reference application for implementing\r
+ *  a compound device with dual CDC functions acting as a pair\r
+ *  of virtual serial ports. This demo uses Interface Association\r
+ *  Descriptors to link together the pair of related CDC\r
+ *  descriptors for each virtual serial port, which may not be\r
+ *  supported in all OSes - Windows Vista is supported, as is\r
+ *  XP (although the latter may need a hotfix to function).\r
+ *  \r
+ *  Joystick actions are transmitted to the host as strings\r
+ *  through the first serial port. The device does not respond to\r
+ *  serial data sent from the host in the first serial port.\r
+ *  \r
+ *  The second serial port echoes back data sent from the host.\r
+ *  \r
+ *  After running this demo for the first time on a new computer,\r
+ *  you will need to supply the .INF file located in this demo\r
+ *  project's directory as the device's driver when running under\r
+ *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
+ *  negating the need for custom drivers for the device. Other\r
+ *  Operating Systems should automatically use their own inbuilt\r
+ *  CDC-ACM drivers.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualCDC.inf b/Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualCDC.inf
deleted file mode 100644 (file)
index 741bf28..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-;************************************************************\r
-; Windows USB CDC ACM Setup File\r
-; Copyright (c) 2000 Microsoft Corporation\r
-\r
-\r
-[Version]\r
-Signature="$Windows NT$"\r
-Class=Ports\r
-ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
-Provider=%MFGNAME%\r
-LayoutFile=layout.inf\r
-CatalogFile=%MFGFILENAME%.cat\r
-DriverVer=11/15/2007,5.1.2600.0\r
-\r
-[Manufacturer]\r
-%MFGNAME%=DeviceList, NTamd64\r
-\r
-[DestinationDirs]\r
-DefaultDestDir=12\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Windows 2000/XP/Vista-32bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.nt]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.nt\r
-AddReg=DriverInstall.nt.AddReg\r
-\r
-[DriverCopyFiles.nt]\r
-usbser.sys,,,0x20\r
-\r
-[DriverInstall.nt.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.nt.Services]\r
-AddService=usbser, 0x00000002, DriverService.nt\r
-\r
-[DriverService.nt]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vista-64bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.NTamd64]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.NTamd64\r
-AddReg=DriverInstall.NTamd64.AddReg\r
-\r
-[DriverCopyFiles.NTamd64]\r
-%DRIVERFILENAME%.sys,,,0x20\r
-\r
-[DriverInstall.NTamd64.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.NTamd64.Services]\r
-AddService=usbser, 0x00000002, DriverService.NTamd64\r
-\r
-[DriverService.NTamd64]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vendor and Product ID Definitions\r
-;------------------------------------------------------------------------------\r
-; When developing your USB device, the VID and PID used in the PC side\r
-; application program and the firmware on the microcontroller must match.\r
-; Modify the below line to use your VID and PID.  Use the format as shown below.\r
-; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
-; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
-;------------------------------------------------------------------------------\r
-[SourceDisksFiles]\r
-[SourceDisksNames]\r
-[DeviceList]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
-\r
-[DeviceList.NTamd64]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  String Definitions\r
-;------------------------------------------------------------------------------\r
-;Modify these strings to customize your device\r
-;------------------------------------------------------------------------------\r
-[Strings]\r
-MFGFILENAME="CDC_vista"\r
-DRIVERFILENAME ="usbser"\r
-MFGNAME="CCS, Inc."\r
-INSTDISK="LUFA Dual CDC Driver Installer"\r
-DESCRIPTION="Communications Port"\r
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualVirtualSerial.inf b/Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualVirtualSerial.inf
new file mode 100644 (file)
index 0000000..741bf28
--- /dev/null
@@ -0,0 +1,106 @@
+;************************************************************\r
+; Windows USB CDC ACM Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+\r
+[Version]\r
+Signature="$Windows NT$"\r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
+Provider=%MFGNAME%\r
+LayoutFile=layout.inf\r
+CatalogFile=%MFGFILENAME%.cat\r
+DriverVer=11/15/2007,5.1.2600.0\r
+\r
+[Manufacturer]\r
+%MFGNAME%=DeviceList, NTamd64\r
+\r
+[DestinationDirs]\r
+DefaultDestDir=12\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Windows 2000/XP/Vista-32bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.nt]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.nt\r
+AddReg=DriverInstall.nt.AddReg\r
+\r
+[DriverCopyFiles.nt]\r
+usbser.sys,,,0x20\r
+\r
+[DriverInstall.nt.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.nt.Services]\r
+AddService=usbser, 0x00000002, DriverService.nt\r
+\r
+[DriverService.nt]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vista-64bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.NTamd64]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.NTamd64\r
+AddReg=DriverInstall.NTamd64.AddReg\r
+\r
+[DriverCopyFiles.NTamd64]\r
+%DRIVERFILENAME%.sys,,,0x20\r
+\r
+[DriverInstall.NTamd64.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.NTamd64.Services]\r
+AddService=usbser, 0x00000002, DriverService.NTamd64\r
+\r
+[DriverService.NTamd64]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vendor and Product ID Definitions\r
+;------------------------------------------------------------------------------\r
+; When developing your USB device, the VID and PID used in the PC side\r
+; application program and the firmware on the microcontroller must match.\r
+; Modify the below line to use your VID and PID.  Use the format as shown below.\r
+; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
+;------------------------------------------------------------------------------\r
+[SourceDisksFiles]\r
+[SourceDisksNames]\r
+[DeviceList]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
+\r
+[DeviceList.NTamd64]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  String Definitions\r
+;------------------------------------------------------------------------------\r
+;Modify these strings to customize your device\r
+;------------------------------------------------------------------------------\r
+[Strings]\r
+MFGFILENAME="CDC_vista"\r
+DRIVERFILENAME ="usbser"\r
+MFGNAME="CCS, Inc."\r
+INSTDISK="LUFA Dual CDC Driver Installer"\r
+DESCRIPTION="Communications Port"\r
+SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
index 466865a..d8cf086 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = DualCDC\r
+TARGET = DualVirtualSerial\r
 \r
 \r
 # Object files directory\r
diff --git a/Demos/Device/ClassDriver/VirtualSerial/CDC.c b/Demos/Device/ClassDriver/VirtualSerial/CDC.c
deleted file mode 100644 (file)
index 8940ae0..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the CDC demo. This file contains the main tasks of\r
- *  the demo and is responsible for the initial application hardware configuration.\r
- */\r
\r
-#include "CDC.h"\r
-\r
-/** LUFA CDC Class driver interface configuration and state information. This structure is\r
- *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another.\r
- */\r
-USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .ControlInterfaceNumber         = 0,\r
-\r
-                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
-                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
-                               .DataINEndpointDoubleBank       = false,\r
-\r
-                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
-                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
-                               .DataOUTEndpointDoubleBank      = false,\r
-\r
-                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
-                               .NotificationEndpointDoubleBank = false,\r
-                       },\r
-       };\r
-\r
-/** Standard file stream for the CDC interface when set up, so that the virtual CDC COM port can be\r
- *  used like any regular character stream in the C APIs\r
- */\r
-static FILE USBSerialStream;\r
-\r
-/** Main program entry point. This routine contains the overall program flow, including initial\r
- *  setup of all components and the main program loop.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-       \r
-       /* Create a regular character stream for the interface so that it can be used with the stdio.h functions */\r
-       CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream);\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
-       for (;;)\r
-       {\r
-               CheckJoystickMovement();\r
-                \r
-               /* Must throw away unused bytes from the host, or it will lock up while waiting for the device */\r
-               while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))\r
-                 CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);\r
-\r
-               CDC_Device_USBTask(&VirtualSerial_CDC_Interface);\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       Joystick_Init();\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Checks for changes in the position of the board joystick, sending strings to the host upon each change. */\r
-void CheckJoystickMovement(void)\r
-{\r
-       uint8_t     JoyStatus_LCL = Joystick_GetStatus();\r
-       char*       ReportString  = NULL;\r
-       static bool ActionSent    = false;\r
-       \r
-       if (JoyStatus_LCL & JOY_UP)\r
-         ReportString = "Joystick Up\r\n";\r
-       else if (JoyStatus_LCL & JOY_DOWN)\r
-         ReportString = "Joystick Down\r\n";\r
-       else if (JoyStatus_LCL & JOY_LEFT)\r
-         ReportString = "Joystick Left\r\n";\r
-       else if (JoyStatus_LCL & JOY_RIGHT)\r
-         ReportString = "Joystick Right\r\n";\r
-       else if (JoyStatus_LCL & JOY_PRESS)\r
-         ReportString = "Joystick Pressed\r\n";\r
-       else\r
-         ActionSent = false;\r
-         \r
-       if ((ReportString != NULL) && (ActionSent == false))\r
-       {\r
-               ActionSent = true;\r
-\r
-               /* Write the string to the virtual COM port via the created character stream */\r
-               fputs(ReportString, &USBSerialStream);\r
-\r
-               /* Alternatively, without the stream: */\r
-               // CDC_Device_SendString(&VirtualSerial_CDC_Interface, ReportString, strlen(ReportString));\r
-       }\r
-}\r
-\r
-/** Event handler for the library USB Connection event. */\r
-void EVENT_USB_Device_Connect(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the library USB Disconnection event. */\r
-void EVENT_USB_Device_Disconnect(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the library USB Configuration Changed event. */\r
-void EVENT_USB_Device_ConfigurationChanged(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-\r
-       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface)))\r
-         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-}\r
-\r
-/** Event handler for the library USB Unhandled Control Request event. */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
-{\r
-       CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);\r
-}\r
diff --git a/Demos/Device/ClassDriver/VirtualSerial/CDC.h b/Demos/Device/ClassDriver/VirtualSerial/CDC.h
deleted file mode 100644 (file)
index 9cc7248..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for CDC.c.\r
- */\r
-\r
-#ifndef _CDC_H_\r
-#define _CDC_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/power.h>\r
-               #include <string.h>\r
-               #include <stdio.h>\r
-\r
-               #include "Descriptors.h"\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-               #include <LUFA/Drivers/Board/Joystick.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/USB/Class/CDC.h>\r
-\r
-       /* Macros: */\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-               \r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void CheckJoystickMovement(void);\r
-\r
-               void EVENT_USB_Device_Connect(void);\r
-               void EVENT_USB_Device_Disconnect(void);\r
-               void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_UnhandledControlRequest(void);\r
-\r
-#endif\r
diff --git a/Demos/Device/ClassDriver/VirtualSerial/CDC.txt b/Demos/Device/ClassDriver/VirtualSerial/CDC.txt
deleted file mode 100644 (file)
index 4983735..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage Communications Device Class (Virtual Serial Port) Demo\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *  - Series 6 USB AVRs\r
- *  - Series 4 USB AVRs\r
- *  - Series 2 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Device</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Communications Device Class (CDC)</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Abstract Control Model (ACM)</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  Communications Device Class demonstration application.\r
- *  This gives a simple reference application for implementing\r
- *  a CDC device acting as a virtual serial port. Joystick\r
- *  actions are transmitted to the host as strings. The device\r
- *  does not respond to serial data sent from the host.\r
- *  \r
- *  After running this demo for the first time on a new computer,\r
- *  you will need to supply the .INF file located in this demo\r
- *  project's directory as the device's driver when running under\r
- *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
- *  negating the need for custom drivers for the device. Other\r
- *  Operating Systems should automatically use their own inbuilt\r
- *  CDC-ACM drivers.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */
\ No newline at end of file
index fa91d22..57d1023 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - CDC Device Demo"\r
+PROJECT_NAME           = "LUFA Library - Virtual Serial Device Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Device/ClassDriver/VirtualSerial/LUFA CDC.inf b/Demos/Device/ClassDriver/VirtualSerial/LUFA CDC.inf
deleted file mode 100644 (file)
index 4cdf594..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-;************************************************************\r
-; Windows USB CDC ACM Setup File\r
-; Copyright (c) 2000 Microsoft Corporation\r
-\r
-\r
-[Version]\r
-Signature="$Windows NT$"\r
-Class=Ports\r
-ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
-Provider=%MFGNAME%\r
-LayoutFile=layout.inf\r
-CatalogFile=%MFGFILENAME%.cat\r
-DriverVer=11/15/2007,5.1.2600.0\r
-\r
-[Manufacturer]\r
-%MFGNAME%=DeviceList, NTamd64\r
-\r
-[DestinationDirs]\r
-DefaultDestDir=12\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Windows 2000/XP/Vista-32bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.nt]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.nt\r
-AddReg=DriverInstall.nt.AddReg\r
-\r
-[DriverCopyFiles.nt]\r
-usbser.sys,,,0x20\r
-\r
-[DriverInstall.nt.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.nt.Services]\r
-AddService=usbser, 0x00000002, DriverService.nt\r
-\r
-[DriverService.nt]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vista-64bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.NTamd64]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.NTamd64\r
-AddReg=DriverInstall.NTamd64.AddReg\r
-\r
-[DriverCopyFiles.NTamd64]\r
-%DRIVERFILENAME%.sys,,,0x20\r
-\r
-[DriverInstall.NTamd64.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.NTamd64.Services]\r
-AddService=usbser, 0x00000002, DriverService.NTamd64\r
-\r
-[DriverService.NTamd64]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vendor and Product ID Definitions\r
-;------------------------------------------------------------------------------\r
-; When developing your USB device, the VID and PID used in the PC side\r
-; application program and the firmware on the microcontroller must match.\r
-; Modify the below line to use your VID and PID.  Use the format as shown below.\r
-; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
-; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
-;------------------------------------------------------------------------------\r
-[SourceDisksFiles]\r
-[SourceDisksNames]\r
-[DeviceList]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
-\r
-[DeviceList.NTamd64]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  String Definitions\r
-;------------------------------------------------------------------------------\r
-;Modify these strings to customize your device\r
-;------------------------------------------------------------------------------\r
-[Strings]\r
-MFGFILENAME="CDC_vista"\r
-DRIVERFILENAME ="usbser"\r
-MFGNAME="CCS, Inc."\r
-INSTDISK="LUFA CDC Driver Installer"\r
-DESCRIPTION="Communications Port"\r
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/VirtualSerial/LUFA VirtualSerial.inf b/Demos/Device/ClassDriver/VirtualSerial/LUFA VirtualSerial.inf
new file mode 100644 (file)
index 0000000..4cdf594
--- /dev/null
@@ -0,0 +1,106 @@
+;************************************************************\r
+; Windows USB CDC ACM Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+\r
+[Version]\r
+Signature="$Windows NT$"\r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
+Provider=%MFGNAME%\r
+LayoutFile=layout.inf\r
+CatalogFile=%MFGFILENAME%.cat\r
+DriverVer=11/15/2007,5.1.2600.0\r
+\r
+[Manufacturer]\r
+%MFGNAME%=DeviceList, NTamd64\r
+\r
+[DestinationDirs]\r
+DefaultDestDir=12\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Windows 2000/XP/Vista-32bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.nt]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.nt\r
+AddReg=DriverInstall.nt.AddReg\r
+\r
+[DriverCopyFiles.nt]\r
+usbser.sys,,,0x20\r
+\r
+[DriverInstall.nt.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.nt.Services]\r
+AddService=usbser, 0x00000002, DriverService.nt\r
+\r
+[DriverService.nt]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vista-64bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.NTamd64]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.NTamd64\r
+AddReg=DriverInstall.NTamd64.AddReg\r
+\r
+[DriverCopyFiles.NTamd64]\r
+%DRIVERFILENAME%.sys,,,0x20\r
+\r
+[DriverInstall.NTamd64.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.NTamd64.Services]\r
+AddService=usbser, 0x00000002, DriverService.NTamd64\r
+\r
+[DriverService.NTamd64]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vendor and Product ID Definitions\r
+;------------------------------------------------------------------------------\r
+; When developing your USB device, the VID and PID used in the PC side\r
+; application program and the firmware on the microcontroller must match.\r
+; Modify the below line to use your VID and PID.  Use the format as shown below.\r
+; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
+;------------------------------------------------------------------------------\r
+[SourceDisksFiles]\r
+[SourceDisksNames]\r
+[DeviceList]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
+\r
+[DeviceList.NTamd64]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  String Definitions\r
+;------------------------------------------------------------------------------\r
+;Modify these strings to customize your device\r
+;------------------------------------------------------------------------------\r
+[Strings]\r
+MFGFILENAME="CDC_vista"\r
+DRIVERFILENAME ="usbser"\r
+MFGNAME="CCS, Inc."\r
+INSTDISK="LUFA CDC Driver Installer"\r
+DESCRIPTION="Communications Port"\r
+SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
new file mode 100644 (file)
index 0000000..8940ae0
--- /dev/null
@@ -0,0 +1,166 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the CDC demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
\r
+#include "CDC.h"\r
+\r
+/** LUFA CDC Class driver interface configuration and state information. This structure is\r
+ *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another.\r
+ */\r
+USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .ControlInterfaceNumber         = 0,\r
+\r
+                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
+                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank       = false,\r
+\r
+                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
+                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank      = false,\r
+\r
+                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank = false,\r
+                       },\r
+       };\r
+\r
+/** Standard file stream for the CDC interface when set up, so that the virtual CDC COM port can be\r
+ *  used like any regular character stream in the C APIs\r
+ */\r
+static FILE USBSerialStream;\r
+\r
+/** Main program entry point. This routine contains the overall program flow, including initial\r
+ *  setup of all components and the main program loop.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+       \r
+       /* Create a regular character stream for the interface so that it can be used with the stdio.h functions */\r
+       CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream);\r
+\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+       for (;;)\r
+       {\r
+               CheckJoystickMovement();\r
+                \r
+               /* Must throw away unused bytes from the host, or it will lock up while waiting for the device */\r
+               while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))\r
+                 CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);\r
+\r
+               CDC_Device_USBTask(&VirtualSerial_CDC_Interface);\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       Joystick_Init();\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Checks for changes in the position of the board joystick, sending strings to the host upon each change. */\r
+void CheckJoystickMovement(void)\r
+{\r
+       uint8_t     JoyStatus_LCL = Joystick_GetStatus();\r
+       char*       ReportString  = NULL;\r
+       static bool ActionSent    = false;\r
+       \r
+       if (JoyStatus_LCL & JOY_UP)\r
+         ReportString = "Joystick Up\r\n";\r
+       else if (JoyStatus_LCL & JOY_DOWN)\r
+         ReportString = "Joystick Down\r\n";\r
+       else if (JoyStatus_LCL & JOY_LEFT)\r
+         ReportString = "Joystick Left\r\n";\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         ReportString = "Joystick Right\r\n";\r
+       else if (JoyStatus_LCL & JOY_PRESS)\r
+         ReportString = "Joystick Pressed\r\n";\r
+       else\r
+         ActionSent = false;\r
+         \r
+       if ((ReportString != NULL) && (ActionSent == false))\r
+       {\r
+               ActionSent = true;\r
+\r
+               /* Write the string to the virtual COM port via the created character stream */\r
+               fputs(ReportString, &USBSerialStream);\r
+\r
+               /* Alternatively, without the stream: */\r
+               // CDC_Device_SendString(&VirtualSerial_CDC_Interface, ReportString, strlen(ReportString));\r
+       }\r
+}\r
+\r
+/** Event handler for the library USB Connection event. */\r
+void EVENT_USB_Device_Connect(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the library USB Disconnection event. */\r
+void EVENT_USB_Device_Disconnect(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the library USB Configuration Changed event. */\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface)))\r
+         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+}\r
+\r
+/** Event handler for the library USB Unhandled Control Request event. */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
+{\r
+       CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);\r
+}\r
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
new file mode 100644 (file)
index 0000000..9cc7248
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for CDC.c.\r
+ */\r
+\r
+#ifndef _CDC_H_\r
+#define _CDC_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/power.h>\r
+               #include <string.h>\r
+               #include <stdio.h>\r
+\r
+               #include "Descriptors.h"\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
+               #include <LUFA/Drivers/Board/Joystick.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/USB/Class/CDC.h>\r
+\r
+       /* Macros: */\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
+               void CheckJoystickMovement(void);\r
+\r
+               void EVENT_USB_Device_Connect(void);\r
+               void EVENT_USB_Device_Disconnect(void);\r
+               void EVENT_USB_Device_ConfigurationChanged(void);\r
+               void EVENT_USB_Device_UnhandledControlRequest(void);\r
+\r
+#endif\r
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt
new file mode 100644 (file)
index 0000000..4983735
--- /dev/null
@@ -0,0 +1,72 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage Communications Device Class (Virtual Serial Port) Demo\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *  - Series 6 USB AVRs\r
+ *  - Series 4 USB AVRs\r
+ *  - Series 2 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Device</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Communications Device Class (CDC)</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Abstract Control Model (ACM)</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  Communications Device Class demonstration application.\r
+ *  This gives a simple reference application for implementing\r
+ *  a CDC device acting as a virtual serial port. Joystick\r
+ *  actions are transmitted to the host as strings. The device\r
+ *  does not respond to serial data sent from the host.\r
+ *  \r
+ *  After running this demo for the first time on a new computer,\r
+ *  you will need to supply the .INF file located in this demo\r
+ *  project's directory as the device's driver when running under\r
+ *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
+ *  negating the need for custom drivers for the device. Other\r
+ *  Operating Systems should automatically use their own inbuilt\r
+ *  CDC-ACM drivers.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */
\ No newline at end of file
index 8b67fd3..024bf92 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = CDC\r
+TARGET = VirtualSerial\r
 \r
 \r
 # Object files directory\r
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.c
deleted file mode 100644 (file)
index d979e66..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the CDCMouse demo. This file contains the main tasks of\r
- *  the demo and is responsible for the initial application hardware configuration.\r
- */\r
\r
-#include "CDCMouse.h"\r
-\r
-/** LUFA CDC Class driver interface configuration and state information. This structure is\r
- *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another.\r
- */\r
-USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .ControlInterfaceNumber         = 0,\r
-\r
-                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
-                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
-                               .DataINEndpointDoubleBank       = false,\r
-\r
-                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
-                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
-                               .DataOUTEndpointDoubleBank      = false,\r
-\r
-                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
-                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
-                               .NotificationEndpointDoubleBank = false,\r
-                       },\r
-       };\r
-\r
-/** Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver. */\r
-uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];\r
-\r
-/** LUFA HID Class driver interface configuration and state information. This structure is\r
- *  passed to all HID Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another.\r
- */\r
-USB_ClassInfo_HID_Device_t Mouse_HID_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .InterfaceNumber                = 0,\r
-\r
-                               .ReportINEndpointNumber         = MOUSE_EPNUM,\r
-                               .ReportINEndpointSize           = MOUSE_EPSIZE,\r
-                               .ReportINEndpointDoubleBank     = false,\r
-\r
-                               .PrevReportINBuffer             = PrevMouseHIDReportBuffer,\r
-                               .PrevReportINBufferSize         = sizeof(PrevMouseHIDReportBuffer),\r
-                       },\r
-       };\r
-\r
-/** Main program entry point. This routine contains the overall program flow, including initial\r
- *  setup of all components and the main program loop.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-       \r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
-       for (;;)\r
-       {\r
-               CheckJoystickMovement();\r
-                \r
-               /* Must throw away unused bytes from the host, or it will lock up while waiting for the device */\r
-               while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))\r
-                 CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);\r
-\r
-               CDC_Device_USBTask(&VirtualSerial_CDC_Interface);\r
-               HID_Device_USBTask(&Mouse_HID_Interface);\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       Joystick_Init();\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Checks for changes in the position of the board joystick, sending strings to the host upon each change. */\r
-void CheckJoystickMovement(void)\r
-{\r
-       uint8_t     JoyStatus_LCL = Joystick_GetStatus();\r
-       char*       ReportString  = NULL;\r
-       static bool ActionSent    = false;\r
-       \r
-       if (JoyStatus_LCL & JOY_UP)\r
-         ReportString = "Joystick Up\r\n";\r
-       else if (JoyStatus_LCL & JOY_DOWN)\r
-         ReportString = "Joystick Down\r\n";\r
-       else if (JoyStatus_LCL & JOY_LEFT)\r
-         ReportString = "Joystick Left\r\n";\r
-       else if (JoyStatus_LCL & JOY_RIGHT)\r
-         ReportString = "Joystick Right\r\n";\r
-       else if (JoyStatus_LCL & JOY_PRESS)\r
-         ReportString = "Joystick Pressed\r\n";\r
-       else\r
-         ActionSent = false;\r
-         \r
-       if ((ReportString != NULL) && (ActionSent == false))\r
-       {\r
-               ActionSent = true;\r
-               \r
-               CDC_Device_SendString(&VirtualSerial_CDC_Interface, ReportString, strlen(ReportString));                \r
-       }\r
-}\r
-\r
-/** Event handler for the library USB Connection event. */\r
-void EVENT_USB_Device_Connect(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the library USB Disconnection event. */\r
-void EVENT_USB_Device_Disconnect(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the library USB Configuration Changed event. */\r
-void EVENT_USB_Device_ConfigurationChanged(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-\r
-       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface)))\r
-         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-\r
-       if (!(HID_Device_ConfigureEndpoints(&Mouse_HID_Interface)))\r
-         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-         \r
-       USB_Device_EnableSOFEvents();\r
-}\r
-\r
-/** Event handler for the library USB Unhandled Control Request event. */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
-{\r
-       CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);\r
-       HID_Device_ProcessControlRequest(&Mouse_HID_Interface);\r
-}\r
-\r
-/** Event handler for the USB device Start Of Frame event. */\r
-void EVENT_USB_Device_StartOfFrame(void)\r
-{\r
-       HID_Device_MillisecondElapsed(&Mouse_HID_Interface);\r
-}\r
-\r
-/** HID class driver callback function for the creation of HID reports to the host.\r
- *\r
- *  \param[in] HIDInterfaceInfo  Pointer to the HID class interface configuration structure being referenced\r
- *  \param[in,out] ReportID  Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID\r
- *  \param[in] ReportType  Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature\r
- *  \param[out] ReportData  Pointer to a buffer where the created report should be stored\r
- *  \param[out] ReportSize  Number of bytes written in the report (or zero if no report is to be sent\r
- *\r
- *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent\r
- */\r
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,\r
-                                         const uint8_t ReportType, void* ReportData, uint16_t* ReportSize)\r
-{\r
-       USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData;\r
-               \r
-       uint8_t JoyStatus_LCL    = Joystick_GetStatus();\r
-       uint8_t ButtonStatus_LCL = Buttons_GetStatus();\r
-\r
-       if (JoyStatus_LCL & JOY_UP)\r
-         MouseReport->Y = -1;\r
-       else if (JoyStatus_LCL & JOY_DOWN)\r
-         MouseReport->Y =  1;\r
-\r
-       if (JoyStatus_LCL & JOY_LEFT)\r
-         MouseReport->X = -1;\r
-       else if (JoyStatus_LCL & JOY_RIGHT)\r
-         MouseReport->X =  1;\r
-\r
-       if (JoyStatus_LCL & JOY_PRESS)\r
-         MouseReport->Button  = (1 << 0);\r
-         \r
-       if (ButtonStatus_LCL & BUTTONS_BUTTON1)\r
-         MouseReport->Button |= (1 << 1);\r
-       \r
-       *ReportSize = sizeof(USB_MouseReport_Data_t);\r
-       return true;\r
-}\r
-\r
-/** HID class driver callback function for the processing of HID reports from the host.\r
- *\r
- *  \param[in] HIDInterfaceInfo  Pointer to the HID class interface configuration structure being referenced\r
- *  \param[in] ReportID  Report ID of the received report from the host\r
- *  \param[in] ReportData  Pointer to a buffer where the created report has been stored\r
- *  \param[in] ReportSize  Size in bytes of the received HID report\r
- */\r
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,\r
-                                          const void* ReportData, const uint16_t ReportSize)\r
-{\r
-       // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports\r
-}\r
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.h b/Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.h
deleted file mode 100644 (file)
index bee1b04..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for CDCMouse.c.\r
- */\r
-\r
-#ifndef _CDC_MOUSE_H_\r
-#define _CDC_MOUSE_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/power.h>\r
-               #include <string.h>\r
-\r
-               #include "Descriptors.h"\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-               #include <LUFA/Drivers/Board/Joystick.h>\r
-               #include <LUFA/Drivers/Board/Buttons.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/USB/Class/CDC.h>\r
-               #include <LUFA/Drivers/USB/Class/HID.h>\r
-\r
-       /* Macros: */\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-               \r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void CheckJoystickMovement(void);\r
-\r
-               void EVENT_USB_Device_Connect(void);\r
-               void EVENT_USB_Device_Disconnect(void);\r
-               void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_UnhandledControlRequest(void);\r
-               void EVENT_USB_Device_StartOfFrame(void);\r
-\r
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,\r
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* ReportSize);\r
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, \r
-                                                         const void* ReportData, const uint16_t ReportSize);\r
-#endif\r
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.txt b/Demos/Device/ClassDriver/VirtualSerialMouse/CDCMouse.txt
deleted file mode 100644 (file)
index ff0d8a3..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage Combined Communications Device Class (Virtual Serial Port) and Mouse Demo\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *  - Series 6 USB AVRs\r
- *  - Series 4 USB AVRs\r
- *  - Series 2 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Device</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Communications Device Class (CDC)</td>\r
- *    <td>Human Interface Device Class (HID)</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Abstract Control Model (ACM)</td>\r
- *    <td>Mouse Subclass</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *    <td>USBIF HID Specification, USBIF HID Usage Tables</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  Combined Communications Device Class/Mouse demonstration application.\r
- *  This gives a simple reference application for implementing a combined\r
- *  CDC and HID device acting as a both a virtual serial port and a mouse.\r
- *  Joystick actions are transmitted to the host as strings and as mouse\r
- *  movements. The device does not respond to serial data sent from the host.\r
- *  \r
- *  After running this demo for the first time on a new computer,\r
- *  you will need to supply the .INF file located in this demo\r
- *  project's directory as the device's driver when running under\r
- *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
- *  negating the need for custom drivers for the device. Other\r
- *  Operating Systems should automatically use their own inbuilt\r
- *  CDC-ACM drivers.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */
\ No newline at end of file
index 38e30f5..3084990 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - Combined CDC and Mouse Device Demo"\r
+PROJECT_NAME           = "LUFA Library - Combined Virtual Serial and Mouse Device Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/LUFA CDCMouse.inf b/Demos/Device/ClassDriver/VirtualSerialMouse/LUFA CDCMouse.inf
deleted file mode 100644 (file)
index f15c93c..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-;************************************************************\r
-; Windows USB CDC ACM Setup File\r
-; Copyright (c) 2000 Microsoft Corporation\r
-\r
-\r
-[Version]\r
-Signature="$Windows NT$"\r
-Class=Ports\r
-ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
-Provider=%MFGNAME%\r
-LayoutFile=layout.inf\r
-CatalogFile=%MFGFILENAME%.cat\r
-DriverVer=11/15/2007,5.1.2600.0\r
-\r
-[Manufacturer]\r
-%MFGNAME%=DeviceList, NTamd64\r
-\r
-[DestinationDirs]\r
-DefaultDestDir=12\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Windows 2000/XP/Vista-32bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.nt]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.nt\r
-AddReg=DriverInstall.nt.AddReg\r
-\r
-[DriverCopyFiles.nt]\r
-usbser.sys,,,0x20\r
-\r
-[DriverInstall.nt.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.nt.Services]\r
-AddService=usbser, 0x00000002, DriverService.nt\r
-\r
-[DriverService.nt]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vista-64bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.NTamd64]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.NTamd64\r
-AddReg=DriverInstall.NTamd64.AddReg\r
-\r
-[DriverCopyFiles.NTamd64]\r
-%DRIVERFILENAME%.sys,,,0x20\r
-\r
-[DriverInstall.NTamd64.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.NTamd64.Services]\r
-AddService=usbser, 0x00000002, DriverService.NTamd64\r
-\r
-[DriverService.NTamd64]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vendor and Product ID Definitions\r
-;------------------------------------------------------------------------------\r
-; When developing your USB device, the VID and PID used in the PC side\r
-; application program and the firmware on the microcontroller must match.\r
-; Modify the below line to use your VID and PID.  Use the format as shown below.\r
-; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
-; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
-;------------------------------------------------------------------------------\r
-[SourceDisksFiles]\r
-[SourceDisksNames]\r
-[DeviceList]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00\r
-\r
-[DeviceList.NTamd64]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  String Definitions\r
-;------------------------------------------------------------------------------\r
-;Modify these strings to customize your device\r
-;------------------------------------------------------------------------------\r
-[Strings]\r
-MFGFILENAME="CDC_vista"\r
-DRIVERFILENAME ="usbser"\r
-MFGNAME="CCS, Inc."\r
-INSTDISK="LUFA CDC/Mouse Driver Installer"\r
-DESCRIPTION="Communications Port"\r
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/LUFA VirtualSerialMouse.inf b/Demos/Device/ClassDriver/VirtualSerialMouse/LUFA VirtualSerialMouse.inf
new file mode 100644 (file)
index 0000000..f15c93c
--- /dev/null
@@ -0,0 +1,106 @@
+;************************************************************\r
+; Windows USB CDC ACM Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+\r
+[Version]\r
+Signature="$Windows NT$"\r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
+Provider=%MFGNAME%\r
+LayoutFile=layout.inf\r
+CatalogFile=%MFGFILENAME%.cat\r
+DriverVer=11/15/2007,5.1.2600.0\r
+\r
+[Manufacturer]\r
+%MFGNAME%=DeviceList, NTamd64\r
+\r
+[DestinationDirs]\r
+DefaultDestDir=12\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Windows 2000/XP/Vista-32bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.nt]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.nt\r
+AddReg=DriverInstall.nt.AddReg\r
+\r
+[DriverCopyFiles.nt]\r
+usbser.sys,,,0x20\r
+\r
+[DriverInstall.nt.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.nt.Services]\r
+AddService=usbser, 0x00000002, DriverService.nt\r
+\r
+[DriverService.nt]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vista-64bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.NTamd64]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.NTamd64\r
+AddReg=DriverInstall.NTamd64.AddReg\r
+\r
+[DriverCopyFiles.NTamd64]\r
+%DRIVERFILENAME%.sys,,,0x20\r
+\r
+[DriverInstall.NTamd64.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.NTamd64.Services]\r
+AddService=usbser, 0x00000002, DriverService.NTamd64\r
+\r
+[DriverService.NTamd64]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vendor and Product ID Definitions\r
+;------------------------------------------------------------------------------\r
+; When developing your USB device, the VID and PID used in the PC side\r
+; application program and the firmware on the microcontroller must match.\r
+; Modify the below line to use your VID and PID.  Use the format as shown below.\r
+; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
+;------------------------------------------------------------------------------\r
+[SourceDisksFiles]\r
+[SourceDisksNames]\r
+[DeviceList]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00\r
+\r
+[DeviceList.NTamd64]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2062&MI_00\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  String Definitions\r
+;------------------------------------------------------------------------------\r
+;Modify these strings to customize your device\r
+;------------------------------------------------------------------------------\r
+[Strings]\r
+MFGFILENAME="CDC_vista"\r
+DRIVERFILENAME ="usbser"\r
+MFGNAME="CCS, Inc."\r
+INSTDISK="LUFA CDC/Mouse Driver Installer"\r
+DESCRIPTION="Communications Port"\r
+SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
new file mode 100644 (file)
index 0000000..d979e66
--- /dev/null
@@ -0,0 +1,240 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the CDCMouse demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
\r
+#include "CDCMouse.h"\r
+\r
+/** LUFA CDC Class driver interface configuration and state information. This structure is\r
+ *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another.\r
+ */\r
+USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .ControlInterfaceNumber         = 0,\r
+\r
+                               .DataINEndpointNumber           = CDC_TX_EPNUM,\r
+                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,\r
+                               .DataINEndpointDoubleBank       = false,\r
+\r
+                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,\r
+                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,\r
+                               .DataOUTEndpointDoubleBank      = false,\r
+\r
+                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,\r
+                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,\r
+                               .NotificationEndpointDoubleBank = false,\r
+                       },\r
+       };\r
+\r
+/** Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver. */\r
+uint8_t PrevMouseHIDReportBuffer[sizeof(USB_MouseReport_Data_t)];\r
+\r
+/** LUFA HID Class driver interface configuration and state information. This structure is\r
+ *  passed to all HID Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another.\r
+ */\r
+USB_ClassInfo_HID_Device_t Mouse_HID_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .InterfaceNumber                = 0,\r
+\r
+                               .ReportINEndpointNumber         = MOUSE_EPNUM,\r
+                               .ReportINEndpointSize           = MOUSE_EPSIZE,\r
+                               .ReportINEndpointDoubleBank     = false,\r
+\r
+                               .PrevReportINBuffer             = PrevMouseHIDReportBuffer,\r
+                               .PrevReportINBufferSize         = sizeof(PrevMouseHIDReportBuffer),\r
+                       },\r
+       };\r
+\r
+/** Main program entry point. This routine contains the overall program flow, including initial\r
+ *  setup of all components and the main program loop.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+       \r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+       for (;;)\r
+       {\r
+               CheckJoystickMovement();\r
+                \r
+               /* Must throw away unused bytes from the host, or it will lock up while waiting for the device */\r
+               while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))\r
+                 CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);\r
+\r
+               CDC_Device_USBTask(&VirtualSerial_CDC_Interface);\r
+               HID_Device_USBTask(&Mouse_HID_Interface);\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       Joystick_Init();\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Checks for changes in the position of the board joystick, sending strings to the host upon each change. */\r
+void CheckJoystickMovement(void)\r
+{\r
+       uint8_t     JoyStatus_LCL = Joystick_GetStatus();\r
+       char*       ReportString  = NULL;\r
+       static bool ActionSent    = false;\r
+       \r
+       if (JoyStatus_LCL & JOY_UP)\r
+         ReportString = "Joystick Up\r\n";\r
+       else if (JoyStatus_LCL & JOY_DOWN)\r
+         ReportString = "Joystick Down\r\n";\r
+       else if (JoyStatus_LCL & JOY_LEFT)\r
+         ReportString = "Joystick Left\r\n";\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         ReportString = "Joystick Right\r\n";\r
+       else if (JoyStatus_LCL & JOY_PRESS)\r
+         ReportString = "Joystick Pressed\r\n";\r
+       else\r
+         ActionSent = false;\r
+         \r
+       if ((ReportString != NULL) && (ActionSent == false))\r
+       {\r
+               ActionSent = true;\r
+               \r
+               CDC_Device_SendString(&VirtualSerial_CDC_Interface, ReportString, strlen(ReportString));                \r
+       }\r
+}\r
+\r
+/** Event handler for the library USB Connection event. */\r
+void EVENT_USB_Device_Connect(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the library USB Disconnection event. */\r
+void EVENT_USB_Device_Disconnect(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the library USB Configuration Changed event. */\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface)))\r
+         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+\r
+       if (!(HID_Device_ConfigureEndpoints(&Mouse_HID_Interface)))\r
+         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+         \r
+       USB_Device_EnableSOFEvents();\r
+}\r
+\r
+/** Event handler for the library USB Unhandled Control Request event. */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
+{\r
+       CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);\r
+       HID_Device_ProcessControlRequest(&Mouse_HID_Interface);\r
+}\r
+\r
+/** Event handler for the USB device Start Of Frame event. */\r
+void EVENT_USB_Device_StartOfFrame(void)\r
+{\r
+       HID_Device_MillisecondElapsed(&Mouse_HID_Interface);\r
+}\r
+\r
+/** HID class driver callback function for the creation of HID reports to the host.\r
+ *\r
+ *  \param[in] HIDInterfaceInfo  Pointer to the HID class interface configuration structure being referenced\r
+ *  \param[in,out] ReportID  Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID\r
+ *  \param[in] ReportType  Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature\r
+ *  \param[out] ReportData  Pointer to a buffer where the created report should be stored\r
+ *  \param[out] ReportSize  Number of bytes written in the report (or zero if no report is to be sent\r
+ *\r
+ *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent\r
+ */\r
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,\r
+                                         const uint8_t ReportType, void* ReportData, uint16_t* ReportSize)\r
+{\r
+       USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData;\r
+               \r
+       uint8_t JoyStatus_LCL    = Joystick_GetStatus();\r
+       uint8_t ButtonStatus_LCL = Buttons_GetStatus();\r
+\r
+       if (JoyStatus_LCL & JOY_UP)\r
+         MouseReport->Y = -1;\r
+       else if (JoyStatus_LCL & JOY_DOWN)\r
+         MouseReport->Y =  1;\r
+\r
+       if (JoyStatus_LCL & JOY_LEFT)\r
+         MouseReport->X = -1;\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         MouseReport->X =  1;\r
+\r
+       if (JoyStatus_LCL & JOY_PRESS)\r
+         MouseReport->Button  = (1 << 0);\r
+         \r
+       if (ButtonStatus_LCL & BUTTONS_BUTTON1)\r
+         MouseReport->Button |= (1 << 1);\r
+       \r
+       *ReportSize = sizeof(USB_MouseReport_Data_t);\r
+       return true;\r
+}\r
+\r
+/** HID class driver callback function for the processing of HID reports from the host.\r
+ *\r
+ *  \param[in] HIDInterfaceInfo  Pointer to the HID class interface configuration structure being referenced\r
+ *  \param[in] ReportID  Report ID of the received report from the host\r
+ *  \param[in] ReportData  Pointer to a buffer where the created report has been stored\r
+ *  \param[in] ReportSize  Size in bytes of the received HID report\r
+ */\r
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,\r
+                                          const void* ReportData, const uint16_t ReportSize)\r
+{\r
+       // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports\r
+}\r
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
new file mode 100644 (file)
index 0000000..bee1b04
--- /dev/null
@@ -0,0 +1,82 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for CDCMouse.c.\r
+ */\r
+\r
+#ifndef _CDC_MOUSE_H_\r
+#define _CDC_MOUSE_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/power.h>\r
+               #include <string.h>\r
+\r
+               #include "Descriptors.h"\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
+               #include <LUFA/Drivers/Board/Joystick.h>\r
+               #include <LUFA/Drivers/Board/Buttons.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/USB/Class/CDC.h>\r
+               #include <LUFA/Drivers/USB/Class/HID.h>\r
+\r
+       /* Macros: */\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
+               void CheckJoystickMovement(void);\r
+\r
+               void EVENT_USB_Device_Connect(void);\r
+               void EVENT_USB_Device_Disconnect(void);\r
+               void EVENT_USB_Device_ConfigurationChanged(void);\r
+               void EVENT_USB_Device_UnhandledControlRequest(void);\r
+               void EVENT_USB_Device_StartOfFrame(void);\r
+\r
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,\r
+                                                 const uint8_t ReportType, void* ReportData, uint16_t* ReportSize);\r
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, \r
+                                                         const void* ReportData, const uint16_t ReportSize);\r
+#endif\r
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt
new file mode 100644 (file)
index 0000000..ff0d8a3
--- /dev/null
@@ -0,0 +1,75 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage Combined Communications Device Class (Virtual Serial Port) and Mouse Demo\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *  - Series 6 USB AVRs\r
+ *  - Series 4 USB AVRs\r
+ *  - Series 2 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Device</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Communications Device Class (CDC)</td>\r
+ *    <td>Human Interface Device Class (HID)</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Abstract Control Model (ACM)</td>\r
+ *    <td>Mouse Subclass</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *    <td>USBIF HID Specification, USBIF HID Usage Tables</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  Combined Communications Device Class/Mouse demonstration application.\r
+ *  This gives a simple reference application for implementing a combined\r
+ *  CDC and HID device acting as a both a virtual serial port and a mouse.\r
+ *  Joystick actions are transmitted to the host as strings and as mouse\r
+ *  movements. The device does not respond to serial data sent from the host.\r
+ *  \r
+ *  After running this demo for the first time on a new computer,\r
+ *  you will need to supply the .INF file located in this demo\r
+ *  project's directory as the device's driver when running under\r
+ *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
+ *  negating the need for custom drivers for the device. Other\r
+ *  Operating Systems should automatically use their own inbuilt\r
+ *  CDC-ACM drivers.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */
\ No newline at end of file
index 85e3e97..990760e 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = CDCMouse\r
+TARGET = VirtualSerialMouse\r
 \r
 \r
 # Object files directory\r
index 288e01f..13a3176 100644 (file)
@@ -20,14 +20,8 @@ all:
        make -C AudioOutput clean
        make -C AudioOutput all
 
-       make -C CDC clean
-       make -C CDC all
-       
-       make -C CDCMouse clean
-       make -C CDCMouse all    
-
-       make -C DualCDC clean
-       make -C DualCDC all
+       make -C DualVirtualSerial clean
+       make -C DualVirtualSerial all
 
        make -C GenericHID clean
        make -C GenericHID all
@@ -56,12 +50,16 @@ all:
        make -C RNDISEthernet clean
        make -C RNDISEthernet all
 
+       make -C VirtualSerial clean
+       make -C VirtualSerial all
+       
+       make -C VirtualSerialMouse clean
+       make -C VirtualSerialMouse all  
+       
 %:
        make -C AudioInput $@
        make -C AudioOutput $@
-       make -C CDC $@
-       make -C CDCMouse $@
-       make -C DualCDC $@
+       make -C DualVirtualSerial $@
        make -C GenericHID $@
        make -C Joystick $@
        make -C Keyboard $@
@@ -71,3 +69,5 @@ all:
        make -C MIDI $@
        make -C Mouse $@
        make -C RNDISEthernet $@
+       make -C VirtualSerial $@
+       make -C VirtualSerialMouse $@
index 04af23b..b505cf5 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - Dual CDC Device Demo"\r
+PROJECT_NAME           = "LUFA Library - Dual Virtual Serial Device Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualCDC.c b/Demos/Device/LowLevel/DualVirtualSerial/DualCDC.c
deleted file mode 100644 (file)
index 8b1da03..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the DualCDC demo. This file contains the main tasks of the demo and\r
- *  is responsible for the initial application hardware configuration.\r
- */\r
\r
-#include "DualCDC.h"\r
-\r
-/** Contains the current baud rate and other settings of the first virtual serial port. While this demo does not use\r
- *  the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
- *  upon request or the host will assume the device is non-functional.\r
- *\r
- *  These values are set by the host via a class-specific request, however they are not required to be used accurately.\r
- *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
- *  serial link characteristics and instead sends and receives data in endpoint streams.\r
- */\r
-CDC_Line_Coding_t LineEncoding1 = { .BaudRateBPS = 0,\r
-                                    .CharFormat  = OneStopBit,\r
-                                    .ParityType  = Parity_None,\r
-                                    .DataBits    = 8            };\r
-\r
-/** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use\r
- *  the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
- *  upon request or the host will assume the device is non-functional.\r
- *\r
- *  These values are set by the host via a class-specific request, however they are not required to be used accurately.\r
- *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
- *  serial link characteristics and instead sends and receives data in endpoint streams.\r
- */\r
-CDC_Line_Coding_t LineEncoding2 = { .BaudRateBPS = 0,\r
-                                    .CharFormat  = OneStopBit,\r
-                                    .ParityType  = Parity_None,\r
-                                    .DataBits    = 8            };\r
-\r
-\r
-/** Main program entry point. This routine configures the hardware required by the application, then\r
- *  enters a loop to run the application tasks in sequence.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-\r
-       for (;;)\r
-       {\r
-               CDC1_Task();\r
-               CDC2_Task();\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       Joystick_Init();\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and\r
- *  starts the library USB task to begin the enumeration and USB management process.\r
- */\r
-void EVENT_USB_Device_Connect(void)\r
-{\r
-       /* Indicate USB enumerating */\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via\r
- *  the status LEDs and stops the USB management and CDC management tasks.\r
- */\r
-void EVENT_USB_Device_Disconnect(void)\r
-{\r
-       /* Indicate USB not ready */\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration\r
- *  of the USB device after enumeration - the device endpoints are configured and the CDC management tasks are started.\r
- */\r
-void EVENT_USB_Device_ConfigurationChanged(void)\r
-{                                                         \r
-       /* Indicate USB connected and ready */\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-\r
-       /* Setup CDC Notification, Rx and Tx Endpoints for the first CDC */\r
-       if (!(Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
-                                            ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       if (!(Endpoint_ConfigureEndpoint(CDC1_TX_EPNUM, EP_TYPE_BULK,\r
-                                            ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       if (!(Endpoint_ConfigureEndpoint(CDC1_RX_EPNUM, EP_TYPE_BULK,\r
-                                            ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       /* Setup CDC Notification, Rx and Tx Endpoints for the second CDC */\r
-       if (!(Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
-                                            ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       if (!(Endpoint_ConfigureEndpoint(CDC2_TX_EPNUM, EP_TYPE_BULK,\r
-                                            ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       if (!(Endpoint_ConfigureEndpoint(CDC2_RX_EPNUM, EP_TYPE_BULK,\r
-                                            ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       /* Reset line encoding baud rates so that the host knows to send new values */\r
-       LineEncoding1.BaudRateBPS = 0;\r
-       LineEncoding2.BaudRateBPS = 0;\r
-}\r
-\r
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific\r
- *  control requests that are not handled internally by the USB library (including the CDC control commands,\r
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.\r
- */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
-{\r
-       /* Determine which interface's Line Coding data is being set from the wIndex parameter */\r
-       uint8_t* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? (uint8_t*)&LineEncoding1 : (uint8_t*)&LineEncoding2;\r
-\r
-       /* Process CDC specific control requests */\r
-       switch (USB_ControlRequest.bRequest)\r
-       {\r
-               case REQ_GetLineEncoding:\r
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
-                       {       \r
-                               /* Acknowledge the SETUP packet, ready for data transfer */\r
-                               Endpoint_ClearSETUP();\r
-\r
-                               /* Write the line coding data to the control endpoint */\r
-                               Endpoint_Write_Control_Stream_LE(LineEncodingData, sizeof(CDC_Line_Coding_t));\r
-                               \r
-                               /* Finalize the stream transfer to send the last packet or clear the host abort */\r
-                               Endpoint_ClearOUT();\r
-                       }\r
-                       \r
-                       break;\r
-               case REQ_SetLineEncoding:\r
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
-                       {\r
-                               /* Acknowledge the SETUP packet, ready for data transfer */\r
-                               Endpoint_ClearSETUP();\r
-\r
-                               /* Read the line coding data in from the host into the global struct */\r
-                               Endpoint_Read_Control_Stream_LE(LineEncodingData, sizeof(CDC_Line_Coding_t));\r
-\r
-                               /* Finalize the stream transfer to clear the last packet from the host */\r
-                               Endpoint_ClearIN();\r
-                       }\r
-       \r
-                       break;\r
-               case REQ_SetControlLineState:\r
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
-                       {\r
-                               /* Acknowledge the SETUP packet, ready for data transfer */\r
-                               Endpoint_ClearSETUP();\r
-                               \r
-                               Endpoint_ClearStatusStage();\r
-                       }\r
-       \r
-                       break;\r
-       }\r
-}\r
-\r
-/** Function to manage CDC data transmission and reception to and from the host for the first CDC interface, which sends joystick\r
- *  movements to the host as ASCII strings.\r
- */\r
-void CDC1_Task(void)\r
-{\r
-       char*       ReportString    = NULL;\r
-       uint8_t     JoyStatus_LCL   = Joystick_GetStatus();\r
-       static bool ActionSent      = false;\r
-       \r
-       /* Device must be connected and configured for the task to run */\r
-       if (USB_DeviceState != DEVICE_STATE_Configured)\r
-         return;\r
-\r
-       /* Determine if a joystick action has occurred */\r
-       if (JoyStatus_LCL & JOY_UP)\r
-         ReportString = "Joystick Up\r\n";\r
-       else if (JoyStatus_LCL & JOY_DOWN)\r
-         ReportString = "Joystick Down\r\n";\r
-       else if (JoyStatus_LCL & JOY_LEFT)\r
-         ReportString = "Joystick Left\r\n";\r
-       else if (JoyStatus_LCL & JOY_RIGHT)\r
-         ReportString = "Joystick Right\r\n";\r
-       else if (JoyStatus_LCL & JOY_PRESS)\r
-         ReportString = "Joystick Pressed\r\n";\r
-       else\r
-         ActionSent = false;\r
-\r
-       /* Flag management - Only allow one string to be sent per action */\r
-       if ((ReportString != NULL) && (ActionSent == false) && LineEncoding1.BaudRateBPS)\r
-       {\r
-               ActionSent = true;\r
-               \r
-               /* Select the Serial Tx Endpoint */\r
-               Endpoint_SelectEndpoint(CDC1_TX_EPNUM);\r
-\r
-               /* Write the String to the Endpoint */\r
-               Endpoint_Write_Stream_LE(ReportString, strlen(ReportString));\r
-               \r
-               /* Finalize the stream transfer to send the last packet */\r
-               Endpoint_ClearIN();\r
-\r
-               /* Wait until the endpoint is ready for another packet */\r
-               Endpoint_WaitUntilReady();\r
-               \r
-               /* Send an empty packet to ensure that the host does not buffer data sent to it */\r
-               Endpoint_ClearIN();\r
-       }\r
-\r
-       /* Select the Serial Rx Endpoint */\r
-       Endpoint_SelectEndpoint(CDC1_RX_EPNUM);\r
-       \r
-       /* Throw away any received data from the host */\r
-       if (Endpoint_IsOUTReceived())\r
-         Endpoint_ClearOUT();\r
-}\r
-\r
-/** Function to manage CDC data transmission and reception to and from the host for the second CDC interface, which echoes back\r
- *  all data sent to it from the host.\r
- */\r
-void CDC2_Task(void)\r
-{\r
-       /* Device must be connected and configured for the task to run */\r
-       if (USB_DeviceState != DEVICE_STATE_Configured)\r
-         return;\r
-\r
-       /* Select the Serial Rx Endpoint */\r
-       Endpoint_SelectEndpoint(CDC2_RX_EPNUM);\r
-       \r
-       /* Check to see if any data has been received */\r
-       if (Endpoint_IsOUTReceived())\r
-       {\r
-               /* Create a temp buffer big enough to hold the incoming endpoint packet */\r
-               uint8_t  Buffer[Endpoint_BytesInEndpoint()];\r
-               \r
-               /* Remember how large the incoming packet is */\r
-               uint16_t DataLength = Endpoint_BytesInEndpoint();\r
-       \r
-               /* Read in the incoming packet into the buffer */\r
-               Endpoint_Read_Stream_LE(&Buffer, DataLength);\r
-\r
-               /* Finalize the stream transfer to send the last packet */\r
-               Endpoint_ClearOUT();\r
-\r
-               /* Select the Serial Tx Endpoint */\r
-               Endpoint_SelectEndpoint(CDC2_TX_EPNUM);\r
-               \r
-               /* Write the received data to the endpoint */\r
-               Endpoint_Write_Stream_LE(&Buffer, DataLength);\r
-\r
-               /* Finalize the stream transfer to send the last packet */\r
-               Endpoint_ClearIN();\r
-\r
-               /* Wait until the endpoint is ready for the next packet */\r
-               Endpoint_WaitUntilReady();\r
-\r
-               /* Send an empty packet to prevent host buffering */\r
-               Endpoint_ClearIN();\r
-       }\r
-}\r
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualCDC.h b/Demos/Device/LowLevel/DualVirtualSerial/DualCDC.h
deleted file mode 100644 (file)
index b2085c4..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for DualCDC.c.\r
- */\r
-\r
-#ifndef _DUAL_CDC_H_\r
-#define _DUAL_CDC_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/power.h>\r
-               #include <string.h>\r
-\r
-               #include "Descriptors.h"\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/Board/Joystick.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-\r
-       /* Macros: */\r
-               /** CDC Class specific request to get the current virtual serial port configuration settings. */\r
-               #define REQ_GetLineEncoding          0x21\r
-\r
-               /** CDC Class specific request to set the current virtual serial port configuration settings. */\r
-               #define REQ_SetLineEncoding          0x20\r
-\r
-               /** CDC Class specific request to set the current virtual serial port handshake line states. */\r
-               #define REQ_SetControlLineState      0x22\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-\r
-       /* Type Defines: */\r
-               /** Type define for the virtual serial port line encoding settings, for storing the current USART configuration\r
-                *  as set by the host via a class specific request.\r
-                */\r
-               typedef struct\r
-               {\r
-                       uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
-                       uint8_t  CharFormat; /**< Character format of the virtual serial port, a value from the\r
-                                             *   CDCDevice_CDC_LineCodingFormats_t enum\r
-                                             */\r
-                       uint8_t  ParityType; /**< Parity setting of the virtual serial port, a value from the\r
-                                             *   CDCDevice_LineCodingParity_t enum\r
-                                             */\r
-                       uint8_t  DataBits; /**< Bits of data per character of the virtual serial port */\r
-               } CDC_Line_Coding_t;\r
-               \r
-       /* Enums: */\r
-               /** Enum for the possible line encoding formats of a virtual serial port. */\r
-               enum CDCDevice_CDC_LineCodingFormats_t\r
-               {\r
-                       OneStopBit          = 0, /**< Each frame contains one stop bit */\r
-                       OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits */\r
-                       TwoStopBits         = 2, /**< Each frame contains two stop bits */\r
-               };\r
-               \r
-               /** Enum for the possible line encoding parity settings of a virtual serial port. */\r
-               enum CDCDevice_LineCodingParity_t\r
-               {\r
-                       Parity_None         = 0, /**< No parity bit mode on each frame */\r
-                       Parity_Odd          = 1, /**< Odd parity bit mode on each frame */\r
-                       Parity_Even         = 2, /**< Even parity bit mode on each frame */\r
-                       Parity_Mark         = 3, /**< Mark parity bit mode on each frame */\r
-                       Parity_Space        = 4, /**< Space parity bit mode on each frame */\r
-               };\r
-\r
-       /* Function Prototypes: */\r
-               void CDC1_Task(void);\r
-               void CDC2_Task(void);\r
-               void SetupHardware(void);\r
-\r
-               void EVENT_USB_Device_Connect(void);\r
-               void EVENT_USB_Device_Disconnect(void);\r
-               void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_UnhandledControlRequest(void);\r
-               \r
-#endif\r
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualCDC.txt b/Demos/Device/LowLevel/DualVirtualSerial/DualCDC.txt
deleted file mode 100644 (file)
index 761769e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage Dual Communications Device Class (Dual Virtual Serial Port) Device\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *  - Series 6 USB AVRs\r
- *  - Series 4 USB AVRs\r
- *  - Series 2 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Device</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Miscellaneous Device Class</td>\r
- *    <td>( Sub-Interface: Communications Device Class (CDC) )</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Common Class</td> \r
- *    <td>( Sub-Interface: Abstract Control Model (ACM) )</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF Interface Association Descriptor ECN</td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  Dual Communications Device Class demonstration application.\r
- *  This gives a simple reference application for implementing\r
- *  a compound device with dual CDC functions acting as a pair\r
- *  of virtual serial ports. This demo uses Interface Association\r
- *  Descriptors to link together the pair of related CDC\r
- *  descriptors for each virtual serial port, which may not be\r
- *  supported in all OSes - Windows Vista is supported, as is\r
- *  XP (although the latter may need a hotfix to function).\r
- *  \r
- *  Joystick actions are transmitted to the host as strings\r
- *  through the first serial port. The device does not respond to\r
- *  serial data sent from the host in the first serial port.\r
- *  \r
- *  The second serial port echoes back data sent from the host.\r
- *  \r
- *  After running this demo for the first time on a new computer,\r
- *  you will need to supply the .INF file located in this demo\r
- *  project's directory as the device's driver when running under\r
- *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
- *  negating the need for custom drivers for the device. Other\r
- *  Operating Systems should automatically use their own inbuilt\r
- *  CDC-ACM drivers.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */
\ No newline at end of file
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c
new file mode 100644 (file)
index 0000000..8b1da03
--- /dev/null
@@ -0,0 +1,323 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the DualCDC demo. This file contains the main tasks of the demo and\r
+ *  is responsible for the initial application hardware configuration.\r
+ */\r
\r
+#include "DualCDC.h"\r
+\r
+/** Contains the current baud rate and other settings of the first virtual serial port. While this demo does not use\r
+ *  the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
+ *  upon request or the host will assume the device is non-functional.\r
+ *\r
+ *  These values are set by the host via a class-specific request, however they are not required to be used accurately.\r
+ *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
+ *  serial link characteristics and instead sends and receives data in endpoint streams.\r
+ */\r
+CDC_Line_Coding_t LineEncoding1 = { .BaudRateBPS = 0,\r
+                                    .CharFormat  = OneStopBit,\r
+                                    .ParityType  = Parity_None,\r
+                                    .DataBits    = 8            };\r
+\r
+/** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use\r
+ *  the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
+ *  upon request or the host will assume the device is non-functional.\r
+ *\r
+ *  These values are set by the host via a class-specific request, however they are not required to be used accurately.\r
+ *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
+ *  serial link characteristics and instead sends and receives data in endpoint streams.\r
+ */\r
+CDC_Line_Coding_t LineEncoding2 = { .BaudRateBPS = 0,\r
+                                    .CharFormat  = OneStopBit,\r
+                                    .ParityType  = Parity_None,\r
+                                    .DataBits    = 8            };\r
+\r
+\r
+/** Main program entry point. This routine configures the hardware required by the application, then\r
+ *  enters a loop to run the application tasks in sequence.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+\r
+       for (;;)\r
+       {\r
+               CDC1_Task();\r
+               CDC2_Task();\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       Joystick_Init();\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and\r
+ *  starts the library USB task to begin the enumeration and USB management process.\r
+ */\r
+void EVENT_USB_Device_Connect(void)\r
+{\r
+       /* Indicate USB enumerating */\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via\r
+ *  the status LEDs and stops the USB management and CDC management tasks.\r
+ */\r
+void EVENT_USB_Device_Disconnect(void)\r
+{\r
+       /* Indicate USB not ready */\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration\r
+ *  of the USB device after enumeration - the device endpoints are configured and the CDC management tasks are started.\r
+ */\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
+{                                                         \r
+       /* Indicate USB connected and ready */\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       /* Setup CDC Notification, Rx and Tx Endpoints for the first CDC */\r
+       if (!(Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
+                                            ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       if (!(Endpoint_ConfigureEndpoint(CDC1_TX_EPNUM, EP_TYPE_BULK,\r
+                                            ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       if (!(Endpoint_ConfigureEndpoint(CDC1_RX_EPNUM, EP_TYPE_BULK,\r
+                                            ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       /* Setup CDC Notification, Rx and Tx Endpoints for the second CDC */\r
+       if (!(Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
+                                            ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       if (!(Endpoint_ConfigureEndpoint(CDC2_TX_EPNUM, EP_TYPE_BULK,\r
+                                            ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       if (!(Endpoint_ConfigureEndpoint(CDC2_RX_EPNUM, EP_TYPE_BULK,\r
+                                            ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       /* Reset line encoding baud rates so that the host knows to send new values */\r
+       LineEncoding1.BaudRateBPS = 0;\r
+       LineEncoding2.BaudRateBPS = 0;\r
+}\r
+\r
+/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific\r
+ *  control requests that are not handled internally by the USB library (including the CDC control commands,\r
+ *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.\r
+ */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
+{\r
+       /* Determine which interface's Line Coding data is being set from the wIndex parameter */\r
+       uint8_t* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? (uint8_t*)&LineEncoding1 : (uint8_t*)&LineEncoding2;\r
+\r
+       /* Process CDC specific control requests */\r
+       switch (USB_ControlRequest.bRequest)\r
+       {\r
+               case REQ_GetLineEncoding:\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       {       \r
+                               /* Acknowledge the SETUP packet, ready for data transfer */\r
+                               Endpoint_ClearSETUP();\r
+\r
+                               /* Write the line coding data to the control endpoint */\r
+                               Endpoint_Write_Control_Stream_LE(LineEncodingData, sizeof(CDC_Line_Coding_t));\r
+                               \r
+                               /* Finalize the stream transfer to send the last packet or clear the host abort */\r
+                               Endpoint_ClearOUT();\r
+                       }\r
+                       \r
+                       break;\r
+               case REQ_SetLineEncoding:\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       {\r
+                               /* Acknowledge the SETUP packet, ready for data transfer */\r
+                               Endpoint_ClearSETUP();\r
+\r
+                               /* Read the line coding data in from the host into the global struct */\r
+                               Endpoint_Read_Control_Stream_LE(LineEncodingData, sizeof(CDC_Line_Coding_t));\r
+\r
+                               /* Finalize the stream transfer to clear the last packet from the host */\r
+                               Endpoint_ClearIN();\r
+                       }\r
+       \r
+                       break;\r
+               case REQ_SetControlLineState:\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       {\r
+                               /* Acknowledge the SETUP packet, ready for data transfer */\r
+                               Endpoint_ClearSETUP();\r
+                               \r
+                               Endpoint_ClearStatusStage();\r
+                       }\r
+       \r
+                       break;\r
+       }\r
+}\r
+\r
+/** Function to manage CDC data transmission and reception to and from the host for the first CDC interface, which sends joystick\r
+ *  movements to the host as ASCII strings.\r
+ */\r
+void CDC1_Task(void)\r
+{\r
+       char*       ReportString    = NULL;\r
+       uint8_t     JoyStatus_LCL   = Joystick_GetStatus();\r
+       static bool ActionSent      = false;\r
+       \r
+       /* Device must be connected and configured for the task to run */\r
+       if (USB_DeviceState != DEVICE_STATE_Configured)\r
+         return;\r
+\r
+       /* Determine if a joystick action has occurred */\r
+       if (JoyStatus_LCL & JOY_UP)\r
+         ReportString = "Joystick Up\r\n";\r
+       else if (JoyStatus_LCL & JOY_DOWN)\r
+         ReportString = "Joystick Down\r\n";\r
+       else if (JoyStatus_LCL & JOY_LEFT)\r
+         ReportString = "Joystick Left\r\n";\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         ReportString = "Joystick Right\r\n";\r
+       else if (JoyStatus_LCL & JOY_PRESS)\r
+         ReportString = "Joystick Pressed\r\n";\r
+       else\r
+         ActionSent = false;\r
+\r
+       /* Flag management - Only allow one string to be sent per action */\r
+       if ((ReportString != NULL) && (ActionSent == false) && LineEncoding1.BaudRateBPS)\r
+       {\r
+               ActionSent = true;\r
+               \r
+               /* Select the Serial Tx Endpoint */\r
+               Endpoint_SelectEndpoint(CDC1_TX_EPNUM);\r
+\r
+               /* Write the String to the Endpoint */\r
+               Endpoint_Write_Stream_LE(ReportString, strlen(ReportString));\r
+               \r
+               /* Finalize the stream transfer to send the last packet */\r
+               Endpoint_ClearIN();\r
+\r
+               /* Wait until the endpoint is ready for another packet */\r
+               Endpoint_WaitUntilReady();\r
+               \r
+               /* Send an empty packet to ensure that the host does not buffer data sent to it */\r
+               Endpoint_ClearIN();\r
+       }\r
+\r
+       /* Select the Serial Rx Endpoint */\r
+       Endpoint_SelectEndpoint(CDC1_RX_EPNUM);\r
+       \r
+       /* Throw away any received data from the host */\r
+       if (Endpoint_IsOUTReceived())\r
+         Endpoint_ClearOUT();\r
+}\r
+\r
+/** Function to manage CDC data transmission and reception to and from the host for the second CDC interface, which echoes back\r
+ *  all data sent to it from the host.\r
+ */\r
+void CDC2_Task(void)\r
+{\r
+       /* Device must be connected and configured for the task to run */\r
+       if (USB_DeviceState != DEVICE_STATE_Configured)\r
+         return;\r
+\r
+       /* Select the Serial Rx Endpoint */\r
+       Endpoint_SelectEndpoint(CDC2_RX_EPNUM);\r
+       \r
+       /* Check to see if any data has been received */\r
+       if (Endpoint_IsOUTReceived())\r
+       {\r
+               /* Create a temp buffer big enough to hold the incoming endpoint packet */\r
+               uint8_t  Buffer[Endpoint_BytesInEndpoint()];\r
+               \r
+               /* Remember how large the incoming packet is */\r
+               uint16_t DataLength = Endpoint_BytesInEndpoint();\r
+       \r
+               /* Read in the incoming packet into the buffer */\r
+               Endpoint_Read_Stream_LE(&Buffer, DataLength);\r
+\r
+               /* Finalize the stream transfer to send the last packet */\r
+               Endpoint_ClearOUT();\r
+\r
+               /* Select the Serial Tx Endpoint */\r
+               Endpoint_SelectEndpoint(CDC2_TX_EPNUM);\r
+               \r
+               /* Write the received data to the endpoint */\r
+               Endpoint_Write_Stream_LE(&Buffer, DataLength);\r
+\r
+               /* Finalize the stream transfer to send the last packet */\r
+               Endpoint_ClearIN();\r
+\r
+               /* Wait until the endpoint is ready for the next packet */\r
+               Endpoint_WaitUntilReady();\r
+\r
+               /* Send an empty packet to prevent host buffering */\r
+               Endpoint_ClearIN();\r
+       }\r
+}\r
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
new file mode 100644 (file)
index 0000000..b2085c4
--- /dev/null
@@ -0,0 +1,119 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for DualCDC.c.\r
+ */\r
+\r
+#ifndef _DUAL_CDC_H_\r
+#define _DUAL_CDC_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/power.h>\r
+               #include <string.h>\r
+\r
+               #include "Descriptors.h"\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/Board/Joystick.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
+\r
+       /* Macros: */\r
+               /** CDC Class specific request to get the current virtual serial port configuration settings. */\r
+               #define REQ_GetLineEncoding          0x21\r
+\r
+               /** CDC Class specific request to set the current virtual serial port configuration settings. */\r
+               #define REQ_SetLineEncoding          0x20\r
+\r
+               /** CDC Class specific request to set the current virtual serial port handshake line states. */\r
+               #define REQ_SetControlLineState      0x22\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+\r
+       /* Type Defines: */\r
+               /** Type define for the virtual serial port line encoding settings, for storing the current USART configuration\r
+                *  as set by the host via a class specific request.\r
+                */\r
+               typedef struct\r
+               {\r
+                       uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
+                       uint8_t  CharFormat; /**< Character format of the virtual serial port, a value from the\r
+                                             *   CDCDevice_CDC_LineCodingFormats_t enum\r
+                                             */\r
+                       uint8_t  ParityType; /**< Parity setting of the virtual serial port, a value from the\r
+                                             *   CDCDevice_LineCodingParity_t enum\r
+                                             */\r
+                       uint8_t  DataBits; /**< Bits of data per character of the virtual serial port */\r
+               } CDC_Line_Coding_t;\r
+               \r
+       /* Enums: */\r
+               /** Enum for the possible line encoding formats of a virtual serial port. */\r
+               enum CDCDevice_CDC_LineCodingFormats_t\r
+               {\r
+                       OneStopBit          = 0, /**< Each frame contains one stop bit */\r
+                       OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits */\r
+                       TwoStopBits         = 2, /**< Each frame contains two stop bits */\r
+               };\r
+               \r
+               /** Enum for the possible line encoding parity settings of a virtual serial port. */\r
+               enum CDCDevice_LineCodingParity_t\r
+               {\r
+                       Parity_None         = 0, /**< No parity bit mode on each frame */\r
+                       Parity_Odd          = 1, /**< Odd parity bit mode on each frame */\r
+                       Parity_Even         = 2, /**< Even parity bit mode on each frame */\r
+                       Parity_Mark         = 3, /**< Mark parity bit mode on each frame */\r
+                       Parity_Space        = 4, /**< Space parity bit mode on each frame */\r
+               };\r
+\r
+       /* Function Prototypes: */\r
+               void CDC1_Task(void);\r
+               void CDC2_Task(void);\r
+               void SetupHardware(void);\r
+\r
+               void EVENT_USB_Device_Connect(void);\r
+               void EVENT_USB_Device_Disconnect(void);\r
+               void EVENT_USB_Device_ConfigurationChanged(void);\r
+               void EVENT_USB_Device_UnhandledControlRequest(void);\r
+               \r
+#endif\r
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt
new file mode 100644 (file)
index 0000000..761769e
--- /dev/null
@@ -0,0 +1,84 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage Dual Communications Device Class (Dual Virtual Serial Port) Device\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *  - Series 6 USB AVRs\r
+ *  - Series 4 USB AVRs\r
+ *  - Series 2 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Device</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Miscellaneous Device Class</td>\r
+ *    <td>( Sub-Interface: Communications Device Class (CDC) )</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Common Class</td> \r
+ *    <td>( Sub-Interface: Abstract Control Model (ACM) )</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF Interface Association Descriptor ECN</td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  Dual Communications Device Class demonstration application.\r
+ *  This gives a simple reference application for implementing\r
+ *  a compound device with dual CDC functions acting as a pair\r
+ *  of virtual serial ports. This demo uses Interface Association\r
+ *  Descriptors to link together the pair of related CDC\r
+ *  descriptors for each virtual serial port, which may not be\r
+ *  supported in all OSes - Windows Vista is supported, as is\r
+ *  XP (although the latter may need a hotfix to function).\r
+ *  \r
+ *  Joystick actions are transmitted to the host as strings\r
+ *  through the first serial port. The device does not respond to\r
+ *  serial data sent from the host in the first serial port.\r
+ *  \r
+ *  The second serial port echoes back data sent from the host.\r
+ *  \r
+ *  After running this demo for the first time on a new computer,\r
+ *  you will need to supply the .INF file located in this demo\r
+ *  project's directory as the device's driver when running under\r
+ *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
+ *  negating the need for custom drivers for the device. Other\r
+ *  Operating Systems should automatically use their own inbuilt\r
+ *  CDC-ACM drivers.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */
\ No newline at end of file
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/LUFA DualCDC.inf b/Demos/Device/LowLevel/DualVirtualSerial/LUFA DualCDC.inf
deleted file mode 100644 (file)
index 741bf28..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-;************************************************************\r
-; Windows USB CDC ACM Setup File\r
-; Copyright (c) 2000 Microsoft Corporation\r
-\r
-\r
-[Version]\r
-Signature="$Windows NT$"\r
-Class=Ports\r
-ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
-Provider=%MFGNAME%\r
-LayoutFile=layout.inf\r
-CatalogFile=%MFGFILENAME%.cat\r
-DriverVer=11/15/2007,5.1.2600.0\r
-\r
-[Manufacturer]\r
-%MFGNAME%=DeviceList, NTamd64\r
-\r
-[DestinationDirs]\r
-DefaultDestDir=12\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Windows 2000/XP/Vista-32bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.nt]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.nt\r
-AddReg=DriverInstall.nt.AddReg\r
-\r
-[DriverCopyFiles.nt]\r
-usbser.sys,,,0x20\r
-\r
-[DriverInstall.nt.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.nt.Services]\r
-AddService=usbser, 0x00000002, DriverService.nt\r
-\r
-[DriverService.nt]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vista-64bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.NTamd64]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.NTamd64\r
-AddReg=DriverInstall.NTamd64.AddReg\r
-\r
-[DriverCopyFiles.NTamd64]\r
-%DRIVERFILENAME%.sys,,,0x20\r
-\r
-[DriverInstall.NTamd64.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.NTamd64.Services]\r
-AddService=usbser, 0x00000002, DriverService.NTamd64\r
-\r
-[DriverService.NTamd64]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vendor and Product ID Definitions\r
-;------------------------------------------------------------------------------\r
-; When developing your USB device, the VID and PID used in the PC side\r
-; application program and the firmware on the microcontroller must match.\r
-; Modify the below line to use your VID and PID.  Use the format as shown below.\r
-; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
-; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
-;------------------------------------------------------------------------------\r
-[SourceDisksFiles]\r
-[SourceDisksNames]\r
-[DeviceList]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
-\r
-[DeviceList.NTamd64]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  String Definitions\r
-;------------------------------------------------------------------------------\r
-;Modify these strings to customize your device\r
-;------------------------------------------------------------------------------\r
-[Strings]\r
-MFGFILENAME="CDC_vista"\r
-DRIVERFILENAME ="usbser"\r
-MFGNAME="CCS, Inc."\r
-INSTDISK="LUFA Dual CDC Driver Installer"\r
-DESCRIPTION="Communications Port"\r
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/LUFA DualVirtualSerial.inf b/Demos/Device/LowLevel/DualVirtualSerial/LUFA DualVirtualSerial.inf
new file mode 100644 (file)
index 0000000..741bf28
--- /dev/null
@@ -0,0 +1,106 @@
+;************************************************************\r
+; Windows USB CDC ACM Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+\r
+[Version]\r
+Signature="$Windows NT$"\r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
+Provider=%MFGNAME%\r
+LayoutFile=layout.inf\r
+CatalogFile=%MFGFILENAME%.cat\r
+DriverVer=11/15/2007,5.1.2600.0\r
+\r
+[Manufacturer]\r
+%MFGNAME%=DeviceList, NTamd64\r
+\r
+[DestinationDirs]\r
+DefaultDestDir=12\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Windows 2000/XP/Vista-32bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.nt]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.nt\r
+AddReg=DriverInstall.nt.AddReg\r
+\r
+[DriverCopyFiles.nt]\r
+usbser.sys,,,0x20\r
+\r
+[DriverInstall.nt.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.nt.Services]\r
+AddService=usbser, 0x00000002, DriverService.nt\r
+\r
+[DriverService.nt]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vista-64bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.NTamd64]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.NTamd64\r
+AddReg=DriverInstall.NTamd64.AddReg\r
+\r
+[DriverCopyFiles.NTamd64]\r
+%DRIVERFILENAME%.sys,,,0x20\r
+\r
+[DriverInstall.NTamd64.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.NTamd64.Services]\r
+AddService=usbser, 0x00000002, DriverService.NTamd64\r
+\r
+[DriverService.NTamd64]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vendor and Product ID Definitions\r
+;------------------------------------------------------------------------------\r
+; When developing your USB device, the VID and PID used in the PC side\r
+; application program and the firmware on the microcontroller must match.\r
+; Modify the below line to use your VID and PID.  Use the format as shown below.\r
+; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
+;------------------------------------------------------------------------------\r
+[SourceDisksFiles]\r
+[SourceDisksNames]\r
+[DeviceList]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
+\r
+[DeviceList.NTamd64]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204E&MI_00, USB\VID_03EB&PID_204E&MI_02\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  String Definitions\r
+;------------------------------------------------------------------------------\r
+;Modify these strings to customize your device\r
+;------------------------------------------------------------------------------\r
+[Strings]\r
+MFGFILENAME="CDC_vista"\r
+DRIVERFILENAME ="usbser"\r
+MFGNAME="CCS, Inc."\r
+INSTDISK="LUFA Dual CDC Driver Installer"\r
+DESCRIPTION="Communications Port"\r
+SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
index 802a4dd..ef10bb3 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = DualCDC\r
+TARGET = DualVirtualSerial\r
 \r
 \r
 # Object files directory\r
diff --git a/Demos/Device/LowLevel/VirtualSerial/CDC.c b/Demos/Device/LowLevel/VirtualSerial/CDC.c
deleted file mode 100644 (file)
index 444dc01..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the CDC demo. This file contains the main tasks of the demo and\r
- *  is responsible for the initial application hardware configuration.\r
- */\r
-\r
-#include "CDC.h"\r
-\r
-/** Contains the current baud rate and other settings of the virtual serial port. While this demo does not use\r
- *  the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
- *  upon request or the host will assume the device is non-functional.\r
- *\r
- *  These values are set by the host via a class-specific request, however they are not required to be used accurately.\r
- *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
- *  serial link characteristics and instead sends and receives data in endpoint streams.\r
- */\r
-CDC_Line_Coding_t LineEncoding = { .BaudRateBPS = 0,\r
-                                   .CharFormat  = OneStopBit,\r
-                                   .ParityType  = Parity_None,\r
-                                   .DataBits    = 8            };\r
-\r
-\r
-#if 0\r
-/* NOTE: Here you can set up a standard stream using the created virtual serial port, so that the standard stream functions in\r
- *       <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).\r
- */\r
-       \r
-static int CDC_putchar(char c, FILE *stream)\r
-{        \r
-       Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
-\r
-       if (!(LineEncoding.BaudRateBPS))\r
-         return -1;\r
-       \r
-       if (Endpoint_WaitUntilReady())\r
-         return -1;\r
-\r
-       Endpoint_Write_Byte(c);\r
-       Endpoint_ClearIN();\r
-       \r
-       return 0;\r
-}\r
-\r
-static int CDC_getchar(FILE *stream)\r
-{\r
-       int c;\r
-\r
-       if (!(LineEncoding.BaudRateBPS))\r
-         return -1;\r
-\r
-       Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
-       \r
-       for (;;)\r
-       {\r
-               if (Endpoint_WaitUntilReady())\r
-                 return -1;\r
-       \r
-               if (!(Endpoint_BytesInEndpoint()))\r
-               {\r
-                       Endpoint_ClearOUT();\r
-               }\r
-               else\r
-               {\r
-                       c = Endpoint_Read_Byte();\r
-                       break;\r
-               }\r
-       }\r
-       \r
-       return c;\r
-}\r
-\r
-static FILE USBSerial = FDEV_SETUP_STREAM(CDC_putchar, CDC_getchar, _FDEV_SETUP_RW);\r
-#endif\r
-\r
-/** Main program entry point. This routine contains the overall program flow, including initial\r
- *  setup of all components and the main program loop.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-       \r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
-       for (;;)\r
-       {\r
-               CDC_Task();\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       Joystick_Init();\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and\r
- *  starts the library USB task to begin the enumeration and USB management process.\r
- */\r
-void EVENT_USB_Device_Connect(void)\r
-{\r
-       /* Indicate USB enumerating */\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via\r
- *  the status LEDs and stops the USB management and CDC management tasks.\r
- */\r
-void EVENT_USB_Device_Disconnect(void)\r
-{\r
-       /* Indicate USB not ready */\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration\r
- *  of the USB device after enumeration - the device endpoints are configured and the CDC management task started.\r
- */\r
-void EVENT_USB_Device_ConfigurationChanged(void)\r
-{\r
-       /* Indicate USB connected and ready */\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-\r
-       /* Setup CDC Notification, Rx and Tx Endpoints */\r
-       if (!(Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
-                                            ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       if (!(Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,\r
-                                            ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       if (!(Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,\r
-                                            ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
-                                        ENDPOINT_BANK_SINGLE)))\r
-       {\r
-               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       }\r
-       \r
-       /* Reset line encoding baud rate so that the host knows to send new values */\r
-       LineEncoding.BaudRateBPS = 0;\r
-}\r
-\r
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific\r
- *  control requests that are not handled internally by the USB library (including the CDC control commands,\r
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.\r
- */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
-{\r
-       /* Process CDC specific control requests */\r
-       switch (USB_ControlRequest.bRequest)\r
-       {\r
-               case REQ_GetLineEncoding:\r
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
-                       {       \r
-                               /* Acknowledge the SETUP packet, ready for data transfer */\r
-                               Endpoint_ClearSETUP();\r
-\r
-                               /* Write the line coding data to the control endpoint */\r
-                               Endpoint_Write_Control_Stream_LE(&LineEncoding, sizeof(CDC_Line_Coding_t));\r
-                               \r
-                               /* Finalize the stream transfer to send the last packet or clear the host abort */\r
-                               Endpoint_ClearOUT();\r
-                       }\r
-                       \r
-                       break;\r
-               case REQ_SetLineEncoding:\r
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
-                       {\r
-                               /* Acknowledge the SETUP packet, ready for data transfer */\r
-                               Endpoint_ClearSETUP();\r
-\r
-                               /* Read the line coding data in from the host into the global struct */\r
-                               Endpoint_Read_Control_Stream_LE(&LineEncoding, sizeof(CDC_Line_Coding_t));\r
-\r
-                               /* Finalize the stream transfer to clear the last packet from the host */\r
-                               Endpoint_ClearIN();\r
-                       }\r
-       \r
-                       break;\r
-               case REQ_SetControlLineState:\r
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
-                       {\r
-                               /* Acknowledge the SETUP packet, ready for data transfer */\r
-                               Endpoint_ClearSETUP();\r
-                               \r
-                               /* NOTE: Here you can read in the line state mask from the host, to get the current state of the output handshake\r
-                                        lines. The mask is read in from the wValue parameter in USB_ControlRequest, and can be masked against the\r
-                                                CONTROL_LINE_OUT_* masks to determine the RTS and DTR line states using the following code:\r
-                               */\r
-                               \r
-                               Endpoint_ClearStatusStage();\r
-                       }\r
-       \r
-                       break;\r
-       }\r
-}\r
-\r
-/** Function to manage CDC data transmission and reception to and from the host. */\r
-void CDC_Task(void)\r
-{\r
-       char*       ReportString    = NULL;\r
-       uint8_t     JoyStatus_LCL   = Joystick_GetStatus();\r
-       static bool ActionSent      = false;\r
-       \r
-       /* Device must be connected and configured for the task to run */\r
-       if (USB_DeviceState != DEVICE_STATE_Configured)\r
-         return;\r
-         \r
-#if 0\r
-       /* NOTE: Here you can use the notification endpoint to send back line state changes to the host, for the special RS-232\r
-        *       handshake signal lines (and some error states), via the CONTROL_LINE_IN_* masks and the following code:\r
-        */\r
-       USB_Notification_Header_t Notification = (USB_Notification_Header_t)\r
-               {\r
-                       .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
-                       .Notification     = NOTIF_SerialState,\r
-                       .wValue           = 0,\r
-                       .wIndex           = 0,\r
-                       .wLength          = sizeof(uint16_t),\r
-               };\r
-               \r
-       uint16_t LineStateMask;\r
-       \r
-       // Set LineStateMask here to a mask of CONTROL_LINE_IN_* masks to set the input handshake line states to send to the host\r
-       \r
-       Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPNUM);\r
-       Endpoint_Write_Stream_LE(&Notification, sizeof(Notification));\r
-       Endpoint_Write_Stream_LE(&LineStateMask, sizeof(LineStateMask));\r
-       Endpoint_ClearIN();\r
-#endif\r
-\r
-       /* Determine if a joystick action has occurred */\r
-       if (JoyStatus_LCL & JOY_UP)\r
-         ReportString = "Joystick Up\r\n";\r
-       else if (JoyStatus_LCL & JOY_DOWN)\r
-         ReportString = "Joystick Down\r\n";\r
-       else if (JoyStatus_LCL & JOY_LEFT)\r
-         ReportString = "Joystick Left\r\n";\r
-       else if (JoyStatus_LCL & JOY_RIGHT)\r
-         ReportString = "Joystick Right\r\n";\r
-       else if (JoyStatus_LCL & JOY_PRESS)\r
-         ReportString = "Joystick Pressed\r\n";\r
-       else\r
-         ActionSent = false;\r
-\r
-       /* Flag management - Only allow one string to be sent per action */\r
-       if ((ReportString != NULL) && (ActionSent == false) && LineEncoding.BaudRateBPS)\r
-       {\r
-               ActionSent = true;\r
-\r
-               /* Select the Serial Tx Endpoint */\r
-               Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
-\r
-               /* Write the String to the Endpoint */\r
-               Endpoint_Write_Stream_LE(ReportString, strlen(ReportString));\r
-               \r
-               /* Remember if the packet to send completely fills the endpoint */\r
-               bool IsFull = (Endpoint_BytesInEndpoint() == CDC_TXRX_EPSIZE);\r
-\r
-               /* Finalize the stream transfer to send the last packet */\r
-               Endpoint_ClearIN();\r
-\r
-               /* If the last packet filled the endpoint, send an empty packet to release the buffer on \r
-                * the receiver (otherwise all data will be cached until a non-full packet is received) */\r
-               if (IsFull)\r
-               {\r
-                       /* Wait until the endpoint is ready for another packet */\r
-                       Endpoint_WaitUntilReady();\r
-                       \r
-                       /* Send an empty packet to ensure that the host does not buffer data sent to it */\r
-                       Endpoint_ClearIN();\r
-               }\r
-       }\r
-\r
-       /* Select the Serial Rx Endpoint */\r
-       Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
-       \r
-       /* Throw away any received data from the host */\r
-       if (Endpoint_IsOUTReceived())\r
-         Endpoint_ClearOUT();\r
-}\r
diff --git a/Demos/Device/LowLevel/VirtualSerial/CDC.h b/Demos/Device/LowLevel/VirtualSerial/CDC.h
deleted file mode 100644 (file)
index 4a7b6b1..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for CDC.c.\r
- */\r
-\r
-#ifndef _CDC_H_\r
-#define _CDC_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/power.h>\r
-               #include <string.h>\r
-\r
-               #include "Descriptors.h"\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/Board/Joystick.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>
-\r
-       /* Macros: */\r
-               /** CDC Class specific request to get the current virtual serial port configuration settings. */\r
-               #define REQ_GetLineEncoding          0x21\r
-\r
-               /** CDC Class specific request to set the current virtual serial port configuration settings. */\r
-               #define REQ_SetLineEncoding          0x20\r
-\r
-               /** CDC Class specific request to set the current virtual serial port handshake line states. */\r
-               #define REQ_SetControlLineState      0x22\r
-               \r
-               /** Notification type constant for a change in the virtual serial port handshake line states, for\r
-                *  use with a USB_Notification_Header_t notification structure when sent to the host via the CDC \r
-                *  notification endpoint.\r
-                */\r
-               #define NOTIF_SerialState            0x20\r
-\r
-               /** Mask for the DTR handshake line for use with the REQ_SetControlLineState class specific request\r
-                *  from the host, to indicate that the DTR line state should be high.\r
-                */\r
-               #define CONTROL_LINE_OUT_DTR         (1 << 0)\r
-\r
-               /** Mask for the RTS handshake line for use with the REQ_SetControlLineState class specific request\r
-                *  from the host, to indicate that theRTS line state should be high.\r
-                */\r
-               #define CONTROL_LINE_OUT_RTS         (1 << 1)\r
-               \r
-               /** Mask for the DCD handshake line for use with the a NOTIF_SerialState class specific notification\r
-                *  from the device to the host, to indicate that the DCD line state is currently high.\r
-                */\r
-               #define CONTROL_LINE_IN_DCD          (1 << 0)\r
-\r
-               /** Mask for the DSR handshake line for use with the a NOTIF_SerialState class specific notification\r
-                *  from the device to the host, to indicate that the DSR line state is currently high.\r
-                */\r
-               #define CONTROL_LINE_IN_DSR          (1 << 1)\r
-\r
-               /** Mask for the BREAK handshake line for use with the a NOTIF_SerialState class specific notification\r
-                *  from the device to the host, to indicate that the BREAK line state is currently high.\r
-                */\r
-               #define CONTROL_LINE_IN_BREAK        (1 << 2)\r
-\r
-               /** Mask for the RING handshake line for use with the a NOTIF_SerialState class specific notification\r
-                *  from the device to the host, to indicate that the RING line state is currently high.\r
-                */\r
-               #define CONTROL_LINE_IN_RING         (1 << 3)\r
-\r
-               /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,\r
-                *  to indicate that a framing error has occurred on the virtual serial port.\r
-                */\r
-               #define CONTROL_LINE_IN_FRAMEERROR   (1 << 4)\r
-\r
-               /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,\r
-                *  to indicate that a parity error has occurred on the virtual serial port.\r
-                */\r
-               #define CONTROL_LINE_IN_PARITYERROR  (1 << 5)\r
-\r
-               /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,\r
-                *  to indicate that a data overrun error has occurred on the virtual serial port.\r
-                */\r
-               #define CONTROL_LINE_IN_OVERRUNERROR (1 << 6)\r
-               \r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-\r
-       /* Type Defines: */\r
-               /** Type define for the virtual serial port line encoding settings, for storing the current USART configuration\r
-                *  as set by the host via a class specific request.\r
-                */\r
-               typedef struct\r
-               {\r
-                       uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
-                       uint8_t  CharFormat; /**< Character format of the virtual serial port, a value from the\r
-                                             *   CDCDevice_CDC_LineCodingFormats_t enum\r
-                                             */\r
-                       uint8_t  ParityType; /**< Parity setting of the virtual serial port, a value from the\r
-                                             *   CDCDevice_LineCodingParity_t enum\r
-                                             */\r
-                       uint8_t  DataBits; /**< Bits of data per character of the virtual serial port */\r
-               } CDC_Line_Coding_t;\r
-               \r
-               /** Type define for a CDC notification, sent to the host via the CDC notification endpoint to indicate a\r
-                *  change in the device state asynchronously.\r
-                */\r
-               typedef struct\r
-               {\r
-                       uint8_t  NotificationType; /**< Notification type, a mask of REQDIR_*, REQTYPE_* and REQREC_* constants\r
-                                                   *   from the library StdRequestType.h header\r
-                                                   */\r
-                       uint8_t  Notification; /**< Notification value, a NOTIF_* constant */\r
-                       uint16_t wValue; /**< Notification wValue, notification-specific */\r
-                       uint16_t wIndex; /**< Notification wIndex, notification-specific */\r
-                       uint16_t wLength; /**< Notification wLength, notification-specific */\r
-               } USB_Notification_Header_t;\r
-               \r
-       /* Enums: */\r
-               /** Enum for the possible line encoding formats of a virtual serial port. */\r
-               enum CDCDevice_CDC_LineCodingFormats_t\r
-               {\r
-                       OneStopBit          = 0, /**< Each frame contains one stop bit */\r
-                       OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits */\r
-                       TwoStopBits         = 2, /**< Each frame contains two stop bits */\r
-               };\r
-               \r
-               /** Enum for the possible line encoding parity settings of a virtual serial port. */\r
-               enum CDCDevice_LineCodingParity_t\r
-               {\r
-                       Parity_None         = 0, /**< No parity bit mode on each frame */\r
-                       Parity_Odd          = 1, /**< Odd parity bit mode on each frame */\r
-                       Parity_Even         = 2, /**< Even parity bit mode on each frame */\r
-                       Parity_Mark         = 3, /**< Mark parity bit mode on each frame */\r
-                       Parity_Space        = 4, /**< Space parity bit mode on each frame */\r
-               };\r
-               \r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void CDC_Task(void);\r
-               \r
-               void EVENT_USB_Device_Connect(void);\r
-               void EVENT_USB_Device_Disconnect(void);\r
-               void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_UnhandledControlRequest(void);\r
-\r
-#endif\r
diff --git a/Demos/Device/LowLevel/VirtualSerial/CDC.txt b/Demos/Device/LowLevel/VirtualSerial/CDC.txt
deleted file mode 100644 (file)
index 4983735..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage Communications Device Class (Virtual Serial Port) Demo\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *  - Series 6 USB AVRs\r
- *  - Series 4 USB AVRs\r
- *  - Series 2 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Device</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Communications Device Class (CDC)</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Abstract Control Model (ACM)</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  Communications Device Class demonstration application.\r
- *  This gives a simple reference application for implementing\r
- *  a CDC device acting as a virtual serial port. Joystick\r
- *  actions are transmitted to the host as strings. The device\r
- *  does not respond to serial data sent from the host.\r
- *  \r
- *  After running this demo for the first time on a new computer,\r
- *  you will need to supply the .INF file located in this demo\r
- *  project's directory as the device's driver when running under\r
- *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
- *  negating the need for custom drivers for the device. Other\r
- *  Operating Systems should automatically use their own inbuilt\r
- *  CDC-ACM drivers.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */
\ No newline at end of file
index fa91d22..57d1023 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - CDC Device Demo"\r
+PROJECT_NAME           = "LUFA Library - Virtual Serial Device Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Device/LowLevel/VirtualSerial/LUFA CDC.inf b/Demos/Device/LowLevel/VirtualSerial/LUFA CDC.inf
deleted file mode 100644 (file)
index 4cdf594..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-;************************************************************\r
-; Windows USB CDC ACM Setup File\r
-; Copyright (c) 2000 Microsoft Corporation\r
-\r
-\r
-[Version]\r
-Signature="$Windows NT$"\r
-Class=Ports\r
-ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
-Provider=%MFGNAME%\r
-LayoutFile=layout.inf\r
-CatalogFile=%MFGFILENAME%.cat\r
-DriverVer=11/15/2007,5.1.2600.0\r
-\r
-[Manufacturer]\r
-%MFGNAME%=DeviceList, NTamd64\r
-\r
-[DestinationDirs]\r
-DefaultDestDir=12\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Windows 2000/XP/Vista-32bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.nt]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.nt\r
-AddReg=DriverInstall.nt.AddReg\r
-\r
-[DriverCopyFiles.nt]\r
-usbser.sys,,,0x20\r
-\r
-[DriverInstall.nt.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.nt.Services]\r
-AddService=usbser, 0x00000002, DriverService.nt\r
-\r
-[DriverService.nt]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vista-64bit Sections\r
-;------------------------------------------------------------------------------\r
-\r
-[DriverInstall.NTamd64]\r
-include=mdmcpq.inf\r
-CopyFiles=DriverCopyFiles.NTamd64\r
-AddReg=DriverInstall.NTamd64.AddReg\r
-\r
-[DriverCopyFiles.NTamd64]\r
-%DRIVERFILENAME%.sys,,,0x20\r
-\r
-[DriverInstall.NTamd64.AddReg]\r
-HKR,,DevLoader,,*ntkern\r
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
-\r
-[DriverInstall.NTamd64.Services]\r
-AddService=usbser, 0x00000002, DriverService.NTamd64\r
-\r
-[DriverService.NTamd64]\r
-DisplayName=%SERVICE%\r
-ServiceType=1\r
-StartType=3\r
-ErrorControl=1\r
-ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  Vendor and Product ID Definitions\r
-;------------------------------------------------------------------------------\r
-; When developing your USB device, the VID and PID used in the PC side\r
-; application program and the firmware on the microcontroller must match.\r
-; Modify the below line to use your VID and PID.  Use the format as shown below.\r
-; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
-; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
-;------------------------------------------------------------------------------\r
-[SourceDisksFiles]\r
-[SourceDisksNames]\r
-[DeviceList]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
-\r
-[DeviceList.NTamd64]\r
-%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
-\r
-\r
-;------------------------------------------------------------------------------\r
-;  String Definitions\r
-;------------------------------------------------------------------------------\r
-;Modify these strings to customize your device\r
-;------------------------------------------------------------------------------\r
-[Strings]\r
-MFGFILENAME="CDC_vista"\r
-DRIVERFILENAME ="usbser"\r
-MFGNAME="CCS, Inc."\r
-INSTDISK="LUFA CDC Driver Installer"\r
-DESCRIPTION="Communications Port"\r
-SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/LowLevel/VirtualSerial/LUFA VirtualSerial.inf b/Demos/Device/LowLevel/VirtualSerial/LUFA VirtualSerial.inf
new file mode 100644 (file)
index 0000000..4cdf594
--- /dev/null
@@ -0,0 +1,106 @@
+;************************************************************\r
+; Windows USB CDC ACM Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+\r
+[Version]\r
+Signature="$Windows NT$"\r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}\r
+Provider=%MFGNAME%\r
+LayoutFile=layout.inf\r
+CatalogFile=%MFGFILENAME%.cat\r
+DriverVer=11/15/2007,5.1.2600.0\r
+\r
+[Manufacturer]\r
+%MFGNAME%=DeviceList, NTamd64\r
+\r
+[DestinationDirs]\r
+DefaultDestDir=12\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Windows 2000/XP/Vista-32bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.nt]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.nt\r
+AddReg=DriverInstall.nt.AddReg\r
+\r
+[DriverCopyFiles.nt]\r
+usbser.sys,,,0x20\r
+\r
+[DriverInstall.nt.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.nt.Services]\r
+AddService=usbser, 0x00000002, DriverService.nt\r
+\r
+[DriverService.nt]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vista-64bit Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[DriverInstall.NTamd64]\r
+include=mdmcpq.inf\r
+CopyFiles=DriverCopyFiles.NTamd64\r
+AddReg=DriverInstall.NTamd64.AddReg\r
+\r
+[DriverCopyFiles.NTamd64]\r
+%DRIVERFILENAME%.sys,,,0x20\r
+\r
+[DriverInstall.NTamd64.AddReg]\r
+HKR,,DevLoader,,*ntkern\r
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys\r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"\r
+\r
+[DriverInstall.NTamd64.Services]\r
+AddService=usbser, 0x00000002, DriverService.NTamd64\r
+\r
+[DriverService.NTamd64]\r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\%DRIVERFILENAME%.sys\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  Vendor and Product ID Definitions\r
+;------------------------------------------------------------------------------\r
+; When developing your USB device, the VID and PID used in the PC side\r
+; application program and the firmware on the microcontroller must match.\r
+; Modify the below line to use your VID and PID.  Use the format as shown below.\r
+; Note: One INF file can be used for multiple devices with different VID and PIDs.\r
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.\r
+;------------------------------------------------------------------------------\r
+[SourceDisksFiles]\r
+[SourceDisksNames]\r
+[DeviceList]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
+\r
+[DeviceList.NTamd64]\r
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_2044\r
+\r
+\r
+;------------------------------------------------------------------------------\r
+;  String Definitions\r
+;------------------------------------------------------------------------------\r
+;Modify these strings to customize your device\r
+;------------------------------------------------------------------------------\r
+[Strings]\r
+MFGFILENAME="CDC_vista"\r
+DRIVERFILENAME ="usbser"\r
+MFGNAME="CCS, Inc."\r
+INSTDISK="LUFA CDC Driver Installer"\r
+DESCRIPTION="Communications Port"\r
+SERVICE="USB RS-232 Emulation Driver"
\ No newline at end of file
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
new file mode 100644 (file)
index 0000000..444dc01
--- /dev/null
@@ -0,0 +1,327 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the CDC demo. This file contains the main tasks of the demo and\r
+ *  is responsible for the initial application hardware configuration.\r
+ */\r
+\r
+#include "CDC.h"\r
+\r
+/** Contains the current baud rate and other settings of the virtual serial port. While this demo does not use\r
+ *  the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
+ *  upon request or the host will assume the device is non-functional.\r
+ *\r
+ *  These values are set by the host via a class-specific request, however they are not required to be used accurately.\r
+ *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
+ *  serial link characteristics and instead sends and receives data in endpoint streams.\r
+ */\r
+CDC_Line_Coding_t LineEncoding = { .BaudRateBPS = 0,\r
+                                   .CharFormat  = OneStopBit,\r
+                                   .ParityType  = Parity_None,\r
+                                   .DataBits    = 8            };\r
+\r
+\r
+#if 0\r
+/* NOTE: Here you can set up a standard stream using the created virtual serial port, so that the standard stream functions in\r
+ *       <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).\r
+ */\r
+       \r
+static int CDC_putchar(char c, FILE *stream)\r
+{        \r
+       Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
+\r
+       if (!(LineEncoding.BaudRateBPS))\r
+         return -1;\r
+       \r
+       if (Endpoint_WaitUntilReady())\r
+         return -1;\r
+\r
+       Endpoint_Write_Byte(c);\r
+       Endpoint_ClearIN();\r
+       \r
+       return 0;\r
+}\r
+\r
+static int CDC_getchar(FILE *stream)\r
+{\r
+       int c;\r
+\r
+       if (!(LineEncoding.BaudRateBPS))\r
+         return -1;\r
+\r
+       Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
+       \r
+       for (;;)\r
+       {\r
+               if (Endpoint_WaitUntilReady())\r
+                 return -1;\r
+       \r
+               if (!(Endpoint_BytesInEndpoint()))\r
+               {\r
+                       Endpoint_ClearOUT();\r
+               }\r
+               else\r
+               {\r
+                       c = Endpoint_Read_Byte();\r
+                       break;\r
+               }\r
+       }\r
+       \r
+       return c;\r
+}\r
+\r
+static FILE USBSerial = FDEV_SETUP_STREAM(CDC_putchar, CDC_getchar, _FDEV_SETUP_RW);\r
+#endif\r
+\r
+/** Main program entry point. This routine contains the overall program flow, including initial\r
+ *  setup of all components and the main program loop.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+       \r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+       for (;;)\r
+       {\r
+               CDC_Task();\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       Joystick_Init();\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and\r
+ *  starts the library USB task to begin the enumeration and USB management process.\r
+ */\r
+void EVENT_USB_Device_Connect(void)\r
+{\r
+       /* Indicate USB enumerating */\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via\r
+ *  the status LEDs and stops the USB management and CDC management tasks.\r
+ */\r
+void EVENT_USB_Device_Disconnect(void)\r
+{\r
+       /* Indicate USB not ready */\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration\r
+ *  of the USB device after enumeration - the device endpoints are configured and the CDC management task started.\r
+ */\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
+{\r
+       /* Indicate USB connected and ready */\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       /* Setup CDC Notification, Rx and Tx Endpoints */\r
+       if (!(Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
+                                            ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       if (!(Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,\r
+                                            ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       if (!(Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,\r
+                                            ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       /* Reset line encoding baud rate so that the host knows to send new values */\r
+       LineEncoding.BaudRateBPS = 0;\r
+}\r
+\r
+/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific\r
+ *  control requests that are not handled internally by the USB library (including the CDC control commands,\r
+ *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.\r
+ */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
+{\r
+       /* Process CDC specific control requests */\r
+       switch (USB_ControlRequest.bRequest)\r
+       {\r
+               case REQ_GetLineEncoding:\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       {       \r
+                               /* Acknowledge the SETUP packet, ready for data transfer */\r
+                               Endpoint_ClearSETUP();\r
+\r
+                               /* Write the line coding data to the control endpoint */\r
+                               Endpoint_Write_Control_Stream_LE(&LineEncoding, sizeof(CDC_Line_Coding_t));\r
+                               \r
+                               /* Finalize the stream transfer to send the last packet or clear the host abort */\r
+                               Endpoint_ClearOUT();\r
+                       }\r
+                       \r
+                       break;\r
+               case REQ_SetLineEncoding:\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       {\r
+                               /* Acknowledge the SETUP packet, ready for data transfer */\r
+                               Endpoint_ClearSETUP();\r
+\r
+                               /* Read the line coding data in from the host into the global struct */\r
+                               Endpoint_Read_Control_Stream_LE(&LineEncoding, sizeof(CDC_Line_Coding_t));\r
+\r
+                               /* Finalize the stream transfer to clear the last packet from the host */\r
+                               Endpoint_ClearIN();\r
+                       }\r
+       \r
+                       break;\r
+               case REQ_SetControlLineState:\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       {\r
+                               /* Acknowledge the SETUP packet, ready for data transfer */\r
+                               Endpoint_ClearSETUP();\r
+                               \r
+                               /* NOTE: Here you can read in the line state mask from the host, to get the current state of the output handshake\r
+                                        lines. The mask is read in from the wValue parameter in USB_ControlRequest, and can be masked against the\r
+                                                CONTROL_LINE_OUT_* masks to determine the RTS and DTR line states using the following code:\r
+                               */\r
+                               \r
+                               Endpoint_ClearStatusStage();\r
+                       }\r
+       \r
+                       break;\r
+       }\r
+}\r
+\r
+/** Function to manage CDC data transmission and reception to and from the host. */\r
+void CDC_Task(void)\r
+{\r
+       char*       ReportString    = NULL;\r
+       uint8_t     JoyStatus_LCL   = Joystick_GetStatus();\r
+       static bool ActionSent      = false;\r
+       \r
+       /* Device must be connected and configured for the task to run */\r
+       if (USB_DeviceState != DEVICE_STATE_Configured)\r
+         return;\r
+         \r
+#if 0\r
+       /* NOTE: Here you can use the notification endpoint to send back line state changes to the host, for the special RS-232\r
+        *       handshake signal lines (and some error states), via the CONTROL_LINE_IN_* masks and the following code:\r
+        */\r
+       USB_Notification_Header_t Notification = (USB_Notification_Header_t)\r
+               {\r
+                       .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+                       .Notification     = NOTIF_SerialState,\r
+                       .wValue           = 0,\r
+                       .wIndex           = 0,\r
+                       .wLength          = sizeof(uint16_t),\r
+               };\r
+               \r
+       uint16_t LineStateMask;\r
+       \r
+       // Set LineStateMask here to a mask of CONTROL_LINE_IN_* masks to set the input handshake line states to send to the host\r
+       \r
+       Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPNUM);\r
+       Endpoint_Write_Stream_LE(&Notification, sizeof(Notification));\r
+       Endpoint_Write_Stream_LE(&LineStateMask, sizeof(LineStateMask));\r
+       Endpoint_ClearIN();\r
+#endif\r
+\r
+       /* Determine if a joystick action has occurred */\r
+       if (JoyStatus_LCL & JOY_UP)\r
+         ReportString = "Joystick Up\r\n";\r
+       else if (JoyStatus_LCL & JOY_DOWN)\r
+         ReportString = "Joystick Down\r\n";\r
+       else if (JoyStatus_LCL & JOY_LEFT)\r
+         ReportString = "Joystick Left\r\n";\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         ReportString = "Joystick Right\r\n";\r
+       else if (JoyStatus_LCL & JOY_PRESS)\r
+         ReportString = "Joystick Pressed\r\n";\r
+       else\r
+         ActionSent = false;\r
+\r
+       /* Flag management - Only allow one string to be sent per action */\r
+       if ((ReportString != NULL) && (ActionSent == false) && LineEncoding.BaudRateBPS)\r
+       {\r
+               ActionSent = true;\r
+\r
+               /* Select the Serial Tx Endpoint */\r
+               Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
+\r
+               /* Write the String to the Endpoint */\r
+               Endpoint_Write_Stream_LE(ReportString, strlen(ReportString));\r
+               \r
+               /* Remember if the packet to send completely fills the endpoint */\r
+               bool IsFull = (Endpoint_BytesInEndpoint() == CDC_TXRX_EPSIZE);\r
+\r
+               /* Finalize the stream transfer to send the last packet */\r
+               Endpoint_ClearIN();\r
+\r
+               /* If the last packet filled the endpoint, send an empty packet to release the buffer on \r
+                * the receiver (otherwise all data will be cached until a non-full packet is received) */\r
+               if (IsFull)\r
+               {\r
+                       /* Wait until the endpoint is ready for another packet */\r
+                       Endpoint_WaitUntilReady();\r
+                       \r
+                       /* Send an empty packet to ensure that the host does not buffer data sent to it */\r
+                       Endpoint_ClearIN();\r
+               }\r
+       }\r
+\r
+       /* Select the Serial Rx Endpoint */\r
+       Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
+       \r
+       /* Throw away any received data from the host */\r
+       if (Endpoint_IsOUTReceived())\r
+         Endpoint_ClearOUT();\r
+}\r
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
new file mode 100644 (file)
index 0000000..4a7b6b1
--- /dev/null
@@ -0,0 +1,183 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for CDC.c.\r
+ */\r
+\r
+#ifndef _CDC_H_\r
+#define _CDC_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/power.h>\r
+               #include <string.h>\r
+\r
+               #include "Descriptors.h"\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/Board/Joystick.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>
+\r
+       /* Macros: */\r
+               /** CDC Class specific request to get the current virtual serial port configuration settings. */\r
+               #define REQ_GetLineEncoding          0x21\r
+\r
+               /** CDC Class specific request to set the current virtual serial port configuration settings. */\r
+               #define REQ_SetLineEncoding          0x20\r
+\r
+               /** CDC Class specific request to set the current virtual serial port handshake line states. */\r
+               #define REQ_SetControlLineState      0x22\r
+               \r
+               /** Notification type constant for a change in the virtual serial port handshake line states, for\r
+                *  use with a USB_Notification_Header_t notification structure when sent to the host via the CDC \r
+                *  notification endpoint.\r
+                */\r
+               #define NOTIF_SerialState            0x20\r
+\r
+               /** Mask for the DTR handshake line for use with the REQ_SetControlLineState class specific request\r
+                *  from the host, to indicate that the DTR line state should be high.\r
+                */\r
+               #define CONTROL_LINE_OUT_DTR         (1 << 0)\r
+\r
+               /** Mask for the RTS handshake line for use with the REQ_SetControlLineState class specific request\r
+                *  from the host, to indicate that theRTS line state should be high.\r
+                */\r
+               #define CONTROL_LINE_OUT_RTS         (1 << 1)\r
+               \r
+               /** Mask for the DCD handshake line for use with the a NOTIF_SerialState class specific notification\r
+                *  from the device to the host, to indicate that the DCD line state is currently high.\r
+                */\r
+               #define CONTROL_LINE_IN_DCD          (1 << 0)\r
+\r
+               /** Mask for the DSR handshake line for use with the a NOTIF_SerialState class specific notification\r
+                *  from the device to the host, to indicate that the DSR line state is currently high.\r
+                */\r
+               #define CONTROL_LINE_IN_DSR          (1 << 1)\r
+\r
+               /** Mask for the BREAK handshake line for use with the a NOTIF_SerialState class specific notification\r
+                *  from the device to the host, to indicate that the BREAK line state is currently high.\r
+                */\r
+               #define CONTROL_LINE_IN_BREAK        (1 << 2)\r
+\r
+               /** Mask for the RING handshake line for use with the a NOTIF_SerialState class specific notification\r
+                *  from the device to the host, to indicate that the RING line state is currently high.\r
+                */\r
+               #define CONTROL_LINE_IN_RING         (1 << 3)\r
+\r
+               /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,\r
+                *  to indicate that a framing error has occurred on the virtual serial port.\r
+                */\r
+               #define CONTROL_LINE_IN_FRAMEERROR   (1 << 4)\r
+\r
+               /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,\r
+                *  to indicate that a parity error has occurred on the virtual serial port.\r
+                */\r
+               #define CONTROL_LINE_IN_PARITYERROR  (1 << 5)\r
+\r
+               /** Mask for use with the a NOTIF_SerialState class specific notification from the device to the host,\r
+                *  to indicate that a data overrun error has occurred on the virtual serial port.\r
+                */\r
+               #define CONTROL_LINE_IN_OVERRUNERROR (1 << 6)\r
+               \r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+\r
+       /* Type Defines: */\r
+               /** Type define for the virtual serial port line encoding settings, for storing the current USART configuration\r
+                *  as set by the host via a class specific request.\r
+                */\r
+               typedef struct\r
+               {\r
+                       uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
+                       uint8_t  CharFormat; /**< Character format of the virtual serial port, a value from the\r
+                                             *   CDCDevice_CDC_LineCodingFormats_t enum\r
+                                             */\r
+                       uint8_t  ParityType; /**< Parity setting of the virtual serial port, a value from the\r
+                                             *   CDCDevice_LineCodingParity_t enum\r
+                                             */\r
+                       uint8_t  DataBits; /**< Bits of data per character of the virtual serial port */\r
+               } CDC_Line_Coding_t;\r
+               \r
+               /** Type define for a CDC notification, sent to the host via the CDC notification endpoint to indicate a\r
+                *  change in the device state asynchronously.\r
+                */\r
+               typedef struct\r
+               {\r
+                       uint8_t  NotificationType; /**< Notification type, a mask of REQDIR_*, REQTYPE_* and REQREC_* constants\r
+                                                   *   from the library StdRequestType.h header\r
+                                                   */\r
+                       uint8_t  Notification; /**< Notification value, a NOTIF_* constant */\r
+                       uint16_t wValue; /**< Notification wValue, notification-specific */\r
+                       uint16_t wIndex; /**< Notification wIndex, notification-specific */\r
+                       uint16_t wLength; /**< Notification wLength, notification-specific */\r
+               } USB_Notification_Header_t;\r
+               \r
+       /* Enums: */\r
+               /** Enum for the possible line encoding formats of a virtual serial port. */\r
+               enum CDCDevice_CDC_LineCodingFormats_t\r
+               {\r
+                       OneStopBit          = 0, /**< Each frame contains one stop bit */\r
+                       OneAndAHalfStopBits = 1, /**< Each frame contains one and a half stop bits */\r
+                       TwoStopBits         = 2, /**< Each frame contains two stop bits */\r
+               };\r
+               \r
+               /** Enum for the possible line encoding parity settings of a virtual serial port. */\r
+               enum CDCDevice_LineCodingParity_t\r
+               {\r
+                       Parity_None         = 0, /**< No parity bit mode on each frame */\r
+                       Parity_Odd          = 1, /**< Odd parity bit mode on each frame */\r
+                       Parity_Even         = 2, /**< Even parity bit mode on each frame */\r
+                       Parity_Mark         = 3, /**< Mark parity bit mode on each frame */\r
+                       Parity_Space        = 4, /**< Space parity bit mode on each frame */\r
+               };\r
+               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
+               void CDC_Task(void);\r
+               \r
+               void EVENT_USB_Device_Connect(void);\r
+               void EVENT_USB_Device_Disconnect(void);\r
+               void EVENT_USB_Device_ConfigurationChanged(void);\r
+               void EVENT_USB_Device_UnhandledControlRequest(void);\r
+\r
+#endif\r
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt
new file mode 100644 (file)
index 0000000..4983735
--- /dev/null
@@ -0,0 +1,72 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage Communications Device Class (Virtual Serial Port) Demo\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *  - Series 6 USB AVRs\r
+ *  - Series 4 USB AVRs\r
+ *  - Series 2 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Device</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Communications Device Class (CDC)</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Abstract Control Model (ACM)</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  Communications Device Class demonstration application.\r
+ *  This gives a simple reference application for implementing\r
+ *  a CDC device acting as a virtual serial port. Joystick\r
+ *  actions are transmitted to the host as strings. The device\r
+ *  does not respond to serial data sent from the host.\r
+ *  \r
+ *  After running this demo for the first time on a new computer,\r
+ *  you will need to supply the .INF file located in this demo\r
+ *  project's directory as the device's driver when running under\r
+ *  Windows. This will enable Windows to use its inbuilt CDC drivers,\r
+ *  negating the need for custom drivers for the device. Other\r
+ *  Operating Systems should automatically use their own inbuilt\r
+ *  CDC-ACM drivers.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */
\ No newline at end of file
index 934b3d0..6528651 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = CDC\r
+TARGET = VirtualSerial\r
 \r
 \r
 # Object files directory\r
index 68bcac6..991b37e 100644 (file)
@@ -20,11 +20,8 @@ all:
        make -C AudioOutput clean
        make -C AudioOutput all
 
-       make -C CDC clean
-       make -C CDC all
-
-       make -C DualCDC clean
-       make -C DualCDC all
+       make -C DualVirtualSerial clean
+       make -C DualVirtualSerial all
 
        make -C GenericHID clean
        make -C GenericHID all
@@ -50,11 +47,13 @@ all:
        make -C RNDISEthernet clean
        make -C RNDISEthernet all
 
+       make -C VirtualSerial clean
+       make -C VirtualSerial all
+
 %:
        make -C AudioInput $@
        make -C AudioOutput $@
-       make -C CDC $@
-       make -C DualCDC $@
+       make -C DualVirtualSerial $@
        make -C GenericHID $@
        make -C Joystick $@
        make -C Keyboard $@
@@ -63,3 +62,4 @@ all:
        make -C MIDI $@
        make -C Mouse $@
        make -C RNDISEthernet $@
+       make -C VirtualSerial $@
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.c
deleted file mode 100644 (file)
index 4b08f7d..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the CDCHost demo. This file contains the main tasks of\r
- *  the demo and is responsible for the initial application hardware configuration.\r
- */\r
\r
-#include "CDCHost.h"\r
-\r
-/** LUFA CDC Class driver interface configuration and state information. This structure is\r
- *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
- *  within a device can be differentiated from one another.\r
- */\r
-USB_ClassInfo_CDC_Host_t VirtualSerial_CDC_Interface =\r
-       {\r
-               .Config =\r
-                       {\r
-                               .DataINPipeNumber           = 1,\r
-                               .DataINPipeDoubleBank       = false,\r
-\r
-                               .DataOUTPipeNumber          = 2,\r
-                               .DataOUTPipeDoubleBank      = false,\r
-\r
-                               .NotificationPipeNumber     = 3,\r
-                               .NotificationPipeDoubleBank = false,\r
-                       },\r
-       };\r
-       \r
-/** Main program entry point. This routine configures the hardware required by the application, then\r
- *  enters a loop to run the application tasks in sequence.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-\r
-       puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
-       for (;;)\r
-       {\r
-               switch (USB_HostState)\r
-               {\r
-                       case HOST_STATE_Addressed:\r
-                               LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-                       \r
-                               uint16_t ConfigDescriptorSize;\r
-                               uint8_t  ConfigDescriptorData[512];\r
-\r
-                               if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
-                                                                      sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
-                               {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
-                                       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-                                       USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
-                                       break;\r
-                               }\r
-\r
-                               if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface,\r
-                                                           ConfigDescriptorSize, ConfigDescriptorData) != CDC_ENUMERROR_NoError)\r
-                               {\r
-                                       printf("Attached Device Not a Valid CDC Class Device.\r\n");\r
-                                       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-                                       USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
-                                       break;\r
-                               }\r
-                               \r
-                               if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
-                               {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
-                                       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-                                       USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
-                                       break;\r
-                               }\r
-                               \r
-                               printf("CDC Device Enumerated.\r\n");\r
-                               USB_HostState = HOST_STATE_Configured;\r
-                               break;\r
-                       case HOST_STATE_Configured:\r
-                               if (CDC_Host_BytesReceived(&VirtualSerial_CDC_Interface))\r
-                               {\r
-                                       /* Echo received bytes from the attached device through the USART */\r
-                                       while (CDC_Host_BytesReceived(&VirtualSerial_CDC_Interface))\r
-                                         putchar(CDC_Host_ReceiveByte(&VirtualSerial_CDC_Interface));\r
-                                         \r
-                                       CDC_Host_Flush(&VirtualSerial_CDC_Interface);  \r
-                               }\r
-                       \r
-                               break;\r
-               }\r
-       \r
-               CDC_Host_USBTask(&VirtualSerial_CDC_Interface);\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       SerialStream_Init(9600, false);\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and\r
- *  starts the library USB task to begin the enumeration and USB management process.\r
- */\r
-void EVENT_USB_Host_DeviceAttached(void)\r
-{\r
-       puts_P(PSTR("Device Attached.\r\n"));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and\r
- *  stops the library USB task management process.\r
- */\r
-void EVENT_USB_Host_DeviceUnattached(void)\r
-{\r
-       puts_P(PSTR("\r\nDevice Unattached.\r\n"));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully\r
- *  enumerated by the host and is now ready to be used by the application.\r
- */\r
-void EVENT_USB_Host_DeviceEnumerationComplete(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-}\r
-\r
-/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */\r
-void EVENT_USB_Host_HostError(const uint8_t ErrorCode)\r
-{\r
-       USB_ShutDown();\r
-\r
-       printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"\r
-                                " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       for(;;);\r
-}\r
-\r
-/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while\r
- *  enumerating an attached USB device.\r
- */\r
-void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)\r
-{\r
-       printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"\r
-                                " -- Error Code %d\r\n"\r
-                                " -- Sub Error Code %d\r\n"\r
-                                " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);\r
-       \r
-       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-}\r
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.h b/Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.h
deleted file mode 100644 (file)
index d666b73..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for CDCHost.c.\r
- */\r
-\r
-#ifndef _CDC_HOST_H_\r
-#define _CDC_HOST_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/pgmspace.h>\r
-               #include <avr/power.h>\r
-               #include <stdio.h>\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
-               #include <LUFA/Drivers/Peripheral/SerialStream.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/USB/Class/CDC.h>\r
-               \r
-       /* Macros: */\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-               \r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-       \r
-               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);\r
-               void EVENT_USB_Host_DeviceAttached(void);\r
-               void EVENT_USB_Host_DeviceUnattached(void);\r
-               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);\r
-               void EVENT_USB_Host_DeviceEnumerationComplete(void);\r
-               \r
-#endif\r
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.txt b/Demos/Host/ClassDriver/VirtualSerialHost/CDCHost.txt
deleted file mode 100644 (file)
index 6599992..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage CDC Host Demo\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Host</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Communications Device Class (CDC)</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Abstract Control Model (ACM)</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  CDC host demonstration application. This gives a simple reference application\r
- *  for implementing a USB CDC host, for CDC devices using the standard ACM profile.\r
- *  \r
- *  This demo prints out received CDC data through the serial port.\r
- *  \r
- *  Not that this demo is only compatible with devices which report the correct CDC\r
- *  and ACM class, subclass and protocol values. Most USB-Serial cables have vendor\r
- *  specific features, thus use vendor-specific class/subclass/protocol codes to force\r
- *  the user to use specialized drivers. This demo is not compatible with such devices.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */\r
index 3f2e0b9..097bd05 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - CDC Host Demo"\r
+PROJECT_NAME           = "LUFA Library - Virtual Serial Host Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
new file mode 100644 (file)
index 0000000..4b08f7d
--- /dev/null
@@ -0,0 +1,191 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the CDCHost demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
\r
+#include "CDCHost.h"\r
+\r
+/** LUFA CDC Class driver interface configuration and state information. This structure is\r
+ *  passed to all CDC Class driver functions, so that multiple instances of the same class\r
+ *  within a device can be differentiated from one another.\r
+ */\r
+USB_ClassInfo_CDC_Host_t VirtualSerial_CDC_Interface =\r
+       {\r
+               .Config =\r
+                       {\r
+                               .DataINPipeNumber           = 1,\r
+                               .DataINPipeDoubleBank       = false,\r
+\r
+                               .DataOUTPipeNumber          = 2,\r
+                               .DataOUTPipeDoubleBank      = false,\r
+\r
+                               .NotificationPipeNumber     = 3,\r
+                               .NotificationPipeDoubleBank = false,\r
+                       },\r
+       };\r
+       \r
+/** Main program entry point. This routine configures the hardware required by the application, then\r
+ *  enters a loop to run the application tasks in sequence.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+\r
+       puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));\r
+\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+       for (;;)\r
+       {\r
+               switch (USB_HostState)\r
+               {\r
+                       case HOST_STATE_Addressed:\r
+                               LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+                       \r
+                               uint16_t ConfigDescriptorSize;\r
+                               uint8_t  ConfigDescriptorData[512];\r
+\r
+                               if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
+                                                                      sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
+                               {\r
+                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+                                       USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
+                                       break;\r
+                               }\r
+\r
+                               if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface,\r
+                                                           ConfigDescriptorSize, ConfigDescriptorData) != CDC_ENUMERROR_NoError)\r
+                               {\r
+                                       printf("Attached Device Not a Valid CDC Class Device.\r\n");\r
+                                       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+                                       USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
+                                       break;\r
+                               }\r
+                               \r
+                               if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
+                               {\r
+                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+                                       USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
+                                       break;\r
+                               }\r
+                               \r
+                               printf("CDC Device Enumerated.\r\n");\r
+                               USB_HostState = HOST_STATE_Configured;\r
+                               break;\r
+                       case HOST_STATE_Configured:\r
+                               if (CDC_Host_BytesReceived(&VirtualSerial_CDC_Interface))\r
+                               {\r
+                                       /* Echo received bytes from the attached device through the USART */\r
+                                       while (CDC_Host_BytesReceived(&VirtualSerial_CDC_Interface))\r
+                                         putchar(CDC_Host_ReceiveByte(&VirtualSerial_CDC_Interface));\r
+                                         \r
+                                       CDC_Host_Flush(&VirtualSerial_CDC_Interface);  \r
+                               }\r
+                       \r
+                               break;\r
+               }\r
+       \r
+               CDC_Host_USBTask(&VirtualSerial_CDC_Interface);\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       SerialStream_Init(9600, false);\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and\r
+ *  starts the library USB task to begin the enumeration and USB management process.\r
+ */\r
+void EVENT_USB_Host_DeviceAttached(void)\r
+{\r
+       puts_P(PSTR("Device Attached.\r\n"));\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and\r
+ *  stops the library USB task management process.\r
+ */\r
+void EVENT_USB_Host_DeviceUnattached(void)\r
+{\r
+       puts_P(PSTR("\r\nDevice Unattached.\r\n"));\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully\r
+ *  enumerated by the host and is now ready to be used by the application.\r
+ */\r
+void EVENT_USB_Host_DeviceEnumerationComplete(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+}\r
+\r
+/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */\r
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)\r
+{\r
+       USB_ShutDown();\r
+\r
+       printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"\r
+                                " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       for(;;);\r
+}\r
+\r
+/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while\r
+ *  enumerating an attached USB device.\r
+ */\r
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)\r
+{\r
+       printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"\r
+                                " -- Error Code %d\r\n"\r
+                                " -- Sub Error Code %d\r\n"\r
+                                " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);\r
+       \r
+       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+}\r
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h
new file mode 100644 (file)
index 0000000..d666b73
--- /dev/null
@@ -0,0 +1,75 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for CDCHost.c.\r
+ */\r
+\r
+#ifndef _CDC_HOST_H_\r
+#define _CDC_HOST_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/pgmspace.h>\r
+               #include <avr/power.h>\r
+               #include <stdio.h>\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
+               #include <LUFA/Drivers/Peripheral/SerialStream.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/USB/Class/CDC.h>\r
+               \r
+       /* Macros: */\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
+       \r
+               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);\r
+               void EVENT_USB_Host_DeviceAttached(void);\r
+               void EVENT_USB_Host_DeviceUnattached(void);\r
+               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);\r
+               void EVENT_USB_Host_DeviceEnumerationComplete(void);\r
+               \r
+#endif\r
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.txt b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.txt
new file mode 100644 (file)
index 0000000..6599992
--- /dev/null
@@ -0,0 +1,65 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage CDC Host Demo\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Host</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Communications Device Class (CDC)</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Abstract Control Model (ACM)</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  CDC host demonstration application. This gives a simple reference application\r
+ *  for implementing a USB CDC host, for CDC devices using the standard ACM profile.\r
+ *  \r
+ *  This demo prints out received CDC data through the serial port.\r
+ *  \r
+ *  Not that this demo is only compatible with devices which report the correct CDC\r
+ *  and ACM class, subclass and protocol values. Most USB-Serial cables have vendor\r
+ *  specific features, thus use vendor-specific class/subclass/protocol codes to force\r
+ *  the user to use specialized drivers. This demo is not compatible with such devices.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
index 345fbe4..2942a6d 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = CDCHost\r
+TARGET = VirtualSerialHost\r
 \r
 \r
 # Object files directory\r
index e7ad330..fb9487c 100644 (file)
@@ -14,9 +14,6 @@
 # code.
 
 all:
-       make -C CDCHost clean
-       make -C CDCHost all     
-
        make -C JoystickHostWithParser clean
        make -C JoystickHostWithParser all      
 
@@ -46,9 +43,11 @@ all:
 
        make -C StillImageHost clean
        make -C StillImageHost all
+
+       make -C VirtualSerialHost clean
+       make -C VirtualSerialHost all   
        
 %:
-       make -C CDCHost $@
        make -C JoystickHostWithParser $@
        make -C KeyboardHost $@
        make -C KeyboardHostWithParser $@
@@ -58,3 +57,4 @@ all:
        make -C PrinterHost $@
        make -C RNDISEthernetHost $@
        make -C StillImageHost $@
+       make -C VirtualSerialHost $@
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/CDCHost.c b/Demos/Host/LowLevel/VirtualSerialHost/CDCHost.c
deleted file mode 100644 (file)
index c432258..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Main source file for the CDCHost demo. This file contains the main tasks of\r
- *  the demo and is responsible for the initial application hardware configuration.\r
- */\r
\r
-#include "CDCHost.h"\r
-\r
-#if 0\r
-/* NOTE: Here you can set up a standard stream using the created virtual serial port, so that the standard stream functions in\r
- *       <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).\r
- */\r
-       \r
-static int CDC_putchar(char c, FILE *stream)\r
-{        \r
-       Pipe_SelectPipe(CDC_DATAPIPE_OUT);\r
-       \r
-       if (Pipe_WaitUntilReady())\r
-         return -1;\r
-\r
-       Pipe_Write_Byte(c);\r
-       Pipe_ClearIN();\r
-       \r
-       return 0;\r
-}\r
-\r
-static int CDC_getchar(FILE *stream)\r
-{\r
-       int c;\r
-\r
-       Pipe_SelectPipe(CDC_DATAPIPE_IN);\r
-       \r
-       for (;;)\r
-       {\r
-               if (Pipe_WaitUntilReady())\r
-                 return -1;\r
-       \r
-               if (!(Pipe_BytesInPipe()))\r
-               {\r
-                       Pipe_ClearOUT();\r
-               }\r
-               else\r
-               {\r
-                       c = Pipe_Read_Byte();\r
-                       break;\r
-               }\r
-       }\r
-       \r
-       return c;\r
-}\r
-\r
-static FILE USBSerial = FDEV_SETUP_STREAM(CDC_putchar, CDC_getchar, _FDEV_SETUP_RW);\r
-#endif\r
-\r
-/** Main program entry point. This routine configures the hardware required by the application, then\r
- *  enters a loop to run the application tasks in sequence.\r
- */\r
-int main(void)\r
-{\r
-       SetupHardware();\r
-\r
-       puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
-       for (;;)\r
-       {\r
-               CDC_Host_Task();\r
-               USB_USBTask();\r
-       }\r
-}\r
-\r
-/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
-void SetupHardware(void)\r
-{\r
-       /* Disable watchdog if enabled by bootloader/fuses */\r
-       MCUSR &= ~(1 << WDRF);\r
-       wdt_disable();\r
-\r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
-       /* Hardware Initialization */\r
-       SerialStream_Init(9600, false);\r
-       LEDs_Init();\r
-       USB_Init();\r
-}\r
-\r
-/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and\r
- *  starts the library USB task to begin the enumeration and USB management process.\r
- */\r
-void EVENT_USB_Host_DeviceAttached(void)\r
-{\r
-       puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
-}\r
-\r
-/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and\r
- *  stops the library USB task management process.\r
- */\r
-void EVENT_USB_Host_DeviceUnattached(void)\r
-{\r
-       puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));\r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-}\r
-\r
-/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully\r
- *  enumerated by the host and is now ready to be used by the application.\r
- */\r
-void EVENT_USB_Host_DeviceEnumerationComplete(void)\r
-{\r
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
-}\r
-\r
-/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */\r
-void EVENT_USB_Host_HostError(const uint8_t ErrorCode)\r
-{\r
-       USB_ShutDown();\r
-\r
-       printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"\r
-                                " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
-\r
-       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-       for(;;);\r
-}\r
-\r
-/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while\r
- *  enumerating an attached USB device.\r
- */\r
-void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)\r
-{\r
-       printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"\r
-                                " -- Error Code %d\r\n"\r
-                                " -- Sub Error Code %d\r\n"\r
-                                " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);\r
-       \r
-       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-}\r
-\r
-/** Task to set the configuration of the attached device after it has been enumerated, and to read in\r
- *  data received from the attached CDC device and print it to the serial port.\r
- */\r
-void CDC_Host_Task(void)\r
-{\r
-       uint8_t ErrorCode;\r
-\r
-       switch (USB_HostState)\r
-       {\r
-               case HOST_STATE_Addressed:\r
-                       puts_P(PSTR("Getting Config Data.\r\n"));\r
-               \r
-                       /* Get and process the configuration descriptor data */\r
-                       if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)\r
-                       {\r
-                               if (ErrorCode == ControlError)\r
-                                 puts_P(PSTR(ESC_FG_RED "Control Error (Get Configuration).\r\n"));\r
-                               else\r
-                                 puts_P(PSTR(ESC_FG_RED "Invalid Device.\r\n"));\r
-\r
-                               printf_P(PSTR(" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
-                               \r
-                               /* Indicate error via status LEDs */\r
-                               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-\r
-                               /* Wait until USB device disconnected */\r
-                               USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
-                               break;\r
-                       }\r
-                       \r
-                       /* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */\r
-                       if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)\r
-                       {\r
-                               printf_P(PSTR(ESC_FG_RED "Control Error (Set Configuration).\r\n"\r
-                                                        " -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
-\r
-                               /* Indicate error via status LEDs */\r
-                               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
-\r
-                               /* Wait until USB device disconnected */\r
-                               USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
-                               break;\r
-                       }\r
-\r
-                       puts_P(PSTR("CDC Device Enumerated.\r\n"));\r
-\r
-                       USB_HostState = HOST_STATE_Configured;\r
-                       break;\r
-               case HOST_STATE_Configured:\r
-                       /* Select the data IN pipe */\r
-                       Pipe_SelectPipe(CDC_DATAPIPE_IN);\r
-                       Pipe_SetPipeToken(PIPE_TOKEN_IN);\r
-                       Pipe_Unfreeze();\r
-\r
-                       /* Check to see if a packet has been received */\r
-                       if (Pipe_IsINReceived())\r
-                       {\r
-                               /* Re-freeze IN pipe after the packet has been received */\r
-                               Pipe_Freeze();\r
-\r
-                               /* Check if data is in the pipe */\r
-                               if (Pipe_IsReadWriteAllowed())\r
-                               {\r
-                                       /* Get the length of the pipe data, and create a new buffer to hold it */\r
-                                       uint16_t BufferLength = Pipe_BytesInPipe();\r
-                                       uint8_t  Buffer[BufferLength];\r
-                                       \r
-                                       /* Read in the pipe data to the temporary buffer */\r
-                                       Pipe_Read_Stream_LE(Buffer, BufferLength);\r
-                                                                       \r
-                                       /* Print out the buffer contents to the USART */\r
-                                       for (uint16_t BufferByte = 0; BufferByte < BufferLength; BufferByte++)\r
-                                         putchar(Buffer[BufferByte]);\r
-                               }\r
-\r
-                               /* Clear the pipe after it is read, ready for the next packet */\r
-                               Pipe_ClearIN();\r
-                       }\r
-\r
-                       /* Re-freeze IN pipe after use */\r
-                       Pipe_Freeze();\r
-\r
-                       /* Select and unfreeze the notification pipe */\r
-                       Pipe_SelectPipe(CDC_NOTIFICATIONPIPE);\r
-                       Pipe_Unfreeze();\r
-                       \r
-                       /* Check if a packet has been received */\r
-                       if (Pipe_IsINReceived())\r
-                       {\r
-                               /* Discard the unused event notification */\r
-                               Pipe_ClearIN();\r
-                       }\r
-                       \r
-                       /* Freeze notification IN pipe after use */\r
-                       Pipe_Freeze();\r
-                                               \r
-                       break;\r
-       }\r
-}\r
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/CDCHost.h b/Demos/Host/LowLevel/VirtualSerialHost/CDCHost.h
deleted file mode 100644 (file)
index b6d3a3c..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*\r
-             LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
-              \r
-  dean [at] fourwalledcubicle [dot] com\r
-      www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
-  software without specific, written prior permission.\r
-\r
-  The author disclaim all warranties with regard to this\r
-  software, including all implied warranties of merchantability\r
-  and fitness.  In no event shall the author be liable for any\r
-  special, indirect or consequential damages or any damages\r
-  whatsoever resulting from loss of use, data or profits, whether\r
-  in an action of contract, negligence or other tortious action,\r
-  arising out of or in connection with the use or performance of\r
-  this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- *  Header file for CDCHost.c.\r
- */\r
-\r
-#ifndef _CDC_HOST_H_\r
-#define _CDC_HOST_H_\r
-\r
-       /* Includes: */\r
-               #include <avr/io.h>\r
-               #include <avr/wdt.h>\r
-               #include <avr/pgmspace.h>\r
-               #include <avr/power.h>\r
-               #include <stdio.h>\r
-\r
-               #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
-               #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/Peripheral/SerialStream.h>\r
-               #include <LUFA/Drivers/Board/LEDs.h>\r
-               \r
-               #include "ConfigDescriptor.h"\r
-               \r
-       /* Macros: */\r
-               /** Pipe number for the CDC data IN pipe */\r
-               #define CDC_DATAPIPE_IN           1\r
-\r
-               /** Pipe number for the CDC data OUT pipe */\r
-               #define CDC_DATAPIPE_OUT          2\r
-\r
-               /** Pipe number for the CDC notification pipe */\r
-               #define CDC_NOTIFICATIONPIPE      3\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
-\r
-               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
-\r
-               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
-                               \r
-       /* Function Prototypes: */\r
-               void SetupHardware(void);\r
-               void CDC_Host_Task(void);\r
-       \r
-               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);\r
-               void EVENT_USB_Host_DeviceAttached(void);\r
-               void EVENT_USB_Host_DeviceUnattached(void);\r
-               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);\r
-               void EVENT_USB_Host_DeviceEnumerationComplete(void);\r
-               \r
-#endif\r
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/CDCHost.txt b/Demos/Host/LowLevel/VirtualSerialHost/CDCHost.txt
deleted file mode 100644 (file)
index 6599992..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/** \file\r
- *\r
- *  This file contains special DoxyGen information for the generation of the main page and other special\r
- *  documentation pages. It is not a project source file.\r
- */\r
\r
-/** \mainpage CDC Host Demo\r
- *\r
- *  \section SSec_Compat Demo Compatibility:\r
- *\r
- *  The following list indicates what microcontrollers are compatible with this demo.\r
- *\r
- *  - Series 7 USB AVRs\r
- *\r
- *  \section SSec_Info USB Information:\r
- *\r
- *  The following table gives a rundown of the USB utilization of this demo.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td><b>USB Mode:</b></td>\r
- *    <td>Host</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>USB Class:</b></td>\r
- *    <td>Communications Device Class (CDC)</td>\r
- *   </tr>\r
- *   <tr> \r
- *    <td><b>USB Subclass:</b></td>\r
- *    <td>Abstract Control Model (ACM)</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Relevant Standards:</b></td>\r
- *    <td>USBIF CDC Class Standard</td>\r
- *   </tr>\r
- *   <tr>\r
- *    <td><b>Usable Speeds:</b></td>\r
- *    <td>Full Speed Mode</td>\r
- *   </tr>\r
- *  </table>\r
- *\r
- *  \section SSec_Description Project Description: \r
- *\r
- *  CDC host demonstration application. This gives a simple reference application\r
- *  for implementing a USB CDC host, for CDC devices using the standard ACM profile.\r
- *  \r
- *  This demo prints out received CDC data through the serial port.\r
- *  \r
- *  Not that this demo is only compatible with devices which report the correct CDC\r
- *  and ACM class, subclass and protocol values. Most USB-Serial cables have vendor\r
- *  specific features, thus use vendor-specific class/subclass/protocol codes to force\r
- *  the user to use specialized drivers. This demo is not compatible with such devices.\r
- *\r
- *  \section SSec_Options Project Options\r
- *\r
- *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
- *\r
- *  <table>\r
- *   <tr>\r
- *    <td>\r
- *     None\r
- *    </td>\r
- *   </tr>\r
- *  </table>\r
- */\r
index 3f2e0b9..097bd05 100644 (file)
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded \r
 # by quotes) that should identify the project.\r
 \r
-PROJECT_NAME           = "LUFA Library - CDC Host Demo"\r
+PROJECT_NAME           = "LUFA Library - Virtual Serial Host Demo"\r
 \r
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. \r
 # This could be handy for archiving the generated documentation or \r
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
new file mode 100644 (file)
index 0000000..c432258
--- /dev/null
@@ -0,0 +1,268 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Main source file for the CDCHost demo. This file contains the main tasks of\r
+ *  the demo and is responsible for the initial application hardware configuration.\r
+ */\r
\r
+#include "CDCHost.h"\r
+\r
+#if 0\r
+/* NOTE: Here you can set up a standard stream using the created virtual serial port, so that the standard stream functions in\r
+ *       <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).\r
+ */\r
+       \r
+static int CDC_putchar(char c, FILE *stream)\r
+{        \r
+       Pipe_SelectPipe(CDC_DATAPIPE_OUT);\r
+       \r
+       if (Pipe_WaitUntilReady())\r
+         return -1;\r
+\r
+       Pipe_Write_Byte(c);\r
+       Pipe_ClearIN();\r
+       \r
+       return 0;\r
+}\r
+\r
+static int CDC_getchar(FILE *stream)\r
+{\r
+       int c;\r
+\r
+       Pipe_SelectPipe(CDC_DATAPIPE_IN);\r
+       \r
+       for (;;)\r
+       {\r
+               if (Pipe_WaitUntilReady())\r
+                 return -1;\r
+       \r
+               if (!(Pipe_BytesInPipe()))\r
+               {\r
+                       Pipe_ClearOUT();\r
+               }\r
+               else\r
+               {\r
+                       c = Pipe_Read_Byte();\r
+                       break;\r
+               }\r
+       }\r
+       \r
+       return c;\r
+}\r
+\r
+static FILE USBSerial = FDEV_SETUP_STREAM(CDC_putchar, CDC_getchar, _FDEV_SETUP_RW);\r
+#endif\r
+\r
+/** Main program entry point. This routine configures the hardware required by the application, then\r
+ *  enters a loop to run the application tasks in sequence.\r
+ */\r
+int main(void)\r
+{\r
+       SetupHardware();\r
+\r
+       puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));\r
+\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+       for (;;)\r
+       {\r
+               CDC_Host_Task();\r
+               USB_USBTask();\r
+       }\r
+}\r
+\r
+/** Configures the board hardware and chip peripherals for the demo's functionality. */\r
+void SetupHardware(void)\r
+{\r
+       /* Disable watchdog if enabled by bootloader/fuses */\r
+       MCUSR &= ~(1 << WDRF);\r
+       wdt_disable();\r
+\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
+\r
+       /* Hardware Initialization */\r
+       SerialStream_Init(9600, false);\r
+       LEDs_Init();\r
+       USB_Init();\r
+}\r
+\r
+/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and\r
+ *  starts the library USB task to begin the enumeration and USB management process.\r
+ */\r
+void EVENT_USB_Host_DeviceAttached(void)\r
+{\r
+       puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and\r
+ *  stops the library USB task management process.\r
+ */\r
+void EVENT_USB_Host_DeviceUnattached(void)\r
+{\r
+       puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));\r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully\r
+ *  enumerated by the host and is now ready to be used by the application.\r
+ */\r
+void EVENT_USB_Host_DeviceEnumerationComplete(void)\r
+{\r
+       LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+}\r
+\r
+/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */\r
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)\r
+{\r
+       USB_ShutDown();\r
+\r
+       printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"\r
+                                " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+\r
+       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       for(;;);\r
+}\r
+\r
+/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while\r
+ *  enumerating an attached USB device.\r
+ */\r
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)\r
+{\r
+       printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"\r
+                                " -- Error Code %d\r\n"\r
+                                " -- Sub Error Code %d\r\n"\r
+                                " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);\r
+       \r
+       LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+}\r
+\r
+/** Task to set the configuration of the attached device after it has been enumerated, and to read in\r
+ *  data received from the attached CDC device and print it to the serial port.\r
+ */\r
+void CDC_Host_Task(void)\r
+{\r
+       uint8_t ErrorCode;\r
+\r
+       switch (USB_HostState)\r
+       {\r
+               case HOST_STATE_Addressed:\r
+                       puts_P(PSTR("Getting Config Data.\r\n"));\r
+               \r
+                       /* Get and process the configuration descriptor data */\r
+                       if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)\r
+                       {\r
+                               if (ErrorCode == ControlError)\r
+                                 puts_P(PSTR(ESC_FG_RED "Control Error (Get Configuration).\r\n"));\r
+                               else\r
+                                 puts_P(PSTR(ESC_FG_RED "Invalid Device.\r\n"));\r
+\r
+                               printf_P(PSTR(" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+                               \r
+                               /* Indicate error via status LEDs */\r
+                               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+\r
+                               /* Wait until USB device disconnected */\r
+                               USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
+                               break;\r
+                       }\r
+                       \r
+                       /* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */\r
+                       if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)\r
+                       {\r
+                               printf_P(PSTR(ESC_FG_RED "Control Error (Set Configuration).\r\n"\r
+                                                        " -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+\r
+                               /* Indicate error via status LEDs */\r
+                               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+\r
+                               /* Wait until USB device disconnected */\r
+                               USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
+                               break;\r
+                       }\r
+\r
+                       puts_P(PSTR("CDC Device Enumerated.\r\n"));\r
+\r
+                       USB_HostState = HOST_STATE_Configured;\r
+                       break;\r
+               case HOST_STATE_Configured:\r
+                       /* Select the data IN pipe */\r
+                       Pipe_SelectPipe(CDC_DATAPIPE_IN);\r
+                       Pipe_SetPipeToken(PIPE_TOKEN_IN);\r
+                       Pipe_Unfreeze();\r
+\r
+                       /* Check to see if a packet has been received */\r
+                       if (Pipe_IsINReceived())\r
+                       {\r
+                               /* Re-freeze IN pipe after the packet has been received */\r
+                               Pipe_Freeze();\r
+\r
+                               /* Check if data is in the pipe */\r
+                               if (Pipe_IsReadWriteAllowed())\r
+                               {\r
+                                       /* Get the length of the pipe data, and create a new buffer to hold it */\r
+                                       uint16_t BufferLength = Pipe_BytesInPipe();\r
+                                       uint8_t  Buffer[BufferLength];\r
+                                       \r
+                                       /* Read in the pipe data to the temporary buffer */\r
+                                       Pipe_Read_Stream_LE(Buffer, BufferLength);\r
+                                                                       \r
+                                       /* Print out the buffer contents to the USART */\r
+                                       for (uint16_t BufferByte = 0; BufferByte < BufferLength; BufferByte++)\r
+                                         putchar(Buffer[BufferByte]);\r
+                               }\r
+\r
+                               /* Clear the pipe after it is read, ready for the next packet */\r
+                               Pipe_ClearIN();\r
+                       }\r
+\r
+                       /* Re-freeze IN pipe after use */\r
+                       Pipe_Freeze();\r
+\r
+                       /* Select and unfreeze the notification pipe */\r
+                       Pipe_SelectPipe(CDC_NOTIFICATIONPIPE);\r
+                       Pipe_Unfreeze();\r
+                       \r
+                       /* Check if a packet has been received */\r
+                       if (Pipe_IsINReceived())\r
+                       {\r
+                               /* Discard the unused event notification */\r
+                               Pipe_ClearIN();\r
+                       }\r
+                       \r
+                       /* Freeze notification IN pipe after use */\r
+                       Pipe_Freeze();\r
+                                               \r
+                       break;\r
+       }\r
+}\r
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h
new file mode 100644 (file)
index 0000000..b6d3a3c
--- /dev/null
@@ -0,0 +1,86 @@
+/*\r
+             LUFA Library\r
+     Copyright (C) Dean Camera, 2009.\r
+              \r
+  dean [at] fourwalledcubicle [dot] com\r
+      www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, and distribute this software\r
+  and its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of the author not be used in\r
+  advertising or publicity pertaining to distribution of the\r
+  software without specific, written prior permission.\r
+\r
+  The author disclaim all warranties with regard to this\r
+  software, including all implied warranties of merchantability\r
+  and fitness.  In no event shall the author be liable for any\r
+  special, indirect or consequential damages or any damages\r
+  whatsoever resulting from loss of use, data or profits, whether\r
+  in an action of contract, negligence or other tortious action,\r
+  arising out of or in connection with the use or performance of\r
+  this software.\r
+*/\r
+\r
+/** \file\r
+ *\r
+ *  Header file for CDCHost.c.\r
+ */\r
+\r
+#ifndef _CDC_HOST_H_\r
+#define _CDC_HOST_H_\r
+\r
+       /* Includes: */\r
+               #include <avr/io.h>\r
+               #include <avr/wdt.h>\r
+               #include <avr/pgmspace.h>\r
+               #include <avr/power.h>\r
+               #include <stdio.h>\r
+\r
+               #include <LUFA/Version.h>\r
+               #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
+               #include <LUFA/Drivers/USB/USB.h>\r
+               #include <LUFA/Drivers/Peripheral/SerialStream.h>\r
+               #include <LUFA/Drivers/Board/LEDs.h>\r
+               \r
+               #include "ConfigDescriptor.h"\r
+               \r
+       /* Macros: */\r
+               /** Pipe number for the CDC data IN pipe */\r
+               #define CDC_DATAPIPE_IN           1\r
+\r
+               /** Pipe number for the CDC data OUT pipe */\r
+               #define CDC_DATAPIPE_OUT          2\r
+\r
+               /** Pipe number for the CDC notification pipe */\r
+               #define CDC_NOTIFICATIONPIPE      3\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+\r
+               /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+\r
+               /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+                               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
+               void CDC_Host_Task(void);\r
+       \r
+               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);\r
+               void EVENT_USB_Host_DeviceAttached(void);\r
+               void EVENT_USB_Host_DeviceUnattached(void);\r
+               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);\r
+               void EVENT_USB_Host_DeviceEnumerationComplete(void);\r
+               \r
+#endif\r
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.txt b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.txt
new file mode 100644 (file)
index 0000000..6599992
--- /dev/null
@@ -0,0 +1,65 @@
+/** \file\r
+ *\r
+ *  This file contains special DoxyGen information for the generation of the main page and other special\r
+ *  documentation pages. It is not a project source file.\r
+ */\r
\r
+/** \mainpage CDC Host Demo\r
+ *\r
+ *  \section SSec_Compat Demo Compatibility:\r
+ *\r
+ *  The following list indicates what microcontrollers are compatible with this demo.\r
+ *\r
+ *  - Series 7 USB AVRs\r
+ *\r
+ *  \section SSec_Info USB Information:\r
+ *\r
+ *  The following table gives a rundown of the USB utilization of this demo.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td><b>USB Mode:</b></td>\r
+ *    <td>Host</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>USB Class:</b></td>\r
+ *    <td>Communications Device Class (CDC)</td>\r
+ *   </tr>\r
+ *   <tr> \r
+ *    <td><b>USB Subclass:</b></td>\r
+ *    <td>Abstract Control Model (ACM)</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Relevant Standards:</b></td>\r
+ *    <td>USBIF CDC Class Standard</td>\r
+ *   </tr>\r
+ *   <tr>\r
+ *    <td><b>Usable Speeds:</b></td>\r
+ *    <td>Full Speed Mode</td>\r
+ *   </tr>\r
+ *  </table>\r
+ *\r
+ *  \section SSec_Description Project Description: \r
+ *\r
+ *  CDC host demonstration application. This gives a simple reference application\r
+ *  for implementing a USB CDC host, for CDC devices using the standard ACM profile.\r
+ *  \r
+ *  This demo prints out received CDC data through the serial port.\r
+ *  \r
+ *  Not that this demo is only compatible with devices which report the correct CDC\r
+ *  and ACM class, subclass and protocol values. Most USB-Serial cables have vendor\r
+ *  specific features, thus use vendor-specific class/subclass/protocol codes to force\r
+ *  the user to use specialized drivers. This demo is not compatible with such devices.\r
+ *\r
+ *  \section SSec_Options Project Options\r
+ *\r
+ *  The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.\r
+ *\r
+ *  <table>\r
+ *   <tr>\r
+ *    <td>\r
+ *     None\r
+ *    </td>\r
+ *   </tr>\r
+ *  </table>\r
+ */\r
index 6c9c7c8..168b1b4 100644 (file)
@@ -102,7 +102,7 @@ FORMAT = ihex
 \r
 \r
 # Target file name (without extension).\r
-TARGET = CDCHost\r
+TARGET = VirtualSerialHost\r
 \r
 \r
 # Object files directory\r
index a69b25b..e812856 100644 (file)
@@ -14,9 +14,6 @@
 # code.
 
 all:
-       make -C CDCHost clean
-       make -C CDCHost all
-
        make -C GenericHIDHost clean
        make -C GenericHIDHost all
 
@@ -47,8 +44,10 @@ all:
        make -C RNDISEthernetHost clean
        make -C RNDISEthernetHost all
 
+       make -C VirtualSerialHost clean
+       make -C VirtualSerialHost all
+
 %:
-       make -C CDCHost $@
        make -C GenericHIDHost $@
        make -C JoystickHostWithParser $@
        make -C KeyboardHost $@
@@ -60,3 +59,4 @@ all:
        make -C PrinterHost $@
        make -C StillImageHost $@
        make -C RNDISEthernetHost $@
+       make -C VirtualSerialHost $@
index 4fc2d05..ad42f6b 100644 (file)
@@ -1 +1 @@
-<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="CDCMouse"><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.c"></File><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.h"></File><File path="Demos\Device\ClassDriver\CDCMouse\CDCMouse.txt"></File><File path="Demos\Device\ClassDriver\CDCMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDCMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDCMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDCMouse\LUFA CDCMouse.inf"></File><File path="Demos\Device\ClassDriver\CDCMouse\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="CDCHost"><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.c"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.h"></File><File path="Demos\Host\ClassDriver\CDCHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\CDCHost\makefile"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.txt"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="CDCHost"><File path="Demos\Host\LowLevel\CDCHost\CDCHost.c"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.h"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.txt"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\CDCHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\CDCHost\makefile"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><Folder name="Template"><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.c"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.c"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Common\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISConstants.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Printer.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\XPLAIN\LEDs.h"></File><File path="LUFA\Drivers\Board\XPLAIN\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\XPLAIN\Dataflash.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\EVK527\LEDs.h"></File><File path="LUFA\Drivers\Board\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\EVK527\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\EVK527\Dataflash.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVRU4U6U7"><File path="LUFA\Drivers\Peripheral\AVRU4U6U7\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File><File path="LUFA\ManPages\WhyUseLUFA.txt"></File><File path="LUFA\ManPages\LUFAvsAtmelStack.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Projects"><Folder name="AVRISP"><Folder name="Lib"><File path="Projects\AVRISP\Lib\V2Protocol.c"></File><File path="Projects\AVRISP\Lib\V2Protocol.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.h"></File><File path="Projects\AVRISP\Lib\ISPProtocol.c"></File><File path="Projects\AVRISP\Lib\ISPProtocol.h"></File><File path="Projects\AVRISP\Lib\ISPTarget.c"></File><File path="Projects\AVRISP\Lib\ISPTarget.h"></File><File path="Projects\AVRISP\Lib\PDIProtocol.c"></File><File path="Projects\AVRISP\Lib\PDIProtocol.h"></File><File path="Projects\AVRISP\Lib\PDITarget.c"></File><File path="Projects\AVRISP\Lib\PDITarget.h"></File></Folder><File path="Projects\AVRISP\AVRISP.c"></File><File path="Projects\AVRISP\AVRISP.h"></File><File path="Projects\AVRISP\AVRISP.txt"></File><File path="Projects\AVRISP\Descriptors.c"></File><File path="Projects\AVRISP\Descriptors.h"></File><File path="Projects\AVRISP\Doxygen.conf"></File><File path="Projects\AVRISP\makefile"></File></Folder><Folder name="Benito"><Folder name="Board"><File path="Projects\Benito\Board\LEDs.h"></File></Folder><Folder name="Lib"><File path="Projects\Benito\Lib\RingBuff.c"></File><File path="Projects\Benito\Lib\RingBuff.h"></File></Folder><File path="Projects\Benito\Benito.c"></File><File path="Projects\Benito\Benito.h"></File><File path="Projects\Benito\Descriptors.c"></File><File path="Projects\Benito\Descriptors.h"></File><File path="Projects\Benito\Doxygen.conf"></File><File path="Projects\Benito\makefile"></File><File path="Projects\Benito\Benito.txt"></File><File path="Projects\Benito\Benito Programmer.inf"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Projects\USBtoSerial\Lib\RingBuff.c"></File><File path="Projects\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Projects\USBtoSerial\Descriptors.c"></File><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\RingBuff.c"></File><File path="Projects\XPLAINBridge\Lib\RingBuff.h"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\Descriptors.c"></File><File path="Projects\XPLAINBridge\Descriptors.h"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><Folder name="Incomplete"><Folder name="MIDI"><Folder name="JavaHost"><File path="Bootloaders\Incomplete\MIDI\JavaHost\BIN2BOOT.java"></File><File path="Bootloaders\Incomplete\MIDI\JavaHost\MIDIMessageReceiver.java"></File></Folder><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.c"></File><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.h"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.c"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.h"></File><File path="Bootloaders\Incomplete\MIDI\Doxygen.conf"></File><File path="Bootloaders\Incomplete\MIDI\makefile"></File><File path="Bootloaders\Incomplete\MIDI\MIDI.c"></File></Folder></Folder><File path="Bootloaders\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
+<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISConstants.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><Folder name="Template"><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\LowLevel\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.c"></File><File path="LUFA\Drivers\USB\Class\Host\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDIS.c"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Common\Printer.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISConstants.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File><File path="LUFA\Drivers\USB\Class\Printer.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\BUMBLEB\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\XPLAIN\LEDs.h"></File><File path="LUFA\Drivers\Board\XPLAIN\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\XPLAIN\Dataflash.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\EVK527\LEDs.h"></File><File path="LUFA\Drivers\Board\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\EVK527\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\EVK527\Dataflash.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVRU4U6U7"><File path="LUFA\Drivers\Peripheral\AVRU4U6U7\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File><File path="LUFA\ManPages\WhyUseLUFA.txt"></File><File path="LUFA\ManPages\LUFAvsAtmelStack.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Projects"><Folder name="AVRISP"><Folder name="Lib"><File path="Projects\AVRISP\Lib\V2Protocol.c"></File><File path="Projects\AVRISP\Lib\V2Protocol.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP\Lib\V2ProtocolParams.h"></File><File path="Projects\AVRISP\Lib\ISPProtocol.c"></File><File path="Projects\AVRISP\Lib\ISPProtocol.h"></File><File path="Projects\AVRISP\Lib\ISPTarget.c"></File><File path="Projects\AVRISP\Lib\ISPTarget.h"></File><File path="Projects\AVRISP\Lib\PDIProtocol.c"></File><File path="Projects\AVRISP\Lib\PDIProtocol.h"></File><File path="Projects\AVRISP\Lib\PDITarget.c"></File><File path="Projects\AVRISP\Lib\PDITarget.h"></File></Folder><File path="Projects\AVRISP\AVRISP.c"></File><File path="Projects\AVRISP\AVRISP.h"></File><File path="Projects\AVRISP\AVRISP.txt"></File><File path="Projects\AVRISP\Descriptors.c"></File><File path="Projects\AVRISP\Descriptors.h"></File><File path="Projects\AVRISP\Doxygen.conf"></File><File path="Projects\AVRISP\makefile"></File></Folder><Folder name="Benito"><Folder name="Board"><File path="Projects\Benito\Board\LEDs.h"></File></Folder><Folder name="Lib"><File path="Projects\Benito\Lib\RingBuff.c"></File><File path="Projects\Benito\Lib\RingBuff.h"></File></Folder><File path="Projects\Benito\Benito.c"></File><File path="Projects\Benito\Benito.h"></File><File path="Projects\Benito\Descriptors.c"></File><File path="Projects\Benito\Descriptors.h"></File><File path="Projects\Benito\Doxygen.conf"></File><File path="Projects\Benito\makefile"></File><File path="Projects\Benito\Benito.txt"></File><File path="Projects\Benito\Benito Programmer.inf"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Projects\USBtoSerial\Lib\RingBuff.c"></File><File path="Projects\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Projects\USBtoSerial\Descriptors.c"></File><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\RingBuff.c"></File><File path="Projects\XPLAINBridge\Lib\RingBuff.h"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\Descriptors.c"></File><File path="Projects\XPLAINBridge\Descriptors.h"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><Folder name="Incomplete"><Folder name="MIDI"><Folder name="JavaHost"><File path="Bootloaders\Incomplete\MIDI\JavaHost\BIN2BOOT.java"></File><File path="Bootloaders\Incomplete\MIDI\JavaHost\MIDIMessageReceiver.java"></File></Folder><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.c"></File><File path="Bootloaders\Incomplete\MIDI\BootloaderMIDI.h"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.c"></File><File path="Bootloaders\Incomplete\MIDI\Descriptors.h"></File><File path="Bootloaders\Incomplete\MIDI\Doxygen.conf"></File><File path="Bootloaders\Incomplete\MIDI\makefile"></File><File path="Bootloaders\Incomplete\MIDI\MIDI.c"></File></Folder></Folder><File path="Bootloaders\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file