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 ~SerialDataInterface() {}
24  virtual void setDataBits(DataBits bits) = 0;
25  virtual void setStopBits(StopBits bits) = 0;
26  virtual void setParityBit(bool enable, ParityBit parity) = 0;
27  virtual void recvByte(byte value, EmuTime::param time) = 0;
28 };
29 
30 } // namespace openmsx
31 
32 #endif
virtual void setParityBit(bool enable, ParityBit parity)=0
virtual void setDataBits(DataBits bits)=0
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:33
virtual void recvByte(byte value, EmuTime::param time)=0
virtual void setStopBits(StopBits bits)=0