ChaosDMX
Open-Source DMX-Interface
Loading...
Searching...
No Matches
storage.h
Go to the documentation of this file.
1#pragma once
2
3#include "esp_err.h"
4#include <stdbool.h>
5#include <stddef.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
14typedef struct {
15 size_t total_bytes;
16 size_t used_bytes;
17 size_t free_bytes;
19
25esp_err_t storage_init(void);
26
32bool storage_is_mounted(void);
33
39const char *storage_get_mount_point(void);
40
46const char *storage_get_partition_label(void);
47
54esp_err_t storage_get_info(storage_info_t *info);
55
59void storage_print_info(void);
60
66size_t storage_get_total_bytes(void);
67
73size_t storage_get_used_bytes(void);
74
80size_t storage_get_free_bytes(void);
81
82#ifdef __cplusplus
83}
84#endif
size_t storage_get_total_bytes(void)
Get the total size of the storage in bytes.
Definition storage.c:105
const char * storage_get_partition_label(void)
Get the partition label for the LittleFS filesystem.
Definition storage.c:54
esp_err_t storage_get_info(storage_info_t *info)
Get comprehensive storage information.
Definition storage.c:58
size_t storage_get_used_bytes(void)
Get the used size of the storage in bytes.
Definition storage.c:113
bool storage_is_mounted(void)
Check if the storage is mounted and ready.
Definition storage.c:50
esp_err_t storage_init(void)
Initialize and mount LittleFS filesystem.
Definition storage.c:15
const char * storage_get_mount_point(void)
Get the mount point for the LittleFS filesystem.
Definition storage.c:52
size_t storage_get_free_bytes(void)
Get the free size of the storage in bytes.
Definition storage.c:121
void storage_print_info(void)
Print storage information to the log.
Definition storage.c:80
Storage information structure.
Definition storage.h:14
size_t total_bytes
Total size of the storage in bytes.
Definition storage.h:15
size_t free_bytes
Free size of the storage in bytes.
Definition storage.h:17
size_t used_bytes
Used size of the storage in bytes.
Definition storage.h:16