11 #include <satcat5/cfgbus_interrupt.h>
16 static constexpr u32 IRQ_DISABLE = 0;
17 static constexpr u32 IRQ_ENABLE = (1u << 0);
18 static constexpr u32 IRQ_REQUEST = (1u << 1);
22 , m_ctrl(SATCAT5_NULL_REGISTER)
31 , m_ctrl(cfg->get_register(devaddr, regaddr))
38 #if SATCAT5_ALLOW_DELETION
39 Interrupt::~Interrupt()
41 if (!!m_ctrl) *m_ctrl = 0;
52 }
else if (*m_ctrl & IRQ_REQUEST) {
60 if (!!m_ctrl) *m_ctrl = IRQ_ENABLE;
65 if (!!m_ctrl) *m_ctrl = IRQ_DISABLE;
void unregister_irq(satcat5::cfg::Interrupt *obj)
Remove an interrupt handler.
void register_irq(satcat5::cfg::Interrupt *obj)
Add an interrupt handler.
Event-handler for individual ConfigBus interrupts.
void irq_disable()
Temporarily disable this interrupt.
Interrupt(satcat5::cfg::ConfigBus *cfg)
Nonstandard constructor.
virtual void irq_event()=0
Interrupt service routine.
void irq_check()
Check if this interrupt may need service.
void irq_enable()
Enable this interrupt.