mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
feat(vfs): Add linux target support for esp_vfs_eventfd
This commit is contained in:
@@ -5,12 +5,13 @@ set(srcs "commands.c"
|
||||
"split_argv.c"
|
||||
"linenoise/linenoise.c")
|
||||
|
||||
set(requires vfs)
|
||||
|
||||
if(${target} STREQUAL "linux")
|
||||
list(APPEND srcs "esp_console_repl_linux.c")
|
||||
set(requires "")
|
||||
else()
|
||||
list(APPEND srcs "esp_console_repl_chip.c")
|
||||
set(requires vfs esp_vfs_console)
|
||||
list(APPEND requires esp_vfs_console)
|
||||
endif()
|
||||
|
||||
set(argtable_srcs argtable3/arg_cmd.c
|
||||
|
@@ -10,7 +10,11 @@
|
||||
#include "console_private.h"
|
||||
#include "esp_log.h"
|
||||
#include "linenoise/linenoise.h"
|
||||
|
||||
#include "esp_vfs_eventfd.h"
|
||||
#if CONFIG_IDF_TARGET_LINUX
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static const char *TAG = "console.common";
|
||||
|
||||
|
@@ -1,7 +1,10 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
|
||||
# On Linux, we only support a few features, hence this simple component registration
|
||||
if(${target} STREQUAL "linux")
|
||||
return() # This component is not supported by the POSIX/Linux simulator
|
||||
idf_component_register(SRCS "vfs_eventfd_linux.c"
|
||||
INCLUDE_DIRS "include")
|
||||
return()
|
||||
endif()
|
||||
|
||||
list(APPEND sources "vfs.c"
|
||||
|
19
components/vfs/vfs_eventfd_linux.c
Normal file
19
components/vfs/vfs_eventfd_linux.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "esp_vfs_eventfd.h"
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
esp_err_t esp_vfs_eventfd_register(const esp_vfs_eventfd_config_t *config)
|
||||
{
|
||||
(void)config;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_vfs_eventfd_unregister(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
Reference in New Issue
Block a user