File tree Expand file tree Collapse file tree 8 files changed +30
-17
lines changed
examples/AdvancedInternalStorage Expand file tree Collapse file tree 8 files changed +30
-17
lines changed Original file line number Diff line number Diff line change 1- #include < Arduino.h>
21#include < Arduino_UnifiedStorage.h>
32#include < vector>
43
Original file line number Diff line number Diff line change 22#ifndef UnifiedStorage_H
33#define UnifiedStorage_H
44
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+
512
613#include " Arduino.h"
714#include " Arduino_POSIXStorage.h"
15+ #include < vector>
16+ #include " Types.h"
17+ #include " Utils.h"
818#include " Folder.h"
919#include " UFile.h"
10- #include " Utils.h"
1120
1221
1322
1423
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+
1538/* *
1639 * Abstract class representing the common features of the supported storage methods
1740 */
@@ -52,14 +75,7 @@ class Arduino_UnifiedStorage {
5275};
5376
5477
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+
6379
6480
6581#endif
Original file line number Diff line number Diff line change 44#include " Arduino_UnifiedStorage.h"
55#include " Partitioning.h"
66#include " Types.h"
7+
78/* *
89 * Represents internal storage using the Arduino Unified Storage library.
910 */
Original file line number Diff line number Diff line change 11
22#include " Arduino.h"
3- #include " Arduino_POSIXStorage .h"
3+ #include " Arduino_UnifiedStorage .h"
44#include " Types.h"
55#include < vector>
66
Original file line number Diff line number Diff line change 55
66#include " Arduino_UnifiedStorage.h"
77
8- #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_C33) || !defined(ARDUINO_OPTA)
98
109/* *
1110 * Represents an SD card storage using the Arduino Unified Storage library.
@@ -59,5 +58,3 @@ class SDStorage: public Arduino_UnifiedStorage {
5958};
6059
6160#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 )
23 #include "BlockDevice.h"
34 #include "MBRBlockDevice.h"
45 #include "LittleFileSystem.h"
1112 typedef LittleFileSystem LittleFileSystemType ;
1213 typedef FileSystem FileSystemType ;
1314
14- #elif defined(ARDUINO_PORTENTA_H7_M7 ) || defined( ARDUINO_PORTENTA_H7_M4 ) || defined( ARDUINO_OPTA )
15+ #elif defined(USES_MBED_CORE )
1516 #include "QSPIFBlockDevice.h"
1617 #include "MBRBlockDevice.h"
1718 #include "FATFileSystem.h"
Original file line number Diff line number Diff line change 77#include " Arduino.h"
88#include " Arduino_POSIXStorage.h"
99#include < iostream>
10- #include < vector>
1110
1211
1312
You can’t perform that action at this time.
0 commit comments