mirror of
https://github.com/Bodmer/JPEGDecoder.git
synced 2025-05-17 23:15:57 +08:00
Add Due compatibility with SdFat
This commit is contained in:
@ -355,13 +355,18 @@ int JPEGDecoder::decodeSdFile(const char *pFilename) {
|
||||
return decodeSdFile(pInFile);
|
||||
}
|
||||
|
||||
int JPEGDecoder::decodeSdFile(const String& pFilename) {
|
||||
|
||||
int JPEGDecoder::decodeSdFile(const String& pFilename) {
|
||||
#if !defined (ARDUINO_ARCH_SAM)
|
||||
File pInFile = SD.open( pFilename, FILE_READ);
|
||||
|
||||
return decodeSdFile(pInFile);
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int JPEGDecoder::decodeSdFile(File jpgFile) { // This is for the SD library
|
||||
|
||||
g_pInFileSd = jpgFile;
|
||||
|
@ -49,11 +49,11 @@
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
||||
#ifdef LOAD_SD_LIBRARY
|
||||
#ifdef __AVR__
|
||||
#if defined (ARDUINO_ARCH_AVR)
|
||||
#include <SD.h> // For the Mega
|
||||
#else
|
||||
#elif defined (ARDUINO_ARCH_SAM)
|
||||
#include <SdFat.h> // For Due etc where we might need to bit bash the SPI
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user