AVRCpp::FlagsBuffer8 Class Reference

#include <DiverseIO.h>

Inherits AVRCpp::FlagsBuffer< uint8_t >.

List of all members.

Public Member Functions

 FlagsBuffer8 ()
 FlagsBuffer8 (uint8_t initFlags)
void Set (uint8_tvalue)
uint8_t Get ()
void SetBits (uint8_tflagsSet)
void ClearBits (uint8_tflagsCleared)
void ToggleBits (uint8_tflagsToggled)
uint8_t SelectBits (uint8_tflagsSelected)
bool IsBitsSet (uint8_tflagsTested)
void FromRegister ()
void IntoRegister ()
void ChangeBits (uint8_tselection, uint8_tvalue)

Protected Attributes

uint8_t flags


Detailed Description

Definition at line 463 of file DiverseIO.h.


Constructor & Destructor Documentation

AVRCpp::FlagsBuffer8::FlagsBuffer8 (  )  [inline]

Definition at line 467 of file DiverseIO.h.

00467 :FlagsBuffer<uint8_t>() {}

AVRCpp::FlagsBuffer8::FlagsBuffer8 ( uint8_t  initFlags  )  [inline]

Definition at line 468 of file DiverseIO.h.

00468 : FlagsBuffer<uint8_t>(initFlags) {}


Member Function Documentation

void AVRCpp::FlagsBuffer< uint8_t >::Set ( uint8_t   value  )  [inline, inherited]

Definition at line 441 of file DiverseIO.h.

00441 { flags = value; }

uint8_t AVRCpp::FlagsBuffer< uint8_t >::Get (  )  [inline, inherited]

Definition at line 442 of file DiverseIO.h.

00442 { return flags; }

void AVRCpp::FlagsBuffer< uint8_t >::SetBits ( uint8_t   flagsSet  )  [inline, inherited]

Definition at line 443 of file DiverseIO.h.

00443 { flags |= flagsSet; }

void AVRCpp::FlagsBuffer< uint8_t >::ClearBits ( uint8_t   flagsCleared  )  [inline, inherited]

Definition at line 444 of file DiverseIO.h.

00444 { flags &= ~flagsCleared; }

void AVRCpp::FlagsBuffer< uint8_t >::ToggleBits ( uint8_t   flagsToggled  )  [inline, inherited]

Definition at line 445 of file DiverseIO.h.

00445 { flags ^= flagsToggled; }

uint8_t AVRCpp::FlagsBuffer< uint8_t >::SelectBits ( uint8_t   flagsSelected  )  [inline, inherited]

Definition at line 446 of file DiverseIO.h.

00446 { return flags & flagsSelected; }

bool AVRCpp::FlagsBuffer< uint8_t >::IsBitsSet ( uint8_t   flagsTested  )  [inline, inherited]

Definition at line 447 of file DiverseIO.h.

00447 { return SelectBits(flagsTested) != 0 ? true : false; }

void AVRCpp::FlagsBuffer< uint8_t >::FromRegister (  )  [inline, inherited]

Definition at line 448 of file DiverseIO.h.

00448 { flags = Register::Get(); }

void AVRCpp::FlagsBuffer< uint8_t >::IntoRegister (  )  [inline, inherited]

Definition at line 449 of file DiverseIO.h.

00449 { Register::Set(flags); }

void AVRCpp::FlagsBuffer< uint8_t >::ChangeBits ( uint8_t   selection,
uint8_t   value 
) [inline, inherited]

Definition at line 451 of file DiverseIO.h.

00452         {
00453                 T tmp = flags & ~selection;
00454                 
00455                 value &= selection;
00456                 flags = tmp + value;
00457                 
00458         } // ChangeBits


Member Data Documentation

uint8_t AVRCpp::FlagsBuffer< uint8_t >::flags [protected, inherited]

Definition at line 434 of file DiverseIO.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 15 23:41:06 2007 for AVR C++ Lib for ATmega64 by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi