r65emu/serial_filer.h

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