openMSX
Classes | Public Types | Public Member Functions | Public Attributes | 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]

Classes

struct  SyncRecv
 
struct  SyncTrans
 

Public Types

enum  CmdFaze { FAZE_MODE , FAZE_SYNC1 , FAZE_SYNC2 , FAZE_CMD }
 
- Public Types inherited from openmsx::SerialDataInterface
enum  DataBits { DATA_5 = 5 , DATA_6 = 6 , DATA_7 = 7 , DATA_8 = 8 }
 
enum  StopBits { STOP_INV = 0 , STOP_1 = 2 , STOP_15 = 3 , STOP_2 = 4 }
 
enum  ParityBit { 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, ParityBit 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)
 

Public Attributes

openmsx::I8251::SyncRecv syncRecv
 
openmsx::I8251::SyncTrans syncTrans
 

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

◆ CmdFaze

Enumerator
FAZE_MODE 
FAZE_SYNC1 
FAZE_SYNC2 
FAZE_CMD 

Definition at line 74 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 294 of file I8251.cc.

References openmsx::I8251Interface::signal().

◆ execTrans()

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

Definition at line 301 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 348 of file I8251.cc.

References openmsx::Schedulable::restoreOld(), syncRecv, and syncTrans.

◆ setDataBits()

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

◆ setParityBit()

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

◆ setStopBits()

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

◆ writeIO()

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

Member Data Documentation

◆ syncRecv

openmsx::I8251::SyncRecv openmsx::I8251::syncRecv

◆ syncTrans

openmsx::I8251::SyncTrans openmsx::I8251::syncTrans

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