From 169c894baa933dedf526f36666458459736ad888 Mon Sep 17 00:00:00 2001 From: dangfan Date: Sun, 5 Nov 2023 11:13:55 +0800 Subject: [PATCH] move cache_size to fs.h --- include/fs.h | 2 ++ src/fs.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fs.h b/include/fs.h index eeb2b3b7..f8a67c6a 100644 --- a/include/fs.h +++ b/include/fs.h @@ -4,6 +4,8 @@ #include +#define LFS_CACHE_SIZE 512 + int fs_format(const struct lfs_config *cfg); int fs_mount(const struct lfs_config *cfg); int read_file(const char *path, void *buf, lfs_soff_t off, lfs_size_t len); diff --git a/src/fs.c b/src/fs.c index 45c55f8c..75c89407 100644 --- a/src/fs.c +++ b/src/fs.c @@ -4,7 +4,7 @@ static lfs_t lfs; -static uint8_t file_buffer[CACHE_SIZE]; +static uint8_t file_buffer[LFS_CACHE_SIZE]; static struct lfs_file_config file_config = { .buffer = file_buffer