The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
X86Serial Class Reference

#include <Serial.h>

+ Inheritance diagram for X86Serial:
+ Collaboration diagram for X86Serial:

Public Member Functions

virtual void setBase (uintptr_t nBaseAddr)
 
virtual bool hasData ()
 
virtual char read ()
 
virtual char readNonBlock ()
 
virtual void write (char c)
 
- Public Member Functions inherited from Serial
virtual void write_str (const char *c)
 
virtual void write_str (const char *c, size_t len)
 
virtual void write_str (const Cord &cord)
 
template<unsigned int N>
void write_str (const StaticCord< N > &cord)
 
template<unsigned int N>
void write_str (const char(&c)[N])
 
template<unsigned int N>
void write_str (const StaticString< N >(&c))
 

Private Member Functions

bool waitForStatus (uint8_t mask)
 
bool isConnected ()
 

Private Attributes

IoPort m_Port
 
bool m_Present
 

Detailed Description

Serial device abstraction.

Definition at line 42 of file kernel/machine/mach_pc/Serial.h.

Constructor & Destructor Documentation

◆ X86Serial()

X86Serial::X86Serial ( )

Definition at line 26 of file mach_pc/Serial.cc.

◆ ~X86Serial()

X86Serial::~X86Serial ( )
virtual

Definition at line 28 of file mach_pc/Serial.cc.

Member Function Documentation

◆ hasData()

bool X86Serial::hasData ( )
virtual

Implements Serial.

Definition at line 61 of file mach_pc/Serial.cc.

◆ isConnected()

bool X86Serial::isConnected ( )
private

Definition at line 101 of file mach_pc/Serial.cc.

◆ read()

char X86Serial::read ( )
virtual

Implements Serial.

Definition at line 65 of file mach_pc/Serial.cc.

◆ readNonBlock()

char X86Serial::readNonBlock ( )
virtual

Implements Serial.

Definition at line 74 of file mach_pc/Serial.cc.

◆ setBase()

void X86Serial::setBase ( uintptr_t  nBaseAddr)
virtual
Todo:
make this generic for Mmaped and port IO.

Implements Serial.

Definition at line 30 of file mach_pc/Serial.cc.

References IoPort::allocate(), Hex, IoPort::read8(), and IoPort::write8().

Referenced by Pc::initialise().

+ Here is the caller graph for this function:

◆ waitForStatus()

bool X86Serial::waitForStatus ( uint8_t  mask)
private

Definition at line 92 of file mach_pc/Serial.cc.

◆ write()

void X86Serial::write ( char  c)
virtual

Implements Serial.

Definition at line 83 of file mach_pc/Serial.cc.

Member Data Documentation

◆ m_Port

IoPort X86Serial::m_Port
private

Definition at line 56 of file kernel/machine/mach_pc/Serial.h.

◆ m_Present

bool X86Serial::m_Present
private

Definition at line 57 of file kernel/machine/mach_pc/Serial.h.


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