1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-06-18 14:29:32 +00:00

add seek()

This commit is contained in:
steve 2023-05-25 15:05:04 +01:00
parent c2eaeb4089
commit b20119558a
3 changed files with 11 additions and 1 deletions

2
acia.h
View File

@ -46,6 +46,6 @@ public:
static const uint8_t eri = 1 << 7; // enable receive interrupt
private:
serialio *_device;
class serialio *_device;
};
#endif

View File

@ -22,6 +22,15 @@ static File file;
static Dir dir;
#endif
bool flash_filer::seek(uint32_t pos)
{
#if defined(USE_SD) || defined(USE_SPIFFS) || defined(USE_FS)
_pos = _len = 0;
return file.seek(pos);
#endif
return false;
}
bool flash_filer::start()
{
#if defined(USE_FS)

View File

@ -15,6 +15,7 @@ public:
bool start();
void stop();
bool seek(uint32_t pos);
uint8_t read() { return _buf[_pos++]; }
bool more();