From b8dfdc293b5766818ee8960bf7dcf34abc32d289 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 9 Oct 2011 15:55:02 +1100 Subject: [PATCH] desktop: flush all serial writes --- libraries/Desktop/support/FastSerial.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/Desktop/support/FastSerial.cpp b/libraries/Desktop/support/FastSerial.cpp index 2411c9c8d5..8b1850fe37 100644 --- a/libraries/Desktop/support/FastSerial.cpp +++ b/libraries/Desktop/support/FastSerial.cpp @@ -33,6 +33,7 @@ #include "FastSerial.h" #include "WProgram.h" #include +#include #if defined(UDR3) # define FS_MAX_PORTS 4 @@ -68,10 +69,12 @@ FastSerial::FastSerial(const uint8_t portNumber, volatile uint8_t *ubrrh, volati void FastSerial::begin(long baud) { + printf("Starting serial port\n"); } void FastSerial::begin(long baud, unsigned int rxSpace, unsigned int txSpace) { + begin(baud); } void FastSerial::end() @@ -107,6 +110,7 @@ void FastSerial::flush(void) void FastSerial::write(uint8_t c) { fwrite(&c, 1, 1, stdout); + fflush(stdout); } // Buffer management ///////////////////////////////////////////////////////////