1
0
mirror of https://github.com/jscrane/r65emu.git synced 2025-04-22 17:37:08 +00:00

better support for multiple devices

This commit is contained in:
steve 2025-02-25 10:37:36 +00:00
parent a3d208a8b0
commit 75964a25be
2 changed files with 20 additions and 1 deletions

@ -137,6 +137,21 @@ const char *flash_filer::rewind() {
return advance();
}
const char *flash_filer::filename() const {
#if defined(USE_SPIFFS) || defined(USE_LITTLEFS)
File &f = files[_current];
if (f)
return f.name();
#endif
return 0;
}
void flash_filer::next_device() {
_current++;
if (_current == MAX_FILES)
_current = 0;
}
#if !defined(NO_CHECKPOINT)
#if defined(USE_SPIFFS)
static char buf[32];

@ -24,14 +24,18 @@ public:
const char *advance();
const char *rewind();
const char *filename() const;
void next_file() { advance(); }
const char *checkpoint();
void restore(const char *);
bool start();
void stop();
void reset() { stop(); start(); }
void select(uint8_t f) { _current = f; }
void next_device();
uint8_t device() const { return _current; }
private:
const char *_programs;