2016-06-27 15:06:06 +00:00
|
|
|
/**
|
|
|
|
* ESP8266 SPIFFS HAL configuration.
|
|
|
|
*
|
|
|
|
* Part of esp-open-rtos
|
|
|
|
* Copyright (c) 2016 sheinz https://github.com/sheinz
|
|
|
|
* MIT License
|
|
|
|
*/
|
|
|
|
#ifndef __ESP_SPIFFS_H__
|
|
|
|
#define __ESP_SPIFFS_H__
|
|
|
|
|
|
|
|
#include "spiffs.h"
|
|
|
|
|
|
|
|
extern spiffs fs;
|
|
|
|
|
|
|
|
/**
|
2016-07-15 12:22:03 +00:00
|
|
|
* Prepare for SPIFFS mount.
|
2016-07-18 10:12:21 +00:00
|
|
|
*
|
2016-07-15 12:22:03 +00:00
|
|
|
* The function allocates all the necessary buffers.
|
|
|
|
*/
|
|
|
|
void esp_spiffs_init();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Free all memory buffers that were used by SPIFFS.
|
2016-06-27 15:06:06 +00:00
|
|
|
*
|
2016-07-15 12:22:03 +00:00
|
|
|
* The function should be called after SPIFFS unmount if the file system is not
|
|
|
|
* going to need any more.
|
2016-06-27 15:06:06 +00:00
|
|
|
*/
|
2016-07-15 12:22:03 +00:00
|
|
|
void esp_spiffs_deinit();
|
2016-06-27 15:06:06 +00:00
|
|
|
|
|
|
|
/**
|
2016-07-15 12:22:03 +00:00
|
|
|
* Mount SPIFFS.
|
|
|
|
*
|
|
|
|
* esp_spiffs_init must be called first.
|
|
|
|
*
|
|
|
|
* Return SPIFFS return code.
|
2016-06-27 15:06:06 +00:00
|
|
|
*/
|
2016-07-15 12:22:03 +00:00
|
|
|
int32_t esp_spiffs_mount();
|
2016-06-27 15:06:06 +00:00
|
|
|
|
|
|
|
#endif // __ESP_SPIFFS_H__
|