Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ReadWrite.ino #73

Merged
merged 3 commits into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion examples/ReadWrite/ReadWrite.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ void setup() {
Serial.print("Initializing SD card...");

if (!SD.begin(4)) {
Serial.println("initialization failed!");
Serial.println("initialization failed. Things to check:");
Serial.println("1. is a card inserted?");
Serial.println("2. is your wiring correct?");
Serial.println("3. did you change the chipSelect pin to match your shield or module?");
Serial.println("Note: press reset or reopen this serial monitor after fixing your issue!");
while (1);
}

Serial.println("initialization done.");

// open the file. note that only one file can be open at a time,
Expand Down
22 changes: 11 additions & 11 deletions src/utility/SdFat.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ class SdVolume;
// SdFile class

#ifdef O_RDONLY //ARDUINO_ARCH_MBED
#undef O_READ
#undef O_RDONLY
#undef O_WRITE
#undef O_WRONLY
#undef O_RDWR
#undef O_ACCMODE
#undef O_APPEND
#undef O_SYNC
#undef O_CREAT
#undef O_EXCL
#undef O_TRUNC
#undef O_READ
#undef O_RDONLY
#undef O_WRITE
#undef O_WRONLY
#undef O_RDWR
#undef O_ACCMODE
#undef O_APPEND
#undef O_SYNC
#undef O_CREAT
#undef O_EXCL
#undef O_TRUNC
#endif

// flags for ls()
Expand Down