update.
This commit is contained in:
@ -8,12 +8,13 @@
|
||||
#include "esp_console.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_vfs_dev.h"
|
||||
#include "esp_vfs_fat.h"
|
||||
#include "linenoise/linenoise.h"
|
||||
#include "nvs.h"
|
||||
#include "nvs_flash.h"
|
||||
#include <driver/uart_vfs.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PROMPT_STR CONFIG_IDF_TARGET
|
||||
|
||||
@ -103,8 +104,8 @@ static void initialize_console() {
|
||||
|
||||
setvbuf(stdin, NULL, _IONBF, 0);
|
||||
|
||||
esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
|
||||
esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
|
||||
uart_vfs_dev_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
|
||||
uart_vfs_dev_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
|
||||
|
||||
uart_config_t uart_config = {};
|
||||
uart_config.baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE;
|
||||
@ -115,7 +116,7 @@ static void initialize_console() {
|
||||
ESP_ERROR_CHECK(uart_driver_install(static_cast<uart_port_t>(CONFIG_ESP_CONSOLE_UART_NUM), 256, 0, 0, NULL, 0));
|
||||
ESP_ERROR_CHECK(uart_param_config(static_cast<uart_port_t>(CONFIG_ESP_CONSOLE_UART_NUM), &uart_config));
|
||||
|
||||
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
|
||||
uart_vfs_dev_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
|
||||
|
||||
esp_console_config_t console_config = {};
|
||||
console_config.max_cmdline_args = 8;
|
||||
|
Reference in New Issue
Block a user