diff options
| author | Meco Man <[email protected]> | 2021-09-25 13:45:55 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-09-25 13:45:55 -0400 |
| commit | 1d00635ee92760b59e45e55b1d47199201c0a390 (patch) | |
| tree | b8391b3dc82162bdacb4fa13a5cc41480f565b69 /components | |
| parent | 32e9aa21c4afc5b1f6f163d58644174d3783032f (diff) | |
[fatfs] 互斥量保护超时可通过Kconfig配置时间
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/Kconfig | 6 | ||||
| -rw-r--r-- | components/dfs/filesystems/elmfat/ffconf.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/components/dfs/Kconfig b/components/dfs/Kconfig index 442c3bb260..7a4fbb655d 100644 --- a/components/dfs/Kconfig +++ b/components/dfs/Kconfig @@ -122,6 +122,12 @@ if RT_USING_DFS config RT_DFS_ELM_REENTRANT bool "Enable the reentrancy (thread safe) of the FatFs module" 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 endif diff --git a/components/dfs/filesystems/elmfat/ffconf.h b/components/dfs/filesystems/elmfat/ffconf.h index d62ee4906a..a6dcebe228 100644 --- a/components/dfs/filesystems/elmfat/ffconf.h +++ b/components/dfs/filesystems/elmfat/ffconf.h @@ -301,7 +301,10 @@ #else #define FF_FS_REENTRANT 0 /* 0:Disable or 1:Enable */ #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 /* 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 |
