Class ArchAVR_ExtInt
Defined in File arch_avr_extint.h
Inheritance Relationships
Base Types
public Peripheral(Class Peripheral)public InterruptHandler(Class InterruptHandler)public SignalHook(Class SignalHook)
Class Documentation
-
class ArchAVR_ExtInt : public Peripheral, public InterruptHandler, public SignalHook
Implementation of a model for a External Interrupts peripheral for AVR series.
Public Functions
-
explicit ArchAVR_ExtInt(const ArchAVR_ExtIntConfig &config)
-
virtual bool init(Device &device) override
Virtual method called when the device is initialised. This is where the peripheral can allocate its I/O registers, interrupts or connect signals.
- Returns:
boolean indicates the success of all allocations.
-
virtual void reset() override
Virtual method called when the device is reset. Note that resetting I/O registers is only necessary here if their reset value is not zero.
-
virtual bool ctlreq(ctlreq_id_t req, ctlreq_data_t *data) override
Virtual method called for a CTL request. The method must return true if the request has been processed.
-
virtual void ioreg_write_handler(reg_addr_t addr, const ioreg_write_t &data) override
Virtual method called when the CPU is writing a I/O register allocated by this peripheral. The value has already been written.
- Parameters:
addr – the register address in I/O space
value – the new register content
-
virtual void interrupt_ack_handler(int_vect_t vector) override
Callback method called when a vector has been ACK’ed by the CPU. (i.e. the CPU is about to jump to the corresponding vector table entry)
The default implementation does nothing.
-
virtual void raised(const signal_data_t &sigdata, int hooktag) override
Pure virtual callback called during signal raises.
- Parameters:
sigdata – Data structure passed on when raising a signal
hooktag – integer passed on when connecting a hook to a signal. For hooks connected to several signals, it provides a mean to identify the caller.
-
explicit ArchAVR_ExtInt(const ArchAVR_ExtIntConfig &config)