AVRCpp::FlagsBuffer16 Class Reference

#include <DiverseIO.h>

Inherits AVRCpp::FlagsBuffer< uint16_t >.

List of all members.

Public Member Functions

 FlagsBuffer16 ()
 FlagsBuffer16 (uint16_t initFlags)
void Set (uint16_tvalue)
uint16_t Get ()
void SetBits (uint16_tflagsSet)
void ClearBits (uint16_tflagsCleared)
void ToggleBits (uint16_tflagsToggled)
uint16_t SelectBits (uint16_tflagsSelected)
bool IsBitsSet (uint16_tflagsTested)
void FromRegister ()
void IntoRegister ()
void ChangeBits (uint16_tselection, uint16_tvalue)

Protected Attributes

uint16_t flags


Detailed Description

Definition at line 473 of file DiverseIO.h.


Constructor & Destructor Documentation

AVRCpp::FlagsBuffer16::FlagsBuffer16 (  )  [inline]

Definition at line 477 of file DiverseIO.h.

00477 :FlagsBuffer<uint16_t>() {}

AVRCpp::FlagsBuffer16::FlagsBuffer16 ( uint16_t  initFlags  )  [inline]

Definition at line 478 of file DiverseIO.h.

00478 : FlagsBuffer<uint16_t>(initFlags) {}


Member Function Documentation

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

Definition at line 441 of file DiverseIO.h.

00441 { flags = value; }

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

Definition at line 442 of file DiverseIO.h.

00442 { return flags; }

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

Definition at line 443 of file DiverseIO.h.

00443 { flags |= flagsSet; }

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

Definition at line 444 of file DiverseIO.h.

00444 { flags &= ~flagsCleared; }

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

Definition at line 445 of file DiverseIO.h.

00445 { flags ^= flagsToggled; }

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

Definition at line 446 of file DiverseIO.h.

00446 { return flags & flagsSelected; }

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

Definition at line 447 of file DiverseIO.h.

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

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

Definition at line 448 of file DiverseIO.h.

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

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

Definition at line 449 of file DiverseIO.h.

00449 { Register::Set(flags); }

void AVRCpp::FlagsBuffer< uint16_t >::ChangeBits ( uint16_t   selection,
uint16_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

uint16_t AVRCpp::FlagsBuffer< uint16_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:40:13 2007 for AVR C++ Lib for AT90USB1287 by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi