From ad67a23097b09be63ac5afda44e3946479af96be Mon Sep 17 00:00:00 2001 From: houwenxiang Date: Tue, 9 Jun 2020 17:00:47 +0800 Subject: [PATCH] vfs: support vfs uart set line endings with specified uart number * Original commit: espressif/esp-idf@8e00522cd7a03d8f97036d0069b7d7556ddf49f0 --- .../common_components/protocol_examples_common/stdin_out.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common_components/protocol_examples_common/stdin_out.c b/examples/common_components/protocol_examples_common/stdin_out.c index 8f95b8ac7..b57e0e715 100644 --- a/examples/common_components/protocol_examples_common/stdin_out.c +++ b/examples/common_components/protocol_examples_common/stdin_out.c @@ -22,8 +22,8 @@ esp_err_t example_configure_stdin_stdout(void) 256, 0, 0, NULL, 0) ); /* Tell VFS to use UART driver */ esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM); - esp_vfs_dev_uart_set_rx_line_endings(ESP_LINE_ENDINGS_CR); + esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR); /* Move the caret to the beginning of the next line on '\n' */ - esp_vfs_dev_uart_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF); + esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF); return ESP_OK; }