update stackfunction

This commit is contained in:
Steven Dan
2026-03-31 10:58:35 +08:00
parent 38f033ace0
commit 00e7cab17a

View File

@@ -103,6 +103,7 @@ void lfs_deinit(void) {
}
#pragma stackfunction 1500
void lfs_read_config(unsigned char * config, unsigned char * buffer, unsigned size)
{
swlock_acquire(&lfs_lock);
@@ -130,6 +131,7 @@ void lfs_read_config(unsigned char * config, unsigned char * buffer, unsigned si
}
#pragma stackfunction 1500
void lfs_write_config(unsigned char * config, unsigned char * buffer, unsigned size)
{
swlock_acquire(&lfs_lock);
@@ -155,6 +157,7 @@ void lfs_write_config(unsigned char * config, unsigned char * buffer, unsigned s
// 检查文件是否存在
#pragma stackfunction 1200
int lfs_file_exists(const char * file_path)
{
swlock_acquire(&lfs_lock);
@@ -170,6 +173,7 @@ int lfs_file_exists(const char * file_path)
}
// EQ参数专用读写函数
#pragma stackfunction 1200
void lfs_read_eq_config(const char * file_path, unsigned char * buffer, unsigned size)
{
lfs_file_open(&lfs, &file, file_path, LFS_O_RDONLY);
@@ -177,6 +181,7 @@ void lfs_read_eq_config(const char * file_path, unsigned char * buffer, unsigned
lfs_file_close(&lfs, &file);
}
#pragma stackfunction 1500
void lfs_write_eq_config(const char * file_path, unsigned char * buffer, unsigned size)
{
lfs_file_open(&lfs, &file, file_path, LFS_O_RDWR | LFS_O_CREAT);
@@ -187,12 +192,14 @@ void lfs_write_eq_config(const char * file_path, unsigned char * buffer, unsigne
// 删除文件
#pragma stackfunction 1500
int lfs_remove_file(const char * file_path)
{
return lfs_remove(&lfs, file_path);
}
// 创建目录(通过创建临时文件然后删除)
#pragma stackfunction 1500
int lfs_create_directory(const char * dir_path)
{
char temp_file[256];