1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-22 03:30:02 +00:00
r65emu/flash_filer.h
2023-05-25 15:05:04 +01:00

29 lines
543 B
C++

#ifndef __FLASH_FILER_H__
#define __FLASH_FILER_H__
// split into sd_filer and fs_filer
// implement write to new file (like checkpoint)
class flash_filer: public filer {
public:
flash_filer(const char *programs): _programs(programs) {}
const char *advance();
const char *rewind();
const char *checkpoint();
void restore(const char *);
bool start();
void stop();
bool seek(uint32_t pos);
uint8_t read() { return _buf[_pos++]; }
bool more();
private:
const char *_programs;
unsigned _pos, _len;
uint8_t _buf[128];
};
#endif