From 6f14f5218d3d22d250ad6d12d048687805455d47 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 17 May 2022 18:55:39 +0200 Subject: [PATCH] console: minor fixes - wrong comment - duplicated setvbuf --- components/console/esp_console_repl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/console/esp_console_repl.c b/components/console/esp_console_repl.c index a79208d95b..7aeaa8926e 100644 --- a/components/console/esp_console_repl.c +++ b/components/console/esp_console_repl.c @@ -81,7 +81,7 @@ esp_err_t esp_console_new_repl_usb_cdc(const esp_console_dev_usb_cdc_config_t *d /* Move the caret to the beginning of the next line on '\n' */ esp_vfs_dev_cdcacm_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF); - /* Enable non-blocking mode on stdin and stdout */ + /* Enable blocking mode on stdin and stdout */ fcntl(fileno(stdout), F_SETFL, 0); fcntl(fileno(stdin), F_SETFL, 0); @@ -142,15 +142,12 @@ esp_err_t esp_console_new_repl_usb_serial_jtag(const esp_console_dev_usb_serial_ goto _exit; } - /* Disable buffering on stdin */ - setvbuf(stdin, NULL, _IONBF, 0); - /* Minicom, screen, idf_monitor send CR when ENTER key is pressed */ esp_vfs_dev_usb_serial_jtag_set_rx_line_endings(ESP_LINE_ENDINGS_CR); /* Move the caret to the beginning of the next line on '\n' */ esp_vfs_dev_usb_serial_jtag_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF); - /* Enable non-blocking mode on stdin and stdout */ + /* Enable blocking mode on stdin and stdout */ fcntl(fileno(stdout), F_SETFL, 0); fcntl(fileno(stdin), F_SETFL, 0);