Add Due compatibility with SdFat

This commit is contained in:
Bodmer
2017-01-23 22:12:44 +00:00
parent a21e67a304
commit ab80285caa
2 changed files with 9 additions and 4 deletions

View File

@ -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;

View File

@ -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