|
1 | | -// Comment out the next #define if you are not using an SD Card to store the JPEGs |
| 1 | +// Comment out the next #defines if you are not using an SD Card to store the JPEGs |
2 | 2 | // Commenting out the line is NOT essential but will save some FLASH space if |
3 | | -// SD Card access is not needed. |
| 3 | +// SD Card access is not needed. Note: use of SdFat is currently untested! |
4 | 4 |
|
5 | | -#define LOAD_SD_LIBRARY |
| 5 | +#define LOAD_SD_LIBRARY // Default SD Card library |
| 6 | +//#define LOAD_SDFAT_LIBRARY // Use SdFat library instead, so SD Card SPI can be bit bashed |
| 7 | + |
| 8 | + |
| 9 | +// Note for ESP8266 users: |
| 10 | +// If the sketch uses SPIFFS and has included FS.h without defining FS_NO_GLOBALS first |
| 11 | +// then the JPEGDecoder library will NOT load the SD or SdFat libraries. Use lines thus |
| 12 | +// in your sketch (see the examples included in the JPEGDecoder library): |
| 13 | +/* |
| 14 | +#define FS_NO_GLOBALS |
| 15 | +#include <FS.h> |
| 16 | +
|
| 17 | +// You will then need to directly reference the SPIFFS File type thus in the sketch, e.g.: |
| 18 | +
|
| 19 | +fs::File jpegFile = SPIFFS.open( filename, "r"); // Example |
| 20 | +
|
| 21 | +// This will then allow the default method of using the SD library File type to be used |
| 22 | +// in the same sketch, e.g.: |
| 23 | +
|
| 24 | +File jpegFile = SD.open( filename, FILE_READ); |
| 25 | +
|
| 26 | +*/ |
| 27 | + |
| 28 | +// This is all to avoid a redefinition of 'class fs::File' error due to a conflict between the |
| 29 | +// duplicate definitions in the SD library and the SPIFFS library. |
| 30 | + |
6 | 31 |
|
7 | 32 | #ifdef ESP8266 |
8 | | - // Comment out the next #define if you do not want the bytes swapped in the |
9 | | - // the image blocks returned by read(). Swapping the bytes does mean pixel blocks can be |
10 | | - // written to the screen faster using the ESP8266 SPI library writePattern() |
11 | | - // member function. Comment out for "normal" byte order. Images will look pyscodelic |
12 | | - // with wrong colours if the byte order is not right for your sketch! |
13 | | - // #define SWAP_BYTES |
| 33 | + // Unomment out the next #define if you want the bytes swapped in the image blocks |
| 34 | + // returned by read(). |
| 35 | + |
| 36 | + // Swapping the bytes is only needed to use the ESP8266 SPI library writePattern() |
| 37 | + // member function and it is better to use readSwappedBytes() instead of read() in |
| 38 | + // the sketch. Images will look pyscodelic with wrong colours if the SPI transmit byte |
| 39 | + // order is not right for your sketch! |
| 40 | + |
| 41 | + // #define SWAP_BYTES // Deprecated, only included for backwards compatibility |
14 | 42 | #endif |
0 commit comments