FreeNOS
Public Member Functions | Private Attributes
BroadcomInterrupt Class Reference

Raspberry Pi Interrupt Controller implementation. More...

#include <BroadcomInterrupt.h>

Inheritance diagram for BroadcomInterrupt:
IntController

Public Member Functions

 BroadcomInterrupt ()
 Constructor. More...
 
virtual Result enable (uint vector)
 Enable an IRQ vector. More...
 
virtual Result disable (uint vector)
 Disable an IRQ vector. More...
 
virtual Result clear (uint vector)
 Clear an IRQ vector. More...
 
virtual Result nextPending (uint &irq)
 Retrieve the next pending interrupt (IRQ). More...
 
virtual bool isTriggered (uint vector)
 Check if an IRQ vector is set. More...
 
- Public Member Functions inherited from IntController
 IntController ()
 Constructor. More...
 
uint getBase () const
 Get interrupt number base offset. More...
 
virtual Result send (const uint targetCoreId, const uint irq)
 Send an inter-processor-interrupt (IPI). More...
 

Private Attributes

ARMIO m_io
 I/O instance. More...
 

Additional Inherited Members

- Public Types inherited from IntController
enum  Result {
  Success, InvalidIRQ, InvalidFrequency, IOError,
  NotFound
}
 Result codes. More...
 
- Protected Attributes inherited from IntController
uint m_base
 Interrupt number base offset. More...
 

Detailed Description

Raspberry Pi Interrupt Controller implementation.

Definition at line 45 of file BroadcomInterrupt.h.

Constructor & Destructor Documentation

◆ BroadcomInterrupt()

BroadcomInterrupt::BroadcomInterrupt ( )

Constructor.

Definition at line 37 of file BroadcomInterrupt.cpp.

References INTERRUPT_DISABLEIRQ1, INTERRUPT_DISABLEIRQ2, m_io, and ARMIO::write().

Member Function Documentation

◆ clear()

BroadcomInterrupt::Result BroadcomInterrupt::clear ( uint  vector)
virtual

Clear an IRQ vector.

Returns
Result code

Implements IntController.

Definition at line 84 of file BroadcomInterrupt.cpp.

References IntController::Success.

◆ disable()

BroadcomInterrupt::Result BroadcomInterrupt::disable ( uint  vector)
virtual

Disable an IRQ vector.

Returns
Result code

Implements IntController.

Definition at line 66 of file BroadcomInterrupt.cpp.

References INTERRUPT_DISABLEIRQ1, INTERRUPT_DISABLEIRQ2, m_io, IntController::Success, and ARMIO::write().

◆ enable()

BroadcomInterrupt::Result BroadcomInterrupt::enable ( uint  vector)
virtual

Enable an IRQ vector.

Returns
Result code

Implements IntController.

Definition at line 44 of file BroadcomInterrupt.cpp.

References INTERRUPT_ENABLEIRQ1, INTERRUPT_ENABLEIRQ2, m_io, IntController::Success, and ARMIO::write().

◆ isTriggered()

bool BroadcomInterrupt::isTriggered ( uint  vector)
virtual

Check if an IRQ vector is set.

Returns
Result code

Reimplemented from IntController.

Definition at line 103 of file BroadcomInterrupt.cpp.

References INTERRUPT_BASICPEND, INTERRUPT_IRQPEND1, INTERRUPT_IRQPEND2, m_io, and ARMIO::read().

Referenced by nextPending().

◆ nextPending()

BroadcomInterrupt::Result BroadcomInterrupt::nextPending ( uint irq)
virtual

Retrieve the next pending interrupt (IRQ).

Parameters
irqOutputs the next pending interrupt on Success
Returns
Result code.

Reimplemented from IntController.

Definition at line 89 of file BroadcomInterrupt.cpp.

References isTriggered(), IntController::NotFound, and IntController::Success.

Field Documentation

◆ m_io

ARMIO BroadcomInterrupt::m_io
private

I/O instance.

Definition at line 94 of file BroadcomInterrupt.h.

Referenced by BroadcomInterrupt(), disable(), enable(), and isTriggered().


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