mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
console: minor fixes
- wrong comment - duplicated setvbuf
This commit is contained in:
@@ -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' */
|
/* Move the caret to the beginning of the next line on '\n' */
|
||||||
esp_vfs_dev_cdcacm_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF);
|
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(stdout), F_SETFL, 0);
|
||||||
fcntl(fileno(stdin), 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;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable buffering on stdin */
|
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
|
||||||
|
|
||||||
/* Minicom, screen, idf_monitor send CR when ENTER key is pressed */
|
/* 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);
|
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' */
|
/* 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);
|
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(stdout), F_SETFL, 0);
|
||||||
fcntl(fileno(stdin), F_SETFL, 0);
|
fcntl(fileno(stdin), F_SETFL, 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user