File tree 3 files changed +38
-4
lines changed
3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 25
25
#include " FATFileSystem.h"
26
26
#endif
27
27
28
+
29
+ /* *
30
+ * Abstract class representing the common features of the supported storage methods
31
+ */
28
32
class Arduino_UnifiedStorage {
29
33
public:
34
+ /* *
35
+ * Initializes the storage.
36
+ *
37
+ * @return 1 if successful, 0 if failed.
38
+ */
30
39
virtual int begin () = 0;
31
40
41
+ /* *
42
+ * Initializes the storage with the specified file system.
43
+ * @param fs The desired file system (FS_FAT or FS_LITTLEFS).
44
+ * @return 1 if successful, 0 if failed.
45
+ */
32
46
virtual int begin (FileSystems fs) = 0;
33
47
48
+ /* *
49
+ * Unmounts the storage.
50
+ * @return 1 if successful, 0 if failed.
51
+ */
34
52
virtual int unmount () = 0;
35
53
54
+ /* *
55
+ * Retrieves the root folder of the storage.
56
+ * @return The root folder as a Folder object.
57
+ */
36
58
virtual Folder getRootFolder () = 0;
37
59
60
+ /* *
61
+ * Formats the storage with the FAT file system.
62
+ * @return 1 if successful, 0 if failed.
63
+ */
38
64
virtual int formatLittleFS () = 0;
39
65
66
+ /* *
67
+ * Formats the storage with the FAT file system.
68
+ *
69
+ * @return 1 if successful, 0 if failed.
70
+ */
40
71
virtual int formatFAT () = 0;
41
72
};
42
73
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class Folder;
11
11
12
12
13
13
14
-
14
+ /* *
15
+ * Class representing a File
16
+ */
15
17
class UFile {
16
18
public:
17
19
Original file line number Diff line number Diff line change 3
3
#ifndef USBStorage_H
4
4
#define USBStorage_H
5
5
6
- /* *
7
- * Represents USB storage using the Arduino Unified Storage library.
8
- */
6
+
9
7
static bool usb_available = false ;
10
8
9
+ /* *
10
+ * Represents a USB storage using the Arduino Unified Storage library.
11
+ */
11
12
class USBStorage : public Arduino_UnifiedStorage {
12
13
public:
13
14
You can’t perform that action at this time.
0 commit comments