MHVLib
20111011
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_PinChangeManager.h>
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] |
Definition at line 89 of file MHV_PinChangeManager.h.
MHV_PinChangeManager::MHV_PinChangeManager | ( | ) |
An event manager for handling pinchange events
Definition at line 33 of file MHV_PinChangeManager.cpp.
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
pinDir | A member of the MHV_PIN_* macro, must have a valid pinchangeInterrupt |
pinOut | A member of the MHV_PIN_* macro |
pinIn | A member of the MHV_PIN_* macro |
pinBit | A member of the MHV_PIN_* macro |
pinChangeInterrupt | A 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
offset | the 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
pinDir | A member of the MHV_PIN_* macro, must have a valid pinchangeInterrupt |
pinOut | A member of the MHV_PIN_* macro |
pinIn | A member of the MHV_PIN_* macro |
pinBit | A member of the MHV_PIN_* macro |
pinChangeInterrupt | A member of the MHV_PIN_* macro |
listener | a MHV_PinEventListener to notify when the pin changes |
Definition at line 96 of file MHV_PinChangeManager.cpp.
MHV_EVENT_PIN MHV_PinChangeManager::_pins[MHV_PC_INT_COUNT] [protected] |
Definition at line 92 of file MHV_PinChangeManager.h.