refactor(uart_vfs): Move uart implementation of vfs to esp_driver_uart

Deprecated esp_vfs_dev_uart_xxx APIs
vfs_uart test case moved to esp_driver_uart test_apps
Astyle fixed for uart_vfs
This commit is contained in:
Song Ruo Jing
2023-11-24 14:56:08 +08:00
parent ef281dff5a
commit bc09031496
47 changed files with 803 additions and 514 deletions

View File

@@ -9,7 +9,7 @@
#include "protocol_examples_common.h"
#include "esp_err.h"
#include "esp_vfs_dev.h"
#include "driver/uart_vfs.h"
#include "driver/uart.h"
#include "sdkconfig.h"
@@ -25,10 +25,10 @@ esp_err_t example_configure_stdin_stdout(void)
ESP_ERROR_CHECK( uart_driver_install( (uart_port_t)CONFIG_ESP_CONSOLE_UART_NUM,
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_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
uart_vfs_dev_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
uart_vfs_dev_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_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
uart_vfs_dev_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
configured = true;
return ESP_OK;
}