mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
feat(storage/vfs): Make lwip specific API private
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <sys/select.h>
|
||||
#include "esp_attr.h"
|
||||
#include "esp_vfs.h"
|
||||
#include "esp_private/socket.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include "lwip/sys.h"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "esp_vfs.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Special case function for registering a VFS that uses a method other than
|
||||
* open() to open new file descriptors from the interval <min_fd; max_fd).
|
||||
*
|
||||
* This is a special-purpose function intended for registering LWIP sockets to VFS.
|
||||
*
|
||||
* @param vfs Pointer to esp_vfs_fs_ops_t. Meaning is the same as for esp_vfs_register_fs().
|
||||
* @param ctx Pointer to context structure. Meaning is the same as for esp_vfs_register_fs().
|
||||
* @param min_fd The smallest file descriptor this VFS will use.
|
||||
* @param max_fd Upper boundary for file descriptors this VFS will use (the biggest file descriptor plus one).
|
||||
*
|
||||
* @return ESP_OK if successful,
|
||||
* ESP_ERR_NO_MEM if too many VFSes are registered,
|
||||
* ESP_ERR_INVALID_ARG if the file descriptor boundaries are incorrect.
|
||||
*/
|
||||
esp_err_t esp_vfs_register_fd_range(const esp_vfs_fs_ops_t *vfs, int flags, void *ctx, int min_fd, int max_fd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -275,23 +275,6 @@ typedef struct
|
||||
*/
|
||||
esp_err_t esp_vfs_register(const char* base_path, const esp_vfs_t* vfs, void* ctx);
|
||||
|
||||
/**
|
||||
* Special case function for registering a VFS that uses a method other than
|
||||
* open() to open new file descriptors from the interval <min_fd; max_fd).
|
||||
*
|
||||
* This is a special-purpose function intended for registering LWIP sockets to VFS.
|
||||
*
|
||||
* @param vfs Pointer to esp_vfs_t. Meaning is the same as for esp_vfs_register().
|
||||
* @param ctx Pointer to context structure. Meaning is the same as for esp_vfs_register().
|
||||
* @param min_fd The smallest file descriptor this VFS will use.
|
||||
* @param max_fd Upper boundary for file descriptors this VFS will use (the biggest file descriptor plus one).
|
||||
*
|
||||
* @return ESP_OK if successful, ESP_ERR_NO_MEM if too many VFSes are
|
||||
* registered, ESP_ERR_INVALID_ARG if the file descriptor boundaries
|
||||
* are incorrect.
|
||||
*/
|
||||
esp_err_t esp_vfs_register_fd_range(const esp_vfs_fs_ops_t *vfs, int flags, void *ctx, int min_fd, int max_fd);
|
||||
|
||||
/**
|
||||
* Special case function for registering a VFS that uses a method other than
|
||||
* open() to open new file descriptors. In comparison with
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "esp_vfs.h"
|
||||
#include "esp_private/socket.h"
|
||||
#include "unity.h"
|
||||
#include "esp_log.h"
|
||||
#include "test_utils.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "freertos/semphr.h"
|
||||
#include "esp_vfs.h"
|
||||
#include "esp_vfs_private.h"
|
||||
#include "include/esp_vfs.h"
|
||||
#include "esp_private/socket.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
// Warn about using deprecated option
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "freertos/semphr.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_vfs.h"
|
||||
#include "esp_private/socket.h"
|
||||
#include "esp_vfs_private.h"
|
||||
#include "esp_vfs_utils.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
Reference in New Issue
Block a user