Skip to content

Commit fe8b45f

Browse files
committed
Little changes on storage examples
1 parent ee855cb commit fe8b45f

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

libraries/Storage/examples/FatFsOnQSPIFlash/FatFsOnQSPIFlash.ino

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ void setup() {
4242
/* list to store all directory in the root */
4343
std::vector<std::string> dir_list;
4444

45+
Serial.println();
46+
Serial.println("##### TEST QSPI FLASH with FAT FS");
47+
Serial.println();
48+
4549
/*
4650
* MOUNTING SDCARD AS FATFS filesystem
4751
*/
4852

49-
Serial.println("Mounting SDCARD...");
53+
Serial.println("Mounting QSPI FLASH...");
5054
int err = fs.mount(&block_device);
5155
if (err) {
5256
// Reformat if we can't mount the filesystem
@@ -89,6 +93,10 @@ void setup() {
8993
while(1);
9094
}
9195

96+
if(dirIndex == 0) {
97+
Serial.println("Empty SDCARD");
98+
}
99+
92100
bool found_test_folder = false;
93101

94102
/*
@@ -261,9 +269,7 @@ void setup() {
261269
Serial.println(file_test_name.c_str());
262270
}
263271
}
264-
if(dirIndex == 0) {
265-
Serial.println("Empty SDCARD");
266-
}
272+
267273
}
268274

269275
void loop() {

libraries/Storage/examples/LittleFsOnQSPIFlash/LittleFsOnQSPIFlash.ino

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@ void setup() {
4343
/* list to store all directory in the root */
4444
std::vector<std::string> dir_list;
4545

46+
Serial.println();
47+
Serial.println("##### TEST QSPI FLASH with FAT FS");
48+
Serial.println();
49+
4650
/*
4751
* MOUNTING SDCARD AS FATFS filesystem
4852
*/
4953

50-
Serial.println("Mounting SDCARD...");
54+
Serial.println("Mounting QSPI FLASH...");
5155
int err = fs.mount(&block_device);
5256
if (err) {
5357
// Reformat if we can't mount the filesystem
@@ -92,6 +96,10 @@ void setup() {
9296
while(1);
9397
}
9498

99+
if(dirIndex == 0) {
100+
Serial.println("Empty SDCARD");
101+
}
102+
95103
bool found_test_folder = false;
96104

97105
/*
@@ -264,9 +272,7 @@ void setup() {
264272
Serial.println(file_test_name.c_str());
265273
}
266274
}
267-
if(dirIndex == 0) {
268-
Serial.println("Empty SDCARD");
269-
}
275+
270276
}
271277

272278
void loop() {

libraries/Storage/examples/TestSDCARD/TestSDCARD.ino

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ void setup() {
4242
/* list to store all directory in the root */
4343
std::vector<std::string> dir_list;
4444

45+
Serial.println();
46+
Serial.println("##### TEST SD CARD with FAT FS");
47+
Serial.println();
48+
4549
/*
4650
* MOUNTING SDCARD AS FATFS filesystem
4751
*/
@@ -89,6 +93,10 @@ void setup() {
8993
while(1);
9094
}
9195

96+
if(dirIndex == 0) {
97+
Serial.println("Empty SDCARD");
98+
}
99+
92100
bool found_test_folder = false;
93101

94102
/*
@@ -261,9 +269,7 @@ void setup() {
261269
Serial.println(file_test_name.c_str());
262270
}
263271
}
264-
if(dirIndex == 0) {
265-
Serial.println("Empty SDCARD");
266-
}
272+
267273
}
268274

269275
void loop() {

0 commit comments

Comments
 (0)