Removed the stream example code from the Low Level VirtualSerial demos, as they were...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 28 Jan 2010 14:12:26 +0000 (14:12 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 28 Jan 2010 14:12:26 +0000 (14:12 +0000)
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
LUFA/ManPages/ChangeLog.txt

index c70b534..bad8757 100644 (file)
@@ -49,59 +49,6 @@ CDC_Line_Coding_t LineEncoding = { .BaudRateBPS = 0,
                                    .ParityType  = Parity_None,\r
                                    .DataBits    = 8            };\r
 \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
 /** 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
index 4c521a4..588198b 100644 (file)
  \r
 #include "VirtualSerialHost.h"\r
 \r
  \r
 #include "VirtualSerialHost.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
 /** 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
index f124fcc..79010bd 100644 (file)
@@ -32,6 +32,7 @@
   *  - Inlined currently unused (but standardized) maintenance functions in the Device and Host Class drivers to save space\r
   *  - The XPLAINBridge project now selects between a USB to Serial bridge and a PDI programmer on startup, reading the JTAG port's\r
   *    TDI pin to determine which mode to use\r
   *  - Inlined currently unused (but standardized) maintenance functions in the Device and Host Class drivers to save space\r
   *  - The XPLAINBridge project now selects between a USB to Serial bridge and a PDI programmer on startup, reading the JTAG port's\r
   *    TDI pin to determine which mode to use\r
+  *  - Removed the stream example code from the Low Level VirtualSerial demos, as they were buggy and only served to add clutter\r
   *\r
   *  <b>Fixed:</b>\r
   *  - Fixed AVRISP project not able to enter programming mode when ISP protocol is used\r
   *\r
   *  <b>Fixed:</b>\r
   *  - Fixed AVRISP project not able to enter programming mode when ISP protocol is used\r