1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-27 05:32:04 +00:00
r65emu/serial_filer.h

25 lines
472 B
C
Raw Normal View History

2019-02-12 18:19:09 +00:00
#ifndef __SERIAL_FILER_H__
#define __SERIAL_FILER_H__
2019-02-14 07:58:51 +00:00
// see https://playground.arduino.cc/Interfacing/LinuxTTY
// FIXME: do this in minicom config file
2019-02-12 18:19:09 +00:00
class serial_filer: public filer {
public:
2019-02-14 07:58:51 +00:00
const char *advance();
2019-02-14 18:02:26 +00:00
const char *rewind() { _currsp = 0; return advance(); }
2019-02-12 18:19:09 +00:00
const char *checkpoint();
void restore(const char *);
bool start(const char *);
void stop() {}
uint8_t read();
bool more();
void write(uint8_t);
2019-02-14 18:02:26 +00:00
private:
unsigned _currsp;
2019-02-12 18:19:09 +00:00
};
#endif