1
6
7
8
9
16
17
18
19
20
21
22
23
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* ... */
#pragma once
#include <stdint.h>
#include <stddef.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "spiffs.h"
#include "esp_compiler.h"7 includes
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_SPIFFS_PATH_MAX 15
/* ... */
typedef struct {
spiffs *fs;
SemaphoreHandle_t lock;
const esp_partition_t* partition;
char base_path[ESP_SPIFFS_PATH_MAX+1];
bool by_label;
spiffs_config cfg;
uint8_t *work;
uint8_t *fds;
uint32_t fds_sz;
uint8_t *cache;
uint32_t cache_sz;
}{ ... } esp_spiffs_t;
s32_t spiffs_api_read(spiffs *fs, uint32_t addr, uint32_t size, uint8_t *dst);
s32_t spiffs_api_write(spiffs *fs, uint32_t addr, uint32_t size, uint8_t *src);
s32_t spiffs_api_erase(spiffs *fs, uint32_t addr, uint32_t size);
void spiffs_api_check(spiffs *fs, spiffs_check_type type,
spiffs_check_report report, uint32_t arg1, uint32_t arg2);
#ifdef __cplusplus
}{...}
#endif