openMSX
SerialDataInterface.hh
Go to the documentation of this file.
1 #ifndef SERIALDATAINTERFACE_HH
2 #define SERIALDATAINTERFACE_HH
3 
4 #include "EmuTime.hh"
5 #include "openmsx.hh"
6 
7 namespace openmsx {
8 
10 {
11 public:
12  enum DataBits {
13  DATA_5 = 5, DATA_6 = 6, DATA_7 = 7, DATA_8 = 8
14  };
15  enum StopBits {
16  STOP_INV = 0, STOP_1 = 2, STOP_15 = 3, STOP_2 = 4
17  };
18 
19  enum ParityBit {
20  EVEN = 0, ODD = 1
21  };
22 
23  virtual void setDataBits(DataBits bits) = 0;
24  virtual void setStopBits(StopBits bits) = 0;
25  virtual void setParityBit(bool enable, ParityBit parity) = 0;
26  virtual void recvByte(byte value, EmuTime::param time) = 0;
27 
28 protected:
29  ~SerialDataInterface() = default;
30 };
31 
32 } // namespace openmsx
33 
34 #endif
openmsx.hh
openmsx::SerialDataInterface::DATA_7
@ DATA_7
Definition: SerialDataInterface.hh:13
openmsx::SerialDataInterface
Definition: SerialDataInterface.hh:10
openmsx::SerialDataInterface::setParityBit
virtual void setParityBit(bool enable, ParityBit parity)=0
openmsx::SerialDataInterface::DATA_5
@ DATA_5
Definition: SerialDataInterface.hh:13
openmsx::SerialDataInterface::recvByte
virtual void recvByte(byte value, EmuTime::param time)=0
openmsx::SerialDataInterface::setDataBits
virtual void setDataBits(DataBits bits)=0
openmsx::SerialDataInterface::DATA_6
@ DATA_6
Definition: SerialDataInterface.hh:13
openmsx::SerialDataInterface::DATA_8
@ DATA_8
Definition: SerialDataInterface.hh:13
openmsx::SerialDataInterface::STOP_1
@ STOP_1
Definition: SerialDataInterface.hh:16
openmsx::SerialDataInterface::StopBits
StopBits
Definition: SerialDataInterface.hh:15
openmsx::SerialDataInterface::STOP_15
@ STOP_15
Definition: SerialDataInterface.hh:16
openmsx::SerialDataInterface::STOP_INV
@ STOP_INV
Definition: SerialDataInterface.hh:16
openmsx::SerialDataInterface::STOP_2
@ STOP_2
Definition: SerialDataInterface.hh:16
openmsx::SerialDataInterface::DataBits
DataBits
Definition: SerialDataInterface.hh:12
openmsx::SerialDataInterface::ODD
@ ODD
Definition: SerialDataInterface.hh:20
openmsx::SerialDataInterface::~SerialDataInterface
~SerialDataInterface()=default
EmuTime.hh
openmsx::SerialDataInterface::ParityBit
ParityBit
Definition: SerialDataInterface.hh:19
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::SerialDataInterface::EVEN
@ EVEN
Definition: SerialDataInterface.hh:20
openmsx::SerialDataInterface::setStopBits
virtual void setStopBits(StopBits bits)=0