mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-17 07:09:37 +00:00
fix(esp_vfs_console): add esp_vfs_console component
move vfs_console related init steps from vfs component to new esp_vfs_console component
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "esp_rom_uart.h"
|
||||
#include "hal/uart_ll.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_private/esp_vfs_console.h"
|
||||
#include "esp_vfs_dev.h" // Old headers for the aliasing functions
|
||||
#include "esp_private/startup_internal.h"
|
||||
|
||||
@@ -1010,6 +1009,11 @@ static const esp_vfs_t uart_vfs = {
|
||||
#endif // CONFIG_VFS_SUPPORT_TERMIOS
|
||||
};
|
||||
|
||||
const esp_vfs_t *esp_vfs_uart_get_vfs(void)
|
||||
{
|
||||
return &uart_vfs;
|
||||
}
|
||||
|
||||
void uart_vfs_dev_register(void)
|
||||
{
|
||||
ESP_ERROR_CHECK(esp_vfs_register("/dev/uart", &uart_vfs, NULL));
|
||||
@@ -1074,7 +1078,7 @@ void uart_vfs_dev_use_driver(int uart_num)
|
||||
#if CONFIG_ESP_CONSOLE_UART
|
||||
ESP_SYSTEM_INIT_FN(init_vfs_uart, CORE, BIT(0), 110)
|
||||
{
|
||||
esp_vfs_set_primary_dev_vfs_def_struct(&uart_vfs);
|
||||
uart_vfs_dev_register();
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user