Skip to content

Commit

Permalink
show card serial
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Nov 3, 2024
1 parent 7f102ab commit 2496971
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions microcontrollers/backend-sdcard-teensy41.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ bool backend_sdcard_teensy41::begin()
return false;
}

Serial.printf("Card serial: %s\r\n", get_serial().c_str());

SD.sdfs.ls(LS_DATE | LS_SIZE);

file = SD.sdfs.open(FILENAME, O_RDWR);
Expand Down
4 changes: 3 additions & 1 deletion microcontrollers/backend-sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ backend_sdcard::backend_sdcard(const int led_read, const int led_write, const in
bool backend_sdcard::begin()
{
for(int i=0; i<3; i++) {
if (reinit(i))
if (reinit(i)) {
Serial.printf("Card serial: %s\r\n", get_serial().c_str());
return true;
}
}

Serial.println(F("SD-card init failed"));
Expand Down

0 comments on commit 2496971

Please sign in to comment.