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);