The Pedigree Project
0.1
|
#include <Serial.h>
Public Member Functions | |
PPCSerial () | |
~PPCSerial () | |
virtual void | setBase (uintptr_t nBaseAddr) |
virtual void | write (char c) |
virtual char | read () |
virtual char | readNonBlock () |
Public Member Functions inherited from Serial | |
void | write (const char *c) |
Private Member Functions | |
PPCSerial (const PPCSerial &) | |
PPCSerial & | operator= (const PPCSerial &) |
bool | isConnected () |
Private Attributes | |
const char * | m_pBuffer |
Implements a driver for the Serial connection of the malta's UART.
Base for UART registers: 0x1F000900 Register offsets: RXTX: 0x00 Receive/Transmit char register. INTEN: 0x08 Interrupt enable register. IIFIFO: 0x10 Read: Interrupt identification, Write: FIFO control. LCTRL: 0x18 Line control register. MCTRL: 0x20 Modem control register. LSTAT: 0x28 Line status register. MSTAT: 0x30 Modem status register. SCRATCH: 0x38 Scratch register.
Definition at line 41 of file kernel/machine/ppc_common/Serial.h.
PPCSerial::PPCSerial | ( | ) |
Default constructor, does nothing.
Definition at line 26 of file ppc_common/Serial.cc.
PPCSerial::~PPCSerial | ( | ) |
Destructor.
Definition at line 30 of file ppc_common/Serial.cc.
|
private |
The serial device's registers.
Definition at line 52 of file ppc_common/Serial.cc.
|
virtual |
Reads a character in from the serial port.
Implements Serial.
Definition at line 42 of file ppc_common/Serial.cc.
|
virtual |
Implements Serial.
Definition at line 34 of file ppc_common/Serial.cc.
|
virtual |
Writes a character out to the serial port.
Implements Serial.
Definition at line 38 of file ppc_common/Serial.cc.
|
private |
If we're returning a VT100 string (more than one char), this buffer pointer can be set to the current location in the string. If it is NULL, the next character is pulled from the port.
Definition at line 79 of file kernel/machine/ppc_common/Serial.h.