|
SatCat5
|
Event-handler for individual ConfigBus interrupts.
ConfigBus defines a single interrupt channel that is shared by all attached peripherals.
Definition at line 19 of file cfgbus_interrupt.h.
#include <cfgbus_interrupt.h>
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::Interrupt * | m_next |
|
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.
|
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.
| 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.
| 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.
| 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.
|
pure virtual |
Interrupt service routine.
(Child class must override this method.)
Implemented in satcat5::router2::Offload, satcat5::port::Mailmap, satcat5::port::Mailbox, satcat5::cfg::Timer, satcat5::test::MockInterrupt, satcat5::cfg::Uart, satcat5::cfg::MultiSerial, and satcat5::cfg::Hdlc.