Skip to content

Commit b5b21e1

Browse files
cosmetic and consistency fixes
1 parent 50fb1fc commit b5b21e1

File tree

8 files changed

+13
-20
lines changed

8 files changed

+13
-20
lines changed

Diff for: examples/InternalStoragePartitioning/InternalStoragePartitioning.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ std::vector<Partition> partitioningScheme = {
4040
{1024, FS_FAT}, // 1 MB for certificates
4141
{5120, FS_FAT}, // 5 MB for OTA firmware updates
4242
{8192, FS_LITTLEFS} // 8 MB for user data
43-
};
43+
};
4444

4545
// Function to test writing to a file in the specified storage partition
4646
void testWriting(Arduino_UnifiedStorage *storage) {
@@ -81,7 +81,6 @@ void testAllPartitions(std::vector<Partition> partitions) {
8181
}
8282

8383

84-
8584
void listPartitions(){
8685
std::vector<Partition> partitions = InternalStorage::readPartitions();
8786
int partitionIndex = 0;

Diff for: examples/SimpleStorageWriteRead/SimpleStorageWriteRead.ino

-8
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030
#include "Arduino_UnifiedStorage.h"
3131

3232

33-
34-
// Redirect Serial.print*() output to GDB instead of SerialUSB where it would conflict with ThreadDebug.
35-
// NOTE: Calls to Serial.print*() will block waiting for GDB to be connected so only useful to use this redefine
36-
// when actively debugging the program.
37-
38-
3933
void printFolderContents(Folder dir, int indentation = 0) {
4034
std::vector<Folder> directories = dir.getFolders();
4135
std::vector<UFile> files = dir.getFiles();
@@ -80,8 +74,6 @@ void setup() {
8074
if(!internalStorage.begin()){
8175
Serial.println("Error mounting storage device.");
8276
}
83-
84-
8577

8678
// Create a root directory in storage device
8779
Folder root = internalStorage.getRootFolder();

Diff for: extras/tests/TestExisting/TestExisting.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ void setup() {
1010
/* UNCOMMENT THIS PART IF YOU WANT TO ENABLE FORMATTING*/
1111

1212

13-
#if defined(ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
13+
#if defined(HAS_SERIAL)
1414
Serial.begin(115200);
1515
while(!Serial);
16-
#elif defined(ARDUINO_OPTA)
16+
#elif defined(HAS_RS485)
1717
beginRS485(115200);
1818
#endif
1919

Diff for: extras/tests/TestFileOperations/TestFileOperations.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,10 @@ void runTests(Arduino_UnifiedStorage * storage, String storageType) {
303303
}
304304

305305
void setup(){
306-
307-
#if defined(ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
306+
#if defined(HAS_SERIAL)
308307
Serial.begin(115200);
309308
while(!Serial);
310-
#elif defined(ARDUINO_OPTA)
309+
#elif defined(HAS_RS485)
311310
beginRS485(115200);
312311
#endif
313312

Diff for: extras/tests/TestFolderOperations/TestFolderOperations.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,14 @@ void runTests(Arduino_UnifiedStorage * storage, String storageType) {
120120
}
121121

122122
void setup(){
123-
#if defined(ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
123+
#if defined(HAS_SERIAL)
124124
Serial.begin(115200);
125125
while(!Serial);
126-
#elif defined(ARDUINO_OPTA)
126+
#elif defined(HAS_RS485)
127127
beginRS485(115200);
128128
#endif
129129

130+
130131
// toggle this to enable debugging output
131132
Arduino_UnifiedStorage::debuggingModeEnabled = false;
132133

Diff for: extras/tests/TestRepeatedFormatMount/TestRepeatedFormatMount.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ void runRepeatedMountTest(Arduino_UnifiedStorage * storage, String storageType,
4545

4646

4747
void setup(){
48-
#if defined(ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
48+
#if defined(HAS_SERIAL)
4949
Serial.begin(115200);
5050
while(!Serial);
51-
#elif defined(ARDUINO_OPTA)
51+
#elif defined(HAS_RS485)
5252
beginRS485(115200);
5353
#endif
54+
5455

5556
// toggle this to enable debugging output
5657
Arduino_UnifiedStorage::debuggingModeEnabled = false;

Diff for: library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name=Arduino_UnifiedStorage
22
version=1.0.0
33
author=Arduino
44
maintainer=Arduino <[email protected]>
5-
sentence=Simplify cross-device storage management on Portenta platforms with a single library supporting &sd, Flash, and USB storage access.
5+
sentence=Simplify cross-device storage management on Portenta platforms with a single library supporting SD, Flash, and USB storage access.
66
paragraph=With this versatile library, you can seamlessly handle various storage types without the need for separate, device-specific libraries. Develop data logging, file storage, or data transfer applications, with a consistent interface. All while reducing development time and ensuring compatibility across the Portenta C33, Portenta H7, and Portenta Machine Control platforms.
77
category=Data Storage
88
url=https://github.com/arduino-libraries/Arduino_UnifiedStorage

Diff for: src/Utils.h

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646

4747
[[gnu::unused]] static const char* createPartitionName(int number) {
48+
// check if the number can be represented by a letter of the alphabet
4849
if (number < 1 || number > 26) {
4950
// Handle out-of-range numbers or errors as needed
5051
return nullptr;

0 commit comments

Comments
 (0)