From bab9498a523999f9c9c2a0295a0943a24b24084b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rohl=C3=ADnek?= Date: Wed, 29 May 2024 08:46:09 +0200 Subject: [PATCH 1/2] docs(storage/vfs): add documentation for existing automounted vfs drivers --- docs/en/api-reference/storage/vfs.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/en/api-reference/storage/vfs.rst b/docs/en/api-reference/storage/vfs.rst index e0a3a104b7..fd49db948f 100644 --- a/docs/en/api-reference/storage/vfs.rst +++ b/docs/en/api-reference/storage/vfs.rst @@ -192,6 +192,15 @@ Standard I/O streams (``stdin``, ``stdout``, ``stderr``) are mapped to file desc Note that creating an eventfd with ``EFD_SUPPORT_ISR`` will cause interrupts to be temporarily disabled when reading, writing the file and during the beginning and the ending of the ``select()`` when this file is set. +Well known VFS devices +---------------------- + +IDF defines several VFS devices that can be used by applications. These devices are, among others: + + * ``/dev/uart/`` - file mapping to an UART opened with the VFS driver. The UART number is the number of the UART peripheral. + * ``/dev/null`` - file that discards all data written to it and returns EOF when read. It is automatically created if :ref:`CONFIG_VFS_INITIALIZE_DEV_NULL` is enabled. + * ``/dev/console`` - file that is connected to the primary and secondary outputs specified in the menuconfig by :ref:`CONFIG_ESP_CONSOLE_UART` and :ref:`CONFIG_ESP_CONSOLE_SECONDARY` respectively. More information can be found here :doc:`../../api-guides/stdio`. + Application Examples -------------------- From 542f65f1ff0b9461ba5e7d29ec5f44950a3f1eb5 Mon Sep 17 00:00:00 2001 From: renpeiying Date: Mon, 23 Sep 2024 11:12:16 +0800 Subject: [PATCH 2/2] docs: provide CN translation for storage/vfs updates --- docs/en/api-reference/storage/vfs.rst | 2 +- docs/zh_CN/api-reference/storage/vfs.rst | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/en/api-reference/storage/vfs.rst b/docs/en/api-reference/storage/vfs.rst index fd49db948f..44b1307546 100644 --- a/docs/en/api-reference/storage/vfs.rst +++ b/docs/en/api-reference/storage/vfs.rst @@ -192,7 +192,7 @@ Standard I/O streams (``stdin``, ``stdout``, ``stderr``) are mapped to file desc Note that creating an eventfd with ``EFD_SUPPORT_ISR`` will cause interrupts to be temporarily disabled when reading, writing the file and during the beginning and the ending of the ``select()`` when this file is set. -Well known VFS devices +Well Known VFS Devices ---------------------- IDF defines several VFS devices that can be used by applications. These devices are, among others: diff --git a/docs/zh_CN/api-reference/storage/vfs.rst b/docs/zh_CN/api-reference/storage/vfs.rst index d07c33b073..ff633c189c 100644 --- a/docs/zh_CN/api-reference/storage/vfs.rst +++ b/docs/zh_CN/api-reference/storage/vfs.rst @@ -192,6 +192,15 @@ VFS 对文件路径长度没有限制,但文件系统路径前缀受 ``ESP_VFS 注意,用 ``EFD_SUPPORT_ISR`` 创建 eventfd 将导致在读取、写入文件时,以及在设置这个文件的 ``select()`` 开始和结束时,暂时禁用中断。 +常用 VFS 设备 +------------- + +IDF 定义了多个可供应用程序使用的 VFS 设备。这些设备包括: + + * ``/dev/uart/`` - 此文件映射到使用 VFS 驱动程序打开的 UART 中。UART 编号是 UART 外设的编号。 + * ``/dev/null`` - 此文件丢弃所有写入的数据,并在读取时返回 EOF。启用 :ref:`CONFIG_VFS_INITIALIZE_DEV_NULL` 会自动创建此文件。 + * ``/dev/console`` - 此文件连接到在 menuconfig 中由 :ref:`CONFIG_ESP_CONSOLE_UART` 和 :ref:`CONFIG_ESP_CONSOLE_SECONDARY` 指定的主输出和次输出。更多信息请参考 :doc:`../../api-guides/stdio`。 + 应用示例 ----------------