|
@@ -343,38 +343,38 @@ int8_t SdBaseFile::lsPrintNext( uint8_t flags, uint8_t indent) {
|
343
|
343
|
&& DIR_IS_FILE_OR_SUBDIR(&dir)) break;
|
344
|
344
|
}
|
345
|
345
|
// indent for dir level
|
346
|
|
- for (uint8_t i = 0; i < indent; i++) SERIAL.write(' ');
|
|
346
|
+ for (uint8_t i = 0; i < indent; i++) MYSERIAL.write(' ');
|
347
|
347
|
|
348
|
348
|
// print name
|
349
|
349
|
for (uint8_t i = 0; i < 11; i++) {
|
350
|
350
|
if (dir.name[i] == ' ')continue;
|
351
|
351
|
if (i == 8) {
|
352
|
|
- SERIAL.write('.');
|
|
352
|
+ MYSERIAL.write('.');
|
353
|
353
|
w++;
|
354
|
354
|
}
|
355
|
|
- SERIAL.write(dir.name[i]);
|
|
355
|
+ MYSERIAL.write(dir.name[i]);
|
356
|
356
|
w++;
|
357
|
357
|
}
|
358
|
358
|
if (DIR_IS_SUBDIR(&dir)) {
|
359
|
|
- SERIAL.write('/');
|
|
359
|
+ MYSERIAL.write('/');
|
360
|
360
|
w++;
|
361
|
361
|
}
|
362
|
362
|
if (flags & (LS_DATE | LS_SIZE)) {
|
363
|
|
- while (w++ < 14) SERIAL.write(' ');
|
|
363
|
+ while (w++ < 14) MYSERIAL.write(' ');
|
364
|
364
|
}
|
365
|
365
|
// print modify date/time if requested
|
366
|
366
|
if (flags & LS_DATE) {
|
367
|
|
- SERIAL.write(' ');
|
|
367
|
+ MYSERIAL.write(' ');
|
368
|
368
|
printFatDate( dir.lastWriteDate);
|
369
|
|
- SERIAL.write(' ');
|
|
369
|
+ MYSERIAL.write(' ');
|
370
|
370
|
printFatTime( dir.lastWriteTime);
|
371
|
371
|
}
|
372
|
372
|
// print size if requested
|
373
|
373
|
if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) {
|
374
|
|
- SERIAL.write(' ');
|
375
|
|
- SERIAL.print(dir.fileSize);
|
|
374
|
+ MYSERIAL.write(' ');
|
|
375
|
+ MYSERIAL.print(dir.fileSize);
|
376
|
376
|
}
|
377
|
|
- SERIAL.println();
|
|
377
|
+ MYSERIAL.println();
|
378
|
378
|
return DIR_IS_FILE(&dir) ? 1 : 2;
|
379
|
379
|
}
|
380
|
380
|
//------------------------------------------------------------------------------
|
|
@@ -945,26 +945,26 @@ void SdBaseFile::printDirName(const dir_t& dir,
|
945
|
945
|
for (uint8_t i = 0; i < 11; i++) {
|
946
|
946
|
if (dir.name[i] == ' ')continue;
|
947
|
947
|
if (i == 8) {
|
948
|
|
- SERIAL.write('.');
|
|
948
|
+ MYSERIAL.write('.');
|
949
|
949
|
w++;
|
950
|
950
|
}
|
951
|
|
- SERIAL.write(dir.name[i]);
|
|
951
|
+ MYSERIAL.write(dir.name[i]);
|
952
|
952
|
w++;
|
953
|
953
|
}
|
954
|
954
|
if (DIR_IS_SUBDIR(&dir) && printSlash) {
|
955
|
|
- SERIAL.write('/');
|
|
955
|
+ MYSERIAL.write('/');
|
956
|
956
|
w++;
|
957
|
957
|
}
|
958
|
958
|
while (w < width) {
|
959
|
|
- SERIAL.write(' ');
|
|
959
|
+ MYSERIAL.write(' ');
|
960
|
960
|
w++;
|
961
|
961
|
}
|
962
|
962
|
}
|
963
|
963
|
//------------------------------------------------------------------------------
|
964
|
964
|
// print uint8_t with width 2
|
965
|
965
|
static void print2u( uint8_t v) {
|
966
|
|
- if (v < 10) SERIAL.write('0');
|
967
|
|
- SERIAL.print(v, DEC);
|
|
966
|
+ if (v < 10) MYSERIAL.write('0');
|
|
967
|
+ MYSERIAL.print(v, DEC);
|
968
|
968
|
}
|
969
|
969
|
//------------------------------------------------------------------------------
|
970
|
970
|
/** %Print a directory date field to Serial.
|
|
@@ -983,10 +983,10 @@ static void print2u( uint8_t v) {
|
983
|
983
|
* \param[in] fatDate The date field from a directory entry.
|
984
|
984
|
*/
|
985
|
985
|
void SdBaseFile::printFatDate(uint16_t fatDate) {
|
986
|
|
- SERIAL.print(FAT_YEAR(fatDate));
|
987
|
|
- SERIAL.write('-');
|
|
986
|
+ MYSERIAL.print(FAT_YEAR(fatDate));
|
|
987
|
+ MYSERIAL.write('-');
|
988
|
988
|
print2u( FAT_MONTH(fatDate));
|
989
|
|
- SERIAL.write('-');
|
|
989
|
+ MYSERIAL.write('-');
|
990
|
990
|
print2u( FAT_DAY(fatDate));
|
991
|
991
|
}
|
992
|
992
|
|
|
@@ -1000,9 +1000,9 @@ void SdBaseFile::printFatDate(uint16_t fatDate) {
|
1000
|
1000
|
*/
|
1001
|
1001
|
void SdBaseFile::printFatTime( uint16_t fatTime) {
|
1002
|
1002
|
print2u( FAT_HOUR(fatTime));
|
1003
|
|
- SERIAL.write(':');
|
|
1003
|
+ MYSERIAL.write(':');
|
1004
|
1004
|
print2u( FAT_MINUTE(fatTime));
|
1005
|
|
- SERIAL.write(':');
|
|
1005
|
+ MYSERIAL.write(':');
|
1006
|
1006
|
print2u( FAT_SECOND(fatTime));
|
1007
|
1007
|
}
|
1008
|
1008
|
//------------------------------------------------------------------------------
|
|
@@ -1014,7 +1014,7 @@ void SdBaseFile::printFatTime( uint16_t fatTime) {
|
1014
|
1014
|
bool SdBaseFile::printName() {
|
1015
|
1015
|
char name[13];
|
1016
|
1016
|
if (!getFilename(name)) return false;
|
1017
|
|
- SERIAL.print(name);
|
|
1017
|
+ MYSERIAL.print(name);
|
1018
|
1018
|
return true;
|
1019
|
1019
|
}
|
1020
|
1020
|
//------------------------------------------------------------------------------
|