Files

53 lines
964 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef FLASH_SPIFS_H
#define FLASH_SPIFS_H
#include <stdbool.h>
#include "esp_err.h"
/**
* @brief 初始化SPIFFS文件系统
*
* @return ESP_OK 成功
* 其他 失败
*/
esp_err_t flash_spiffs_init(void);
/**
* @brief 检查文件系统是否已挂载
*
* @return true 已挂载
* false 未挂载
*/
bool flash_spiffs_is_mounted(void);
/**
* @brief 获取文件系统总大小
*
* @return 总大小(字节)
*/
uint32_t flash_spiffs_get_total_size(void);
/**
* @brief 获取文件系统已使用大小
*
* @return 已使用大小(字节)
*/
uint32_t flash_spiffs_get_used_size(void);
/**
* @brief 格式化文件系统(清空所有数据)
*
* @return ESP_OK 成功
* 其他 失败
*/
esp_err_t flash_spiffs_format(void);
/**
* @brief 获取文件系统挂载路径
*
* @return 挂载路径字符串(如 "/flash"
*/
const char* flash_spiffs_get_mount_point(void);
#endif // FLASH_SPIFS_H