ExternalIRQSingle Class Reference

External interrupt (INT0, INT1...) on a single pin, one and 2 bit configuration. More...

#include <externalirq.h>

Inheritance diagram for ExternalIRQSingle:
Inheritance graph
[legend]
Collaboration diagram for ExternalIRQSingle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ExternalIRQSingle (IOSpecialReg *ctrl, int ctrlOffset, int ctrlBits, Pin *pin, bool _8515mode=false)
void ChangeMode (unsigned char m)
 Handle change of control register.
bool fireAgain (void)
 does the interrupt source fire again? (for interrupt on level)
bool mustSetFlagOnFire (void)
 does fire interrupt set the interrupt flag? (level interrupt does this not!)
void PinStateHasChanged (Pin *pin)

Protected Types

enum  { MODE_LEVEL_LOW = 0, MODE_EDGE_ALL = 1, MODE_EDGE_FALL = 2, MODE_EDGE_RISE = 3 }

Protected Attributes

bool state
 saved state from pin
bool twoBitMode
 IRQ is controlled by 2 mode bits.
bool mode8515
 at90s8515 don't support MODE_EDGE_ALL

Detailed Description

External interrupt (INT0, INT1...) on a single pin, one and 2 bit configuration.

Definition at line 110 of file externalirq.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
MODE_LEVEL_LOW 

Fire interrupt on low level.

MODE_EDGE_ALL 

Fire interrupt on any logical change.

MODE_EDGE_FALL 

Fire interrupt on falling edge.

MODE_EDGE_RISE 

Fire interrupt on rising edge.

Definition at line 117 of file externalirq.h.


Constructor & Destructor Documentation

ExternalIRQSingle::ExternalIRQSingle ( IOSpecialReg ctrl,
int  ctrlOffset,
int  ctrlBits,
Pin pin,
bool  _8515mode = false 
)

Definition at line 159 of file externalirq.cpp.

References mode8515, Pin::RegisterCallback(), ExternalIRQ::ResetMode(), state, and twoBitMode.

Here is the call graph for this function:


Member Function Documentation

void ExternalIRQSingle::ChangeMode ( unsigned char  m  )  [virtual]

Handle change of control register.

Reimplemented from ExternalIRQ.

Definition at line 203 of file externalirq.cpp.

References avr_warning, ExternalIRQ::mode, mode8515, MODE_EDGE_ALL, MODE_EDGE_FALL, and twoBitMode.

bool ExternalIRQSingle::fireAgain ( void   )  [virtual]

does the interrupt source fire again? (for interrupt on level)

Reimplemented from ExternalIRQ.

Definition at line 212 of file externalirq.cpp.

References ExternalIRQ::mode, MODE_LEVEL_LOW, and state.

bool ExternalIRQSingle::mustSetFlagOnFire ( void   )  [virtual]

does fire interrupt set the interrupt flag? (level interrupt does this not!)

Reimplemented from ExternalIRQ.

Definition at line 216 of file externalirq.cpp.

References ExternalIRQ::mode, and MODE_LEVEL_LOW.

void ExternalIRQSingle::PinStateHasChanged ( Pin pin  )  [virtual]

Implements HasPinNotifyFunction.

Definition at line 169 of file externalirq.cpp.

References ExternalIRQ::fireInterrupt(), ExternalIRQ::mode, mode8515, MODE_EDGE_ALL, MODE_EDGE_FALL, MODE_EDGE_RISE, MODE_LEVEL_LOW, and state.

Here is the call graph for this function:


Member Data Documentation

bool ExternalIRQSingle::mode8515 [protected]

at90s8515 don't support MODE_EDGE_ALL

Definition at line 115 of file externalirq.h.

Referenced by ChangeMode(), ExternalIRQSingle(), and PinStateHasChanged().

bool ExternalIRQSingle::state [protected]

saved state from pin

Definition at line 113 of file externalirq.h.

Referenced by ExternalIRQSingle(), fireAgain(), and PinStateHasChanged().

IRQ is controlled by 2 mode bits.

Definition at line 114 of file externalirq.h.

Referenced by ChangeMode(), and ExternalIRQSingle().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:51:04 2012 for Simulavr by  doxygen 1.6.3