mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-09 23:50:38 +00:00
add seek()
This commit is contained in:
parent
c2eaeb4089
commit
b20119558a
2
acia.h
2
acia.h
@ -46,6 +46,6 @@ public:
|
||||
static const uint8_t eri = 1 << 7; // enable receive interrupt
|
||||
|
||||
private:
|
||||
serialio *_device;
|
||||
class serialio *_device;
|
||||
};
|
||||
#endif
|
||||
|
@ -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)
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
|
||||
bool start();
|
||||
void stop();
|
||||
bool seek(uint32_t pos);
|
||||
|
||||
uint8_t read() { return _buf[_pos++]; }
|
||||
bool more();
|
||||
|
Loading…
Reference in New Issue
Block a user