SatCat5
satcat5::irq::Handler Class Referenceabstract

Detailed Description

Parent object for receiving interrupt-handler callbacks.

SatCat5 interrupt-API concepts.

Parent class for any object that responds to a specific hardware interrupt. Examples include cfg::ConfigBusMmap, which shares a single hardware interrupt amongst all ConfigBus peripherals.

Child class MUST:

Interrupt handlers must execute very quickly because they block other interrupt handlers from executing. Handlers that can wait a few milliseconds to respond should consider deferring that work using an OnDemand event handler. (i.e., By clearing the hardware interrupt and calling request_poll().)

See also
satcat5::irq::Adapter satcat5::poll::OnDemand

Definition at line 187 of file satcat5/interrupts.h.

#include <interrupts.h>

Inheritance diagram for satcat5::irq::Handler:
[legend]
Collaboration diagram for satcat5::irq::Handler:
[legend]

Public Attributes

const char *const m_label
 Human-readable label, for debugging.
 
const int m_irq_idx
 IRQ index for this interrupt handler.
 

Protected Member Functions

 Handler (const char *lbl, int irq)
 Only children should create or destroy base class.
 
virtual void irq_event ()=0
 Method called whenever an interrupt is triggered.
 

Protected Attributes

u32 m_max_irqtime
 Statistics tracking for time consumed by this interrupt.
 

Private Attributes

satcat5::irq::Handlerm_next
 

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