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

Implements the UART interface on the BeagleBoard. More...

#include <Serial.h>

+ Inheritance diagram for ArmBeagleSerial:
+ Collaboration diagram for ArmBeagleSerial:

Public Member Functions

virtual void setBase (uintptr_t nBaseAddr)
 
virtual char read ()
 
virtual char readNonBlock ()
 
virtual void write (char c)
 
virtual void interrupt (size_t nInterruptNumber, InterruptState &state)
 
- Public Member Functions inherited from Serial
void write (const char *c)
 

Private Types

enum  RegisterOffsets {
  DLL_REG = 0x00, RHR_REG = 0x00, THR_REG = 0x00, DLH_REG = 0x04,
  IER_REG = 0x04, IIR_REG = 0x08, FCR_REG = 0x08, EFR_REG = 0x08,
  LCR_REG = 0x0C, MCR_REG = 0x10, XON1_ADDR1_REG = 0x10, LSR_REG = 0x14,
  XON2_ADDR2_REG = 0x14, MSR_REG = 0x18, TCR_REG = 0x18, XOFF1_REG = 0x18,
  SPR_REG = 0x1C, TLR_REG = 0x1C, XOFF2_REG = 0x1C, MDR1_REG = 0x20,
  MDR2_REG = 0x24, USAR_REG = 0x38, SCR_REG = 0x40, SSR_REG = 0x44,
  MVR_REG = 0x50, SYSC_REG = 0x54, SYSS_REG = 0x58, WER_REG = 0x5C
}
 

Private Member Functions

void softReset ()
 Perform a software reset of this UART. More...
 
bool setFifoDefaults ()
 Reset the FIFOs and DMA to default values. More...
 
bool configureProtocol ()
 
bool disableFlowControl ()
 Disables hardware flow control on the UART. More...
 

Private Attributes

volatile uint8_t * m_Base
 
MemoryRegion m_BaseRegion
 

Additional Inherited Members

- Protected Member Functions inherited from InterruptHandler
virtual ~InterruptHandler ()
 

Detailed Description

Implements the UART interface on the BeagleBoard.

Definition at line 28 of file kernel/machine/arm_beagle/Serial.h.

Member Function Documentation

bool ArmBeagleSerial::configureProtocol ( )
private

Configure the UART protocol to defaults - 115200 baud, 8 character bits, no parity, 1 stop bit. Enables the UART for output as a side effect.

Configure protocol, baud and interrupts

Definition at line 245 of file arm_beagle/Serial.cc.

bool ArmBeagleSerial::disableFlowControl ( )
private

Disables hardware flow control on the UART.

Configure hardware flow control

Definition at line 302 of file arm_beagle/Serial.cc.

void ArmBeagleSerial::interrupt ( size_t  nInterruptNumber,
InterruptState &  state 
)
virtual

Called when the handler is registered with the interrupt manager and the interrupt occurred

Parameters
[in]nInterruptNumberthe interrupt number
[in]statereference to the state before the interrupt
Todo:
Queue somewhere for input
Todo:
Handle
Todo:
Handle

Implements InterruptHandler.

Definition at line 78 of file arm_beagle/Serial.cc.

void ArmBeagleSerial::setBase ( uintptr_t  nBaseAddr)
virtual
Todo:
make this generic for Mmaped and port IO.
Todo:
this is the UART3 IRQ... needs to be set for each UART

Implements Serial.

Definition at line 33 of file arm_beagle/Serial.cc.

References PhysicalMemoryManager::continuous, InterruptManager::instance(), PhysicalMemoryManager::instance(), VirtualAddressSpace::KernelMode, InterruptManager::registerInterruptHandler(), and VirtualAddressSpace::Write.

bool ArmBeagleSerial::setFifoDefaults ( )
private

Reset the FIFOs and DMA to default values.

Configure FIFOs and DMA

Definition at line 185 of file arm_beagle/Serial.cc.

void ArmBeagleSerial::softReset ( )
private

Perform a software reset of this UART.

Note
Page/section references are from the OMAP35xx Technical Reference Manual

Reset the UART. Page 2677, section 17.5.1.1.1

Definition at line 170 of file arm_beagle/Serial.cc.

Member Data Documentation

volatile uint8_t* ArmBeagleSerial::m_Base
private

Base address for MMIO

Definition at line 92 of file kernel/machine/arm_beagle/Serial.h.

MemoryRegion ArmBeagleSerial::m_BaseRegion
private

MemoryRegion for the MMIO base

Definition at line 95 of file kernel/machine/arm_beagle/Serial.h.


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