MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
MHV_PinChangeManager Class Reference

#include <MHV_PinChangeManager.h>

List of all members.

Public Member Functions

 MHV_PinChangeManager ()
void pinChange0 ()
void pinChange (uint8_t offset)
void registerListener (volatile uint8_t *pinDir, volatile uint8_t *pinOut, volatile uint8_t *pinIn, uint8_t pinBit, int8_t pinChangeInterrupt, MHV_PinEventListener *listener)
void deregisterListener (volatile uint8_t *pinDir, volatile uint8_t *pinOut, volatile uint8_t *pinIn, uint8_t pinBit, int8_t pinChangeInterrupt)
void handleEvents ()

Protected Attributes

MHV_EVENT_PIN _pins [MHV_PC_INT_COUNT]

Detailed Description

Definition at line 89 of file MHV_PinChangeManager.h.


Constructor & Destructor Documentation

MHV_PinChangeManager::MHV_PinChangeManager ( )

An event manager for handling pinchange events

Definition at line 33 of file MHV_PinChangeManager.cpp.


Member Function Documentation

void MHV_PinChangeManager::deregisterListener ( volatile uint8_t *  pinDir,
volatile uint8_t *  pinOut,
volatile uint8_t *  pinIn,
uint8_t  pinBit,
int8_t  pinChangeInterrupt 
)

Deregister interest for pinchange events

Parameters:
pinDirA member of the MHV_PIN_* macro, must have a valid pinchangeInterrupt
pinOutA member of the MHV_PIN_* macro
pinInA member of the MHV_PIN_* macro
pinBitA member of the MHV_PIN_* macro
pinChangeInterruptA member of the MHV_PIN_* macro

Definition at line 145 of file MHV_PinChangeManager.cpp.

void MHV_PinChangeManager::handleEvents ( )

Call from the main loop to handle any events

Definition at line 179 of file MHV_PinChangeManager.cpp.

void MHV_PinChangeManager::pinChange ( uint8_t  offset)

Trigger for pin change interrupts - scans through 8 pins starting at the offset

Parameters:
offsetthe number of pins to skip before scanning

Definition at line 68 of file MHV_PinChangeManager.cpp.

void MHV_PinChangeManager::pinChange0 ( )

Trigger for interrupt PCINT0

Definition at line 42 of file MHV_PinChangeManager.cpp.

void MHV_PinChangeManager::registerListener ( volatile uint8_t *  pinDir,
volatile uint8_t *  pinOut,
volatile uint8_t *  pinIn,
uint8_t  pinBit,
int8_t  pinChangeInterrupt,
MHV_PinEventListener listener 
)

Register interest for pinchange events

Parameters:
pinDirA member of the MHV_PIN_* macro, must have a valid pinchangeInterrupt
pinOutA member of the MHV_PIN_* macro
pinInA member of the MHV_PIN_* macro
pinBitA member of the MHV_PIN_* macro
pinChangeInterruptA member of the MHV_PIN_* macro
listenera MHV_PinEventListener to notify when the pin changes

Definition at line 96 of file MHV_PinChangeManager.cpp.


Member Data Documentation

MHV_EVENT_PIN MHV_PinChangeManager::_pins[MHV_PC_INT_COUNT] [protected]

Definition at line 92 of file MHV_PinChangeManager.h.


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