Open tarbear123 opened 5 years ago
hello?
SD card is required.
Its a tiny amount of work to bake them into the firmware... I do this on my system so I don't need an SD-Card at all. I currently have around 12 gifs I switch between.
I created a MemFile.h that provides FileInfo read/seek/position/size/close/name using gifs converted to arrays using bin2h, so sizeof array and having FileInfo private members a fileaddr pointer, fileoffset count, filesize value. Then use this to create FilenameFunctions.cpp with fileOpenFile, fileSeekCallback, filePositionCallback, fileReadCallback, fileReadBlockCallback, which get provided to the gif decoder using the setFileReadCallback/setFileSeekCallback/etc.
My fileOpenFile takes the array pointer and sizeof(array).
Total its 80 lines of code.
//FilenameFunctions.cpp
FileInfo file;
bool fileOpenFile(const char name, const void address, uint32_t size) { file.reload(name, address, size); }
bool fileSeekCallback(unsigned long position) { return file.seek(position); }
unsigned long filePositionCallback(void) { return file.position(); }
int fileReadCallback(void) { return file.read(); }
int fileReadBlockCallback(void * buffer, int numberOfBytes) { return file.read(buffer, numberOfBytes); }
//FilenameFunctions.cpp
include "MemFile.h"
FileInfo file;
bool fileOpenFile(const char name, const void address, uint32_t size) { file.reload(name, address, size); }
bool fileSeekCallback(unsigned long position) { return file.seek(position); }
unsigned long filePositionCallback(void) { return file.position(); }
int fileReadCallback(void) { return file.read(); }
int fileReadBlockCallback(void * buffer, int numberOfBytes) { return file.read(buffer, numberOfBytes); }
is this how you create a new library in atom and where do you put your GIF's?
hello?
i don't have a sd card module, where do i put my gifs in the animated gif's example?