18 virtual void setRxRDY(
bool status, EmuTime::param time) = 0;
19 virtual void setDTR(
bool status, EmuTime::param time) = 0;
20 virtual void setRTS(
bool status, EmuTime::param time) = 0;
22 [[nodiscard]]
virtual bool getDSR(EmuTime::param time) = 0;
23 [[nodiscard]]
virtual bool getCTS(EmuTime::param time) = 0;
24 virtual void signal(EmuTime::param time) = 0;
36 void reset(EmuTime::param time);
37 [[nodiscard]]
byte readIO(
word port, EmuTime::param time);
38 [[nodiscard]]
byte peekIO(
word port, EmuTime::param time)
const;
39 void writeIO(
word port,
byte value, EmuTime::param time);
48 void recvByte(
byte value, EmuTime::param time)
override;
53 template<
typename Archive>
54 void serialize(Archive& ar,
unsigned version);
62 void setMode(
byte newMode);
63 void writeCommand(
byte value, EmuTime::param time);
64 [[nodiscard]]
byte readStatus(EmuTime::param time);
65 [[nodiscard]]
byte readTrans(EmuTime::param time);
66 void writeTrans(
byte value, EmuTime::param time);
67 void send(
byte value, EmuTime::param time);
74 void executeUntil(EmuTime::param time)
override {
75 auto& i8251 =
OUTER(I8251, syncRecv);
81 explicit SyncTrans(Scheduler& s) :
Schedulable(s) {}
82 void executeUntil(EmuTime::param time)
override {
83 auto& i8251 =
OUTER(I8251, syncTrans);
84 i8251.execTrans(time);
88 I8251Interface& interface;
96 bool recvParityEnabled;
virtual bool getDSR(EmuTime::param time)=0
~I8251Interface()=default
virtual void setRxRDY(bool status, EmuTime::param time)=0
virtual void setDTR(bool status, EmuTime::param time)=0
virtual bool getCTS(EmuTime::param time)=0
virtual void setRTS(bool status, EmuTime::param time)=0
virtual void signal(EmuTime::param time)=0
byte peekIO(word port, EmuTime::param time) const
void setStopBits(StopBits bits) override
void recvByte(byte value, EmuTime::param time) override
void execRecv(EmuTime::param time)
void writeIO(word port, byte value, EmuTime::param time)
void reset(EmuTime::param time)
void setDataBits(DataBits bits) override
void execTrans(EmuTime::param time)
byte readIO(word port, EmuTime::param time)
void setParityBit(bool enable, Parity parity) override
void serialize(Archive &ar, unsigned version)
bool isRecvEnabled() const
Every class that wants to get scheduled at some point must inherit from this class.
Schedulable(const Schedulable &)=delete
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define OUTER(type, member)