Mark build test makefiles as being incompatible with parallel make builds, as they...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / XMEGA / Serial_XMEGA.c
index 2f31805..8ec0390 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
+#include "../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_SERIAL_C
 #include "../Serial.h"
 
@@ -92,3 +95,28 @@ void Serial_SendData(USART_t* const USART,
          Serial_SendByte(USART, *(Buffer++));
 }
 
+void Serial_CreateStream(FILE* Stream)
+{
+       if (!(Stream))
+       {
+               Stream = &USARTSerialStream;
+               stdin  = Stream;
+               stdout = Stream;
+       }
+
+       *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
+}
+
+void Serial_CreateBlockingStream(FILE* Stream)
+{
+       if (!(Stream))
+       {
+               Stream = &USARTSerialStream;
+               stdin  = Stream;
+               stdout = Stream;
+       }
+
+       *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
+}
+
+#endif