The Pedigree Project
0.1
|
#include <Serial.h>
Classes | |
struct | serial |
Public Member Functions | |
MaltaSerial () | |
~MaltaSerial () | |
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 | |
MaltaSerial (const MaltaSerial &) | |
MaltaSerial & | operator= (const MaltaSerial &) |
bool | isConnected () |
Private Attributes | |
struct MaltaSerial::serial | PACKED |
const char * | m_pBuffer |
volatile serial * | m_pRegs |
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/malta/Serial.h.
MaltaSerial::MaltaSerial | ( | ) |
Default constructor, does nothing.
Definition at line 25 of file malta/Serial.cc.
MaltaSerial::~MaltaSerial | ( | ) |
Destructor.
Definition at line 29 of file malta/Serial.cc.
|
virtual |
Reads a character in from the serial port.
Implements Serial.
Definition at line 46 of file malta/Serial.cc.
References m_pRegs.
|
virtual |
Implements Serial.
Definition at line 33 of file malta/Serial.cc.
References m_pRegs.
|
virtual |
Writes a character out to the serial port.
Implements Serial.
Definition at line 39 of file malta/Serial.cc.
References m_pRegs.
|
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 90 of file kernel/machine/malta/Serial.h.
|
private |
The serial device's registers.
Definition at line 95 of file kernel/machine/malta/Serial.h.