From feea2e5d5f6cb24c0e2d49ed9278d52f8280ddce Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 27 Oct 2015 13:36:51 +1100 Subject: [PATCH] serial_echo example: Remove setbuf() call as stdout no longer buffered by default --- examples/serial_echo/serial_echo.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/examples/serial_echo/serial_echo.c b/examples/serial_echo/serial_echo.c index 5be9ff4..5ed119e 100644 --- a/examples/serial_echo/serial_echo.c +++ b/examples/serial_echo/serial_echo.c @@ -14,14 +14,6 @@ void user_init(void) printf("SDK version:%s\n", sdk_system_get_sdk_version()); printf("Going into echo mode...\n"); - /* By default stdout is line-buffered, so you only see output - after a newline is sent. This is helpful in a multithreaded - environment so output doesn't get chopped up within a line. - - Here we want to see the echo immediately, so disable buffering. - */ - setbuf(stdout, NULL); - while(1) { int c = getchar(); if(c != EOF)