simulavr  1.1.0
ExternalIRQPort Class Reference

Pin-change interrupt on all pins of a port. More...

#include <externalirq.h>

Inheritance diagram for ExternalIRQPort:

Public Member Functions

 ExternalIRQPort (IOSpecialReg *ctrl, HWPort *port)
 
 ExternalIRQPort (IOSpecialReg *ctrl, Pin *pinList[8])
 
void PinStateHasChanged (Pin *pin)
 
- Public Member Functions inherited from ExternalIRQ
 ExternalIRQ (IOSpecialReg *ctrl, int ctrlOffset, int ctrlBits)
 
virtual unsigned char set_from_reg (const IOSpecialReg *reg, unsigned char nv)
 
virtual unsigned char get_from_client (const IOSpecialReg *reg, unsigned char v)
 
- Public Member Functions inherited from IOSpecialRegClient
virtual ~IOSpecialRegClient ()
 
- Public Member Functions inherited from HasPinNotifyFunction
virtual ~HasPinNotifyFunction ()
 

Protected Attributes

bool state [8]
 saved states from all pins More...
 
Pinpins [8]
 pins of port for identifying, which bit is changed More...
 
unsigned int portSize
 how much pins the port controls More...
 
- Protected Attributes inherited from ExternalIRQ
int handlerIndex
 my own index on handler instance More...
 
ExternalIRQHandlerhandler
 reference to IRQ handler More...
 
int bitshift
 how many bits to shift to get mode from control register More...
 
unsigned char mask
 mask for extract mode from control register More...
 
unsigned char mode
 control mode from control register More...
 

Additional Inherited Members

- Protected Member Functions inherited from ExternalIRQ
void setHandlerIndex (ExternalIRQHandler *h, int idx)
 register handler and index for signaling interrupt More...
 
void fireInterrupt (void)
 fire a interrupt More...
 
virtual void ResetMode (void)
 Reset mode. More...
 
virtual void ChangeMode (unsigned char m)
 Handle change of control register. More...
 
virtual bool fireAgain (void)
 does the interrupt source fire again? (for interrupt on level) More...
 
virtual bool mustSetFlagOnFire (void)
 does fire interrupt set the interrupt flag? (level interrupt does this not!) More...
 

Detailed Description

Pin-change interrupt on all pins of a port.

Definition at line 137 of file externalirq.h.

Constructor & Destructor Documentation

◆ ExternalIRQPort() [1/2]

ExternalIRQPort::ExternalIRQPort ( IOSpecialReg ctrl,
HWPort port 
)

◆ ExternalIRQPort() [2/2]

ExternalIRQPort::ExternalIRQPort ( IOSpecialReg ctrl,
Pin pinList[8] 
)

Definition at line 238 of file externalirq.cpp.

References pins, portSize, Pin::RegisterCallback(), ExternalIRQ::ResetMode(), and state.

Member Function Documentation

◆ PinStateHasChanged()

void ExternalIRQPort::PinStateHasChanged ( Pin pin)
virtual

Implements HasPinNotifyFunction.

Definition at line 256 of file externalirq.cpp.

References ExternalIRQ::fireInterrupt(), ExternalIRQ::mode, pins, portSize, and state.

Member Data Documentation

◆ pins

Pin* ExternalIRQPort::pins[8]
protected

pins of port for identifying, which bit is changed

Definition at line 141 of file externalirq.h.

Referenced by ExternalIRQPort(), and PinStateHasChanged().

◆ portSize

unsigned int ExternalIRQPort::portSize
protected

how much pins the port controls

Definition at line 142 of file externalirq.h.

Referenced by ExternalIRQPort(), and PinStateHasChanged().

◆ state

bool ExternalIRQPort::state[8]
protected

saved states from all pins

Definition at line 140 of file externalirq.h.

Referenced by ExternalIRQPort(), and PinStateHasChanged().


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