|
8 | 8 | #define __linux__
|
9 | 9 |
|
10 | 10 | #include "driver/uart.h"
|
| 11 | +#include "driver/uart_vfs.h" |
11 | 12 | #include "driver/usb_serial_jtag.h"
|
| 13 | +#include "driver/usb_serial_jtag_vfs.h" |
12 | 14 | #include "esp_err.h"
|
13 | 15 | #include "esp_system.h"
|
| 16 | + |
14 | 17 | #include "esp_vfs_dev.h"
|
15 | 18 | #include "esp_vfs_usb_serial_jtag.h"
|
16 | 19 |
|
@@ -135,11 +138,11 @@ class Cli : private cli::CliSession {
|
135 | 138 | ESP_ERROR_CHECK(uart_driver_install(port, 256, 0, 0, NULL, 0));
|
136 | 139 | ESP_ERROR_CHECK(uart_param_config(port, &uart_config));
|
137 | 140 | /* Tell VFS to use UART driver */
|
138 |
| - esp_vfs_dev_uart_use_driver(port); |
| 141 | + uart_vfs_dev_use_driver(port); |
139 | 142 | /* Minicom, screen, idf_monitor send CR when ENTER key is pressed */
|
140 |
| - esp_vfs_dev_uart_port_set_rx_line_endings(port, ESP_LINE_ENDINGS_CR); |
| 143 | + uart_vfs_dev_port_set_rx_line_endings(port, ESP_LINE_ENDINGS_CR); |
141 | 144 | /* Move the caret to the beginning of the next line on '\n' */
|
142 |
| - esp_vfs_dev_uart_port_set_tx_line_endings(port, ESP_LINE_ENDINGS_CRLF); |
| 145 | + uart_vfs_dev_port_set_tx_line_endings(port, ESP_LINE_ENDINGS_CRLF); |
143 | 146 |
|
144 | 147 | fflush(stdout);
|
145 | 148 | fsync(fileno(stdout));
|
@@ -171,9 +174,9 @@ class Cli : private cli::CliSession {
|
171 | 174 |
|
172 | 175 | usb_serial_jtag_driver_config_t cfg = USB_SERIAL_JTAG_DRIVER_CONFIG_DEFAULT();
|
173 | 176 | usb_serial_jtag_driver_install(&cfg);
|
174 |
| - esp_vfs_usb_serial_jtag_use_driver(); |
175 |
| - esp_vfs_dev_usb_serial_jtag_set_rx_line_endings(ESP_LINE_ENDINGS_CR); |
176 |
| - esp_vfs_dev_usb_serial_jtag_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF); |
| 177 | + usb_serial_jtag_vfs_use_driver(); |
| 178 | + usb_serial_jtag_vfs_set_rx_line_endings(ESP_LINE_ENDINGS_CR); |
| 179 | + usb_serial_jtag_vfs_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF); |
177 | 180 |
|
178 | 181 | fflush(stdout);
|
179 | 182 | fsync(fileno(stdout));
|
|
0 commit comments