1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-05-28 12:41:32 +00:00
r65emu/serial_filer.h
2019-02-14 18:02:26 +00:00

25 lines
472 B
C++

#ifndef __SERIAL_FILER_H__
#define __SERIAL_FILER_H__
// see https://playground.arduino.cc/Interfacing/LinuxTTY
// FIXME: do this in minicom config file
class serial_filer: public filer {
public:
const char *advance();
const char *rewind() { _currsp = 0; return advance(); }
const char *checkpoint();
void restore(const char *);
bool start(const char *);
void stop() {}
uint8_t read();
bool more();
void write(uint8_t);
private:
unsigned _currsp;
};
#endif