15#ifndef OFR_M5STACK_SD_PRESET_H
16#define OFR_M5STACK_SD_PRESET_H
24 File f = SD.open(filename, mode);
30 ((File *)stream)->close();
34 return ((File *)stream)->read((uint8_t *)ptr, size * nmemb);
38 return ((File *)stream)->seek(offset, (SeekMode)whence);
42 return ((File *)stream)->position();
#define FT_FILE
Definition: FileSupport.h:16
int OFR_fseek(FT_FILE *stream, long int offset, int whence)
Moves the cursor to the specified position.
Definition: M5Stack_SD_Preset.h:37
long int OFR_ftell(FT_FILE *stream)
Get file cursor position.
Definition: M5Stack_SD_Preset.h:41
size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream)
Read data from a file and store it in a buffer.
Definition: M5Stack_SD_Preset.h:33
FT_FILE * OFR_fopen(const char *filename, const char *mode)
Open file and get file pointer.
Definition: M5Stack_SD_Preset.h:23
std::list< File > ofr_file_list
Definition: M5Stack_SD_Preset.h:21
void OFR_fclose(FT_FILE *stream)
Close file.
Definition: M5Stack_SD_Preset.h:29