-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update/add_esp_vfs_console_component' into 'master'
fix(esp_vfs_console): add esp_vfs_console component Closes IDFGH-11900 See merge request espressif/esp-idf!28655
- Loading branch information
Showing
17 changed files
with
159 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
components/esp_driver_uart/include/driver/esp_private/uart_vfs.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "esp_vfs.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief get pointer of uart vfs. | ||
* | ||
* This function is called in vfs_console in order to get the vfs implementation | ||
* of uart. | ||
* | ||
* @return pointer to structure esp_vfs_t | ||
*/ | ||
const esp_vfs_t *esp_vfs_uart_get_vfs(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
components/esp_driver_usb_serial_jtag/include/driver/esp_private/usb_serial_jtag_vfs.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "esp_vfs.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief get pointer of usb_serial_jtag vfs. | ||
* | ||
* This function is called in vfs_console in order to get the vfs implementation | ||
* of usb_serial_jtag. | ||
* | ||
* @return pointer to structure esp_vfs_t | ||
*/ | ||
const esp_vfs_t *esp_vfs_usb_serial_jtag_get_vfs(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
idf_build_get_property(target IDF_TARGET) | ||
|
||
if(${target} STREQUAL "linux") | ||
return() # This component is not supported by the POSIX/Linux simulator | ||
endif() | ||
|
||
set(srcs "vfs_console.c") | ||
|
||
idf_component_register(SRCS ${srcs} | ||
INCLUDE_DIRS include | ||
PRIV_REQUIRES vfs esp_driver_uart esp_driver_usb_serial_jtag | ||
) | ||
|
||
if(CONFIG_ESP_CONSOLE_USB_CDC) | ||
target_sources(${COMPONENT_LIB} PRIVATE "vfs_cdcacm.c") | ||
endif() | ||
|
||
if(CONFIG_VFS_SUPPORT_IO) | ||
target_link_libraries(${COMPONENT_LIB} PUBLIC idf::vfs) | ||
# Make sure esp_vfs_console_register gets called at startup stage | ||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_vfs_include_console_register") | ||
endif() |
27 changes: 27 additions & 0 deletions
27
components/esp_vfs_console/include/esp_private/esp_vfs_cdcacm.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "esp_vfs.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief get pointer of cdcacm vfs. | ||
* | ||
* This function is called in vfs_console in order to get the vfs implementation | ||
* of cdcacm. | ||
* | ||
* @return pointer to structure esp_vfs_t | ||
*/ | ||
const esp_vfs_t *esp_vfs_cdcacm_get_vfs(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
2 changes: 1 addition & 1 deletion
2
components/vfs/include/esp_vfs_cdcacm.h → .../esp_vfs_console/include/esp_vfs_cdcacm.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.