mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
feat(storage/vfs): Document context-less API deprecation
This commit is contained in:
@@ -19,6 +19,10 @@ FS Registration
|
||||
|
||||
To register an FS driver, an application needs to define an instance of the :cpp:type:`esp_vfs_fs_ops_t` structure and populate it with function pointers to FS APIs:
|
||||
|
||||
.. warning::
|
||||
|
||||
The API version without a context pointer is deprecated, and will be removed in the future. See :ref:`context_api` for details.
|
||||
|
||||
.. highlight:: c
|
||||
|
||||
::
|
||||
@@ -65,6 +69,7 @@ The recommended approach for registering filesystem is to use statically allocat
|
||||
ESP_ERROR_CHECK(esp_vfs_register_fs("/data", &myfs, ESP_VFS_FLAG_DEFAULT, NULL));
|
||||
}
|
||||
|
||||
.. _context_api:
|
||||
|
||||
Context Aware Filesystem
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -19,6 +19,7 @@ VFS
|
||||
- ``esp_vfs_register_fd_range`` is now considered private and its signature was changed to match the new VFS API style. Projects that still rely on this internal helper must include ``esp_private/socket.h`` and should be aware that the API may change without notice.
|
||||
- Legacy VFS APIs (such as ``esp_vfs_register``) that operate on ``esp_vfs_t`` instead of ``esp_vfs_fs_ops_t`` are deprecated and will be removed in the next major release. Switch to the new ``esp_vfs_fs_ops_t``-based APIs.
|
||||
- TERMIOS support is now disabled by default. Re-enable :ref:`CONFIG_VFS_SUPPORT_TERMIOS` in menuconfig if your application calls POSIX ``termios`` APIs, such as ``tcsetattr``/``tcgetattr`` for UART configuration.
|
||||
- Context-less VFS function pointers are deprecated. Switch to the context-aware ``*_p`` callbacks, register the VFS with ``ESP_VFS_FLAG_CONTEXT_PTR``, and pass ``NULL`` as the context pointer if the driver does not need per-instance state. This change simplifies the API surface and reduces runtime overhead in the VFS call path.
|
||||
|
||||
|
||||
``esp_vfs_console``
|
||||
|
||||
Reference in New Issue
Block a user