FreeNOS
Public Types | Public Member Functions | Private Types | Private Attributes | Static Private Attributes
Broadcom2836 Class Reference

Broadcom 2836 device specific I/O configuration. More...

#include <Broadcom2836.h>

Public Types

enum  Timer { PhysicalTimer1 }
 Hardware timers available in BCM 2836. More...
 
enum  Result { Success, NotFound, IOError, FrequencyError }
 Result code. More...
 

Public Member Functions

 Broadcom2836 (Size coreId)
 Constructor. More...
 
Result initialize ()
 Initialize the Controller. More...
 
Result setCoreTimerIrq (Timer timer, bool enable)
 Set Core Timer interrupt. More...
 
bool getCoreTimerIrqStatus (Timer timer) const
 Get core timer interrupt status. More...
 

Private Types

enum  Registers { CorePrescalerRegister = 0x0008, CoreTimerRegister = 0x0040, CoreIrqRegister = 0x0060, CoreSetMailboxRegister = 0x0080 }
 Hardware registers. More...
 

Private Attributes

Size m_coreId
 Core identifier. More...
 
ARMIO m_io
 I/O instance. More...
 

Static Private Attributes

static const Address IOBase = 0x40000000
 Base address for the BCM2836 I/O configuration. More...
 

Detailed Description

Broadcom 2836 device specific I/O configuration.

Definition at line 38 of file Broadcom2836.h.

Member Enumeration Documentation

◆ Registers

Hardware registers.

Enumerator
CorePrescalerRegister 
CoreTimerRegister 
CoreIrqRegister 
CoreSetMailboxRegister 

Definition at line 48 of file Broadcom2836.h.

◆ Result

Result code.

Enumerator
Success 
NotFound 
IOError 
FrequencyError 

Definition at line 69 of file Broadcom2836.h.

◆ Timer

Hardware timers available in BCM 2836.

Enumerator
PhysicalTimer1 

Definition at line 61 of file Broadcom2836.h.

Constructor & Destructor Documentation

◆ Broadcom2836()

Broadcom2836::Broadcom2836 ( Size  coreId)

Constructor.

Definition at line 20 of file Broadcom2836.cpp.

References IOBase, m_io, and IO::setBase().

Member Function Documentation

◆ getCoreTimerIrqStatus()

bool Broadcom2836::getCoreTimerIrqStatus ( Timer  timer) const

Get core timer interrupt status.

Parameters
timerTimer to check for interrupt status
Returns
True if timer IRQ is raised, false otherwise.

Definition at line 52 of file Broadcom2836.cpp.

References CoreIrqRegister, m_coreId, m_io, PhysicalTimer1, and ARMIO::read().

◆ initialize()

Broadcom2836::Result Broadcom2836::initialize ( )

Initialize the Controller.

Returns
Result code

Definition at line 26 of file Broadcom2836.cpp.

References Success.

◆ setCoreTimerIrq()

Broadcom2836::Result Broadcom2836::setCoreTimerIrq ( Timer  timer,
bool  enable 
)

Set Core Timer interrupt.

Parameters
timerTimer to set
enableTrue to enable the timer interrupt
Returns
Result code

Definition at line 31 of file Broadcom2836.cpp.

References CoreTimerRegister, m_coreId, m_io, NotFound, PhysicalTimer1, ARMIO::set(), Success, and ARMIO::unset().

Field Documentation

◆ IOBase

const Address Broadcom2836::IOBase = 0x40000000
staticprivate

Base address for the BCM2836 I/O configuration.

Definition at line 43 of file Broadcom2836.h.

Referenced by Broadcom2836().

◆ m_coreId

Size Broadcom2836::m_coreId
private

Core identifier.

Definition at line 113 of file Broadcom2836.h.

Referenced by getCoreTimerIrqStatus(), and setCoreTimerIrq().

◆ m_io

ARMIO Broadcom2836::m_io
private

I/O instance.

Definition at line 116 of file Broadcom2836.h.

Referenced by Broadcom2836(), getCoreTimerIrqStatus(), and setCoreTimerIrq().


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