openMSX
Classes | Public Types | Public Member Functions | List of all members
openmsx::I8251 Class Referencefinal

#include <I8251.hh>

Inheritance diagram for openmsx::I8251:
Inheritance graph
[legend]
Collaboration diagram for openmsx::I8251:
Collaboration graph
[legend]

Public Types

enum class  CmdPhase { MODE , SYNC1 , SYNC2 , CMD }
 
- Public Types inherited from openmsx::SerialDataInterface
enum class  DataBits { D5 = 5 , D6 = 6 , D7 = 7 , D8 = 8 }
 
enum class  StopBits { INV = 0 , S1 = 2 , S1_5 = 3 , S2 = 4 }
 
enum class  Parity { EVEN = 0 , ODD = 1 }
 

Public Member Functions

 I8251 (Scheduler &scheduler, I8251Interface &interface, EmuTime::param time)
 
void reset (EmuTime::param time)
 
byte readIO (word port, EmuTime::param time)
 
byte peekIO (word port, EmuTime::param time) const
 
void writeIO (word port, byte value, EmuTime::param time)
 
ClockPingetClockPin ()
 
bool isRecvReady () const
 
bool isRecvEnabled () const
 
void setDataBits (DataBits bits) override
 
void setStopBits (StopBits bits) override
 
void setParityBit (bool enable, Parity parity) override
 
void recvByte (byte value, EmuTime::param time) override
 
void execRecv (EmuTime::param time)
 
void execTrans (EmuTime::param time)
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::SerialDataInterface
 ~SerialDataInterface ()=default
 

Detailed Description

Definition at line 31 of file I8251.hh.

Member Enumeration Documentation

◆ CmdPhase

enum class openmsx::I8251::CmdPhase
strong
Enumerator
MODE 
SYNC1 
SYNC2 
CMD 

Definition at line 57 of file I8251.hh.

Constructor & Destructor Documentation

◆ I8251()

openmsx::I8251::I8251 ( Scheduler scheduler,
I8251Interface interface,
EmuTime::param  time 
)

Definition at line 47 of file I8251.cc.

References reset().

Member Function Documentation

◆ execRecv()

void openmsx::I8251::execRecv ( EmuTime::param  time)

Definition at line 297 of file I8251.cc.

References openmsx::I8251Interface::signal().

◆ execTrans()

void openmsx::I8251::execTrans ( EmuTime::param  time)

Definition at line 304 of file I8251.cc.

References openmsx::SerialDataInterface::recvByte().

◆ getClockPin()

ClockPin & openmsx::I8251::getClockPin ( )
inline

Definition at line 40 of file I8251.hh.

Referenced by openmsx::MSXFacMidiInterface::MSXFacMidiInterface().

◆ isRecvEnabled()

bool openmsx::I8251::isRecvEnabled ( ) const

◆ isRecvReady()

bool openmsx::I8251::isRecvReady ( ) const
inline

◆ peekIO()

byte openmsx::I8251::peekIO ( word  port,
EmuTime::param  time 
) const

◆ readIO()

byte openmsx::I8251::readIO ( word  port,
EmuTime::param  time 
)

Definition at line 77 of file I8251.cc.

References UNREACHABLE.

Referenced by openmsx::MSXFacMidiInterface::readIO(), and openmsx::MSXMidi::readIO().

◆ recvByte()

void openmsx::I8251::recvByte ( byte  value,
EmuTime::param  time 
)
overridevirtual

◆ reset()

void openmsx::I8251::reset ( EmuTime::param  time)

◆ serialize()

template<typename Archive >
void openmsx::I8251::serialize ( Archive &  ar,
unsigned  version 
)

Definition at line 351 of file I8251.cc.

References openmsx::Schedulable::restoreOld().

◆ setDataBits()

void openmsx::I8251::setDataBits ( DataBits  bits)
inlineoverridevirtual

◆ setParityBit()

void openmsx::I8251::setParityBit ( bool  enable,
Parity  parity 
)
overridevirtual

◆ setStopBits()

void openmsx::I8251::setStopBits ( StopBits  bits)
inlineoverridevirtual

◆ writeIO()

void openmsx::I8251::writeIO ( word  port,
byte  value,
EmuTime::param  time 
)

Definition at line 96 of file I8251.cc.

References CMD, MODE, SYNC1, SYNC2, and UNREACHABLE.

Referenced by openmsx::MSXFacMidiInterface::writeIO(), and openmsx::MSXMidi::writeIO().


The documentation for this class was generated from the following files: