添加删除文件功能。

目前仅删除缓存文件。
This commit is contained in:
CSSC-WORK\murmur 2023-09-11 17:43:26 +08:00
parent 3df0e5d026
commit bd8e6381da
2 changed files with 11 additions and 2 deletions

View File

@ -950,8 +950,15 @@ void d_isInFence(void)
*/
void clearAllData()
{
mkfs("elm","sd0");//format SD
mkfs("elm", "W25Q128");//format flash
// mkfs("elm","sd0");//format SD
// mkfs("elm", "W25Q128");//format flash
LOG_I("FUNC = clear files");
//去掉原static
//static int cmd_rm(int argc, char **argv)
//MSH_CMD_EXPORT_ALIAS(cmd_rm, rm, Remove(unlink) the FILE(s).);
char *arg[]={"rm","-r",ROOT_PATH_DATA};
cmd_rm(3,arg);
LOG_D("files deleted.");
}
/**

View File

@ -57,6 +57,8 @@ typedef struct
uint8_t locAlert;
uint8_t locRepInterval;
int8_t isMaWin;
uint8_t wljd[40];//围栏jd支持15个点
uint8_t wlwd[40];//围栏wd
} SYS_CFG;