mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-22 09:01:08 +00:00
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:
@@ -20,6 +20,7 @@
|
||||
#include "esp_attr.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_rom_caps.h"
|
||||
#include "esp_private/startup_internal.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/rom/libc_stubs.h"
|
||||
@@ -176,8 +177,22 @@ void esp_newlib_init(void)
|
||||
esp_newlib_locks_init();
|
||||
}
|
||||
|
||||
ESP_SYSTEM_INIT_FN(init_newlib, CORE, BIT(0), 102)
|
||||
{
|
||||
esp_newlib_init();
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
void esp_setup_newlib_syscalls(void) __attribute__((alias("esp_newlib_init")));
|
||||
|
||||
/**
|
||||
* Postponed _GLOBAL_REENT stdio FPs initialization.
|
||||
*
|
||||
* Can not be a part of esp_reent_init() because stdio device may not initialized yet.
|
||||
*
|
||||
* Called from startup code and FreeRTOS, not intended to be called from
|
||||
* application code.
|
||||
*/
|
||||
void esp_newlib_init_global_stdio(const char *stdio_dev)
|
||||
{
|
||||
if (stdio_dev == NULL)
|
||||
@@ -207,3 +222,18 @@ void esp_newlib_init_global_stdio(const char *stdio_dev)
|
||||
#endif /* ESP_ROM_NEEDS_SWSETUP_WORKAROUND */
|
||||
}
|
||||
}
|
||||
|
||||
ESP_SYSTEM_INIT_FN(init_newlib_stdio, CORE, BIT(0), 115)
|
||||
{
|
||||
#if defined(CONFIG_VFS_SUPPORT_IO) && !defined(CONFIG_ESP_CONSOLE_NONE)
|
||||
esp_newlib_init_global_stdio("/dev/console");
|
||||
#else
|
||||
esp_newlib_init_global_stdio(NULL);
|
||||
#endif
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
// Hook to force the linker to include this file
|
||||
void newlib_include_init_funcs(void)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user