File tree 8 files changed +30
-17
lines changed
examples/AdvancedInternalStorage 8 files changed +30
-17
lines changed Original file line number Diff line number Diff line change 1
- #include < Arduino.h>
2
1
#include < Arduino_UnifiedStorage.h>
3
2
#include < vector>
4
3
Original file line number Diff line number Diff line change 2
2
#ifndef UnifiedStorage_H
3
3
#define UnifiedStorage_H
4
4
5
+ #define HAS_SD defined (ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
6
+ #define HAS_USB defined (ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
7
+ #define HAS_QSPI defined (ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA) || defined(ARDUINO_NICLA_VISION)
8
+
9
+ #define USES_RENESAS_CORE defined (ARDUINO_PORTENTA_C33)
10
+ #define USES_MBED_CORE defined (ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA) || defined(ARDUINO_NICLA_VISION)
11
+
5
12
6
13
#include " Arduino.h"
7
14
#include " Arduino_POSIXStorage.h"
15
+ #include < vector>
16
+ #include " Types.h"
17
+ #include " Utils.h"
8
18
#include " Folder.h"
9
19
#include " UFile.h"
10
- #include " Utils.h"
11
20
12
21
13
22
14
23
24
+ #if defined(HAS_USB)
25
+ #include " USBStorage.h"
26
+ #endif
27
+
28
+ #if defined(HAS_SD)
29
+ #include " SDStorage.h"
30
+ #endif
31
+
32
+ #if defined(HAS_QSPI)
33
+ #include " InternalStorage.h"
34
+ #endif
35
+
36
+
37
+
15
38
/* *
16
39
* Abstract class representing the common features of the supported storage methods
17
40
*/
@@ -52,14 +75,7 @@ class Arduino_UnifiedStorage {
52
75
};
53
76
54
77
55
- #if defined(ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
56
- #include " USBStorage.h"
57
- #include " SDStorage.h"
58
- #include " InternalStorage.h"
59
- #elif defined(ARDUINO_OPTA)
60
- #include " USBStorage.h"
61
- #include " InternalStorage.h"
62
- #endif
78
+
63
79
64
80
65
81
#endif
Original file line number Diff line number Diff line change 4
4
#include " Arduino_UnifiedStorage.h"
5
5
#include " Partitioning.h"
6
6
#include " Types.h"
7
+
7
8
/* *
8
9
* Represents internal storage using the Arduino Unified Storage library.
9
10
*/
Original file line number Diff line number Diff line change 1
1
2
2
#include " Arduino.h"
3
- #include " Arduino_POSIXStorage .h"
3
+ #include " Arduino_UnifiedStorage .h"
4
4
#include " Types.h"
5
5
#include < vector>
6
6
Original file line number Diff line number Diff line change 5
5
6
6
#include " Arduino_UnifiedStorage.h"
7
7
8
- #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_C33) || !defined(ARDUINO_OPTA)
9
8
10
9
/* *
11
10
* Represents an SD card storage using the Arduino Unified Storage library.
@@ -59,5 +58,3 @@ class SDStorage: public Arduino_UnifiedStorage {
59
58
};
60
59
61
60
#endif
62
-
63
- #endif
Original file line number Diff line number Diff line change 1
- #if defined(ARDUINO_PORTENTA_C33 )
1
+
2
+ #if defined(USES_RENESAS_CORE )
2
3
#include "BlockDevice.h"
3
4
#include "MBRBlockDevice.h"
4
5
#include "LittleFileSystem.h"
11
12
typedef LittleFileSystem LittleFileSystemType ;
12
13
typedef FileSystem FileSystemType ;
13
14
14
- #elif defined(ARDUINO_PORTENTA_H7_M7 ) || defined( ARDUINO_PORTENTA_H7_M4 ) || defined( ARDUINO_OPTA )
15
+ #elif defined(USES_MBED_CORE )
15
16
#include "QSPIFBlockDevice.h"
16
17
#include "MBRBlockDevice.h"
17
18
#include "FATFileSystem.h"
Original file line number Diff line number Diff line change 7
7
#include " Arduino.h"
8
8
#include " Arduino_POSIXStorage.h"
9
9
#include < iostream>
10
- #include < vector>
11
10
12
11
13
12
You can’t perform that action at this time.
0 commit comments