PikeAero::CTimeBaseOneShot Class Reference

#include <ctimebaseoneshot.h>

Inheritance diagram for PikeAero::CTimeBaseOneShot:

Inheritance graph
[legend]
Collaboration diagram for PikeAero::CTimeBaseOneShot:

Collaboration graph
[legend]

Public Member Functions

 CTimeBaseOneShot (CMachine::InterruptVector vector, TB_TypeDef *TBx, CMachine::ubit32 usec=0, CMachine::ubit8 prescaler=255)
virtual void irq (CMachine::InterruptVector v)
 receive a hardware interrupt
virtual ~CTimeBaseOneShot ()

Private Attributes

CEventmEvent

Detailed Description

Implements a Time Base One Shot Timer object.
Author:
Michael Sharkey <mike@pikeaero.com>

Definition at line 32 of file ctimebaseoneshot.h.


Constructor & Destructor Documentation

PikeAero::CTimeBaseOneShot::CTimeBaseOneShot ( CMachine::InterruptVector  vector,
TB_TypeDef TBx,
CMachine::ubit32  usec = 0,
CMachine::ubit8  prescaler = 255 
)

Definition at line 26 of file ctimebaseoneshot.cpp.

References mEvent, PikeAero::CEvent::OneShot, and PikeAero::CEvent::setType().

00027  : CTimeBase(vector,TBx,usec,prescaler)
00028 {
00029     mEvent = new CEvent(this);
00030     mEvent->setType(CEvent::OneShot);
00031 }

Here is the call graph for this function:

PikeAero::CTimeBaseOneShot::~CTimeBaseOneShot (  )  [virtual]

Definition at line 33 of file ctimebaseoneshot.cpp.

References mEvent.

00034 {
00035     delete mEvent;
00036     mEvent = NULL;
00037 }


Member Function Documentation

void PikeAero::CTimeBaseOneShot::irq ( CMachine::InterruptVector  v  )  [virtual]

receive a hardware interrupt

stop the counter

clear the End of Count flag

dispatch the event to callbacks

Reimplemented from PikeAero::CTimeBase.

Definition at line 42 of file ctimebaseoneshot.cpp.

References PikeAero::CObject::dispatchCallback(), mEvent, PikeAero::TB_TypeDef::SR, PikeAero::CTimeBase::stop(), PikeAero::CTimeBase::tb(), and TB_EC.

00043 {
00044     if ( tb()->SR & TB_EC )
00045     {
00046         stop();                     /** stop the counter */
00047         tb()->SR &= ~TB_EC;         /** clear the End of Count flag **/
00048         dispatchCallback(mEvent);   /** dispatch the event to callbacks */
00049     }
00050 }

Here is the call graph for this function:


Field Documentation

Definition at line 45 of file ctimebaseoneshot.h.

Referenced by CTimeBaseOneShot(), irq(), and ~CTimeBaseOneShot().


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

Generated on Sun Oct 25 14:00:31 2009 for stingray3 by  doxygen 1.5.8