4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-30 06:00:27 +08:00

[fatfs] 互斥量保护超时可通过Kconfig配置时间

This commit is contained in:
Meco Man 2021-09-25 13:45:55 -04:00
parent 32e9aa21c4
commit 1d00635ee9
2 changed files with 10 additions and 1 deletions

View File

@ -122,6 +122,12 @@ if RT_USING_DFS
config RT_DFS_ELM_REENTRANT config RT_DFS_ELM_REENTRANT
bool "Enable the reentrancy (thread safe) of the FatFs module" bool "Enable the reentrancy (thread safe) of the FatFs module"
default y default y
config RT_DFS_ELM_MUTEX_TIMEOUT
int "Timeout of thread-safe protection mutex"
range 0 1000000
default 3000
depends on RT_DFS_ELM_REENTRANT
endmenu endmenu
endif endif

View File

@ -301,7 +301,10 @@
#else #else
#define FF_FS_REENTRANT 0 /* 0:Disable or 1:Enable */ #define FF_FS_REENTRANT 0 /* 0:Disable or 1:Enable */
#endif #endif
#define FF_FS_TIMEOUT 3000 #ifndef RT_DFS_ELM_MUTEX_TIMEOUT
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
#endif
#define FF_FS_TIMEOUT RT_DFS_ELM_MUTEX_TIMEOUT
#define FF_SYNC_t rt_mutex_t #define FF_SYNC_t rt_mutex_t
/* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs /* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs
/ module itself. Note that regardless of this option, file access to different / module itself. Note that regardless of this option, file access to different