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

add macro switch for low-memory devices other than __AVR__ #44

Open
wants to merge 1 commit into
base: Juse_Use_SdFat
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions src/SD.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
#define BUILTIN_SDCARD 254
#endif

#if defined(__arm__)
// Support everything on 32 bit boards with enough memory
#define SDFAT_FILE FsFile
#define SDFAT_BASE SdFs
#define MAX_FILENAME_LEN 256
#elif defined(__AVR__)
#if defined(__AVR__) || defined(SDFAT_LOWMEM)
// Limit to 32GB cards on 8 bit Teensy with only limited memory
#define SDFAT_FILE File32
#define SDFAT_BASE SdFat32
#define MAX_FILENAME_LEN 64
#elif defined(__arm__)
// Support everything on 32 bit boards with enough memory
#define SDFAT_FILE FsFile
#define SDFAT_BASE SdFs
#define MAX_FILENAME_LEN 256
#endif

class SDFile : public FileImpl
Expand Down Expand Up @@ -217,7 +217,7 @@ class SDClass : public FS
// can be used to detect if an chip is inserted. On BUILTIN_SDCARD
// we will default to use it if you use the begin method, howver
// if you bypass this and call directly to SDFat begin, then you
// can use this to let us know.
// can use this to let us know.
bool setMediaDetectPin(uint8_t pin);

public: // allow access, so users can mix SD & SdFat APIs
Expand Down