mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-26 14:29:31 +00:00
25 lines
472 B
C++
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
|