fix(vfs): fix uart malloc when locates ISR context in IRAM

This commit is contained in:
zwx
2023-11-20 20:36:58 +08:00
parent a9f7ea3566
commit be96274ea3
3 changed files with 21 additions and 13 deletions

View File

@@ -1,9 +1,10 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "esp_vfs.h"
#include "esp_vfs_common.h"
@@ -11,6 +12,12 @@
extern "C" {
#endif
#if CONFIG_VFS_SELECT_IN_RAM
#define VFS_MALLOC_FLAGS MALLOC_CAP_INTERNAL
#else
#define VFS_MALLOC_FLAGS MALLOC_CAP_DEFAULT
#endif
typedef struct vfs_entry_ {
esp_vfs_t vfs; // contains pointers to VFS functions
char path_prefix[ESP_VFS_PATH_MAX]; // path prefix mapped to this VFS