SatCat5
satcat5::cfg::Interrupt Class Referenceabstract

Detailed Description

Event-handler for individual ConfigBus interrupts.

ConfigBus defines a single interrupt channel that is shared by all attached peripherals.

See also
interrupts.h, cfg::ConfigBusMmap. In contrast, this class defines the interrupt servicing and callback API used for individual ConfigBus peripherals.

Definition at line 19 of file cfgbus_interrupt.h.

#include <cfgbus_interrupt.h>

Inheritance diagram for satcat5::cfg::Interrupt:
[legend]
Collaboration diagram for satcat5::cfg::Interrupt:
[legend]

Public Member Functions

void irq_check ()
 Check if this interrupt may need service. More...
 
virtual void irq_event ()=0
 Interrupt service routine. More...
 
void irq_enable ()
 Enable this interrupt. More...
 
void irq_disable ()
 Temporarily disable this interrupt. More...
 

Protected Member Functions

 Interrupt (satcat5::cfg::ConfigBus *cfg)
 Nonstandard constructor. More...
 
 Interrupt (satcat5::cfg::ConfigBus *cfg, unsigned devaddr, unsigned regaddr)
 Standard constructor. More...
 

Private Attributes

satcat5::cfg::ConfigBus *const m_cfg
 
satcat5::cfg::Register m_ctrl
 
satcat5::cfg::Interruptm_next
 

Constructor & Destructor Documentation

◆ Interrupt() [1/2]

Interrupt::Interrupt ( satcat5::cfg::ConfigBus cfg)
explicitprotected

Nonstandard constructor.

Use this alternate constructor for peripherals that assert ConfigBus interrupts without using "cfgbus_interrupt" block. Registers with the ConfigBus host but takes no further action. Methods irq_enable and irq_disable cannot be used. Only children should create or destroy base class.

Definition at line 20 of file cfgbus_interrupt.cc.

◆ Interrupt() [2/2]

Interrupt::Interrupt ( satcat5::cfg::ConfigBus cfg,
unsigned  devaddr,
unsigned  regaddr 
)
protected

Standard constructor.

Only children should create or destroy base class. Use this constructor with the standard "cfgbus_interrupt" peripheral defined in "cfgbus_core.vhd".

Definition at line 28 of file cfgbus_interrupt.cc.

Member Function Documentation

◆ irq_check()

void Interrupt::irq_check ( )

Check if this interrupt may need service.

If the interrupt needs service, this calls irq_event.

Definition at line 46 of file cfgbus_interrupt.cc.

◆ irq_disable()

void Interrupt::irq_disable ( )

Temporarily disable this interrupt.

Interrupts are enabled by default, but some peripherals may wish to temporary toggle this setting. For use with standard "cfgbus_interrupt" only.

Definition at line 63 of file cfgbus_interrupt.cc.

◆ irq_enable()

void Interrupt::irq_enable ( )

Enable this interrupt.

Interrupts are enabled by default, but some peripherals may wish to temporary toggle this setting. For use with standard "cfgbus_interrupt" only.

Definition at line 58 of file cfgbus_interrupt.cc.

◆ irq_event()

virtual void satcat5::cfg::Interrupt::irq_event ( )
pure virtual

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