Renamed the PRNT_Host_SendString(), CDC_Host_SendString() and CDC_Device_SendString...
[pub/lufa.git] / Demos / Host / LowLevel / VirtualSerialHost / VirtualSerialHost.c
index f5fcdb1..bd793ca 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2010.
+     Copyright (C) Dean Camera, 2011.
 
   dean [at] fourwalledcubicle [dot] com
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
 */
 
 /*
-  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -66,9 +66,12 @@ void SetupHardware(void)
        clock_prescale_set(clock_div_1);
 
        /* Hardware Initialization */
        clock_prescale_set(clock_div_1);
 
        /* Hardware Initialization */
-       SerialStream_Init(9600, false);
+       Serial_Init(9600, false);
        LEDs_Init();
        USB_Init();
        LEDs_Init();
        USB_Init();
+
+       /* Create a stdio stream for the serial port for stdin and stdout */
+       Serial_CreateStream(NULL);
 }
 
 /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
 }
 
 /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
@@ -190,7 +193,7 @@ void CDC_Host_Task(void)
                                        uint8_t  Buffer[BufferLength];
 
                                        /* Read in the pipe data to the temporary buffer */
                                        uint8_t  Buffer[BufferLength];
 
                                        /* Read in the pipe data to the temporary buffer */
-                                       Pipe_Read_Stream_LE(Buffer, BufferLength);
+                                       Pipe_Read_Stream_LE(Buffer, BufferLength, NULL);
 
                                        /* Print out the buffer contents to the USART */
                                        for (uint16_t BufferByte = 0; BufferByte < BufferLength; BufferByte++)
 
                                        /* Print out the buffer contents to the USART */
                                        for (uint16_t BufferByte = 0; BufferByte < BufferLength; BufferByte++)