openMSX
RS232Device.hh
Go to the documentation of this file.
1 #ifndef RS232DEVICE_HH
2 #define RS232DEVICE_HH
3 
4 #include "Pluggable.hh"
5 #include "SerialDataInterface.hh"
6 
7 namespace openmsx {
8 
10 {
11 public:
12  // Pluggable (part)
13  std::string_view getClass() const final override;
14 
15  // input
16  virtual void signal(EmuTime::param time) = 0;
17 
18  // SerialDataInterface (part) (output)
19  void setDataBits(DataBits bits) override;
20  void setStopBits(StopBits bits) override;
21  void setParityBit(bool enable, ParityBit parity) override;
22 
23  // control
24  virtual bool getCTS(EmuTime::param time) const;
25  virtual bool getDSR(EmuTime::param time) const;
26  virtual void setDTR(bool status, EmuTime::param time);
27  virtual void setRTS(bool status, EmuTime::param time);
28 };
29 
30 } // namespace openmsx
31 
32 #endif
void setDataBits(DataBits bits) override
Definition: RS232Device.cc:10
void setStopBits(StopBits bits) override
Definition: RS232Device.cc:15
virtual bool getCTS(EmuTime::param time) const
Definition: RS232Device.cc:25
std::string_view getClass() const final override
A pluggable belongs to a certain class.
Definition: RS232Device.cc:5
void setParityBit(bool enable, ParityBit parity) override
Definition: RS232Device.cc:20
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
virtual void setDTR(bool status, EmuTime::param time)
Definition: RS232Device.cc:35
virtual void setRTS(bool status, EmuTime::param time)
Definition: RS232Device.cc:40
virtual bool getDSR(EmuTime::param time) const
Definition: RS232Device.cc:30
virtual void signal(EmuTime::param time)=0