openMSX
serial
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
9
class
SerialDataInterface
10
{
11
public
:
12
enum class
DataBits
{
13
D5
= 5,
D6
= 6,
D7
= 7,
D8
= 8
14
};
15
enum class
StopBits
{
16
INV
= 0,
S1
= 2,
S1_5
= 3,
S2
= 4
17
};
18
enum class
Parity
{
19
EVEN
= 0,
ODD
= 1
20
};
21
22
virtual
void
setDataBits
(
DataBits
bits) = 0;
23
virtual
void
setStopBits
(
StopBits
bits) = 0;
24
virtual
void
setParityBit
(
bool
enable,
Parity
parity) = 0;
25
virtual
void
recvByte
(
byte
value, EmuTime::param time) = 0;
26
27
protected
:
28
~SerialDataInterface
() =
default
;
29
};
30
31
}
// namespace openmsx
32
33
#endif
EmuTime.hh
openmsx::SerialDataInterface
Definition
SerialDataInterface.hh:10
openmsx::SerialDataInterface::recvByte
virtual void recvByte(byte value, EmuTime::param time)=0
openmsx::SerialDataInterface::setStopBits
virtual void setStopBits(StopBits bits)=0
openmsx::SerialDataInterface::Parity
Parity
Definition
SerialDataInterface.hh:18
openmsx::SerialDataInterface::Parity::ODD
@ ODD
openmsx::SerialDataInterface::Parity::EVEN
@ EVEN
openmsx::SerialDataInterface::setParityBit
virtual void setParityBit(bool enable, Parity parity)=0
openmsx::SerialDataInterface::DataBits
DataBits
Definition
SerialDataInterface.hh:12
openmsx::SerialDataInterface::DataBits::D7
@ D7
openmsx::SerialDataInterface::DataBits::D8
@ D8
openmsx::SerialDataInterface::DataBits::D6
@ D6
openmsx::SerialDataInterface::DataBits::D5
@ D5
openmsx::SerialDataInterface::setDataBits
virtual void setDataBits(DataBits bits)=0
openmsx::SerialDataInterface::StopBits
StopBits
Definition
SerialDataInterface.hh:15
openmsx::SerialDataInterface::StopBits::S1_5
@ S1_5
openmsx::SerialDataInterface::StopBits::INV
@ INV
openmsx::SerialDataInterface::StopBits::S1
@ S1
openmsx::SerialDataInterface::StopBits::S2
@ S2
openmsx::SerialDataInterface::~SerialDataInterface
~SerialDataInterface()=default
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
openmsx.hh
Generated on Fri Oct 11 2024 19:13:47 for openMSX by
1.9.8