AVRCpp::Sleeping Namespace Reference

Power management and sleep modes. More...


Enumerations

enum  EnabledFlag {
  Disabled = 0x00,
  Enabled = 0x1
}
enum  SleepMode {
  Idle = 0x00,
  ADCNoiseReduction = 0x2,
  PowerDown = 0x4,
  PowerSave = 0x4 | 0x2,
  Standby = 0x8 | 0x4
}

Functions

void SetUp (SleepMode sleepMode, EnabledFlag enabled)
void FallAsleep ()
void Enable ()
void Disable ()
uint8_t IsEnabled ()
uint8_t GetSleepMode ()
void SetSleepMode (SleepMode sleepMode)


Detailed Description

Power management and sleep modes.

Enumeration Type Documentation

enum AVRCpp::Sleeping::EnabledFlag

Enumerator:
Disabled 
Enabled 

Definition at line 73 of file Sleeping.h.

00074                 {
00075                         Disabled        = 0x00,
00076                         Enabled         = _SE
00077                         
00078                 }; // EnabledFlag

enum AVRCpp::Sleeping::SleepMode

Enumerator:
Idle 
ADCNoiseReduction 
PowerDown 
PowerSave 
Standby 

Definition at line 96 of file Sleeping.h.

00097                 {
00098                         Idle                            = 0x00, 
00099                         ADCNoiseReduction       = _SM0,
00100                         PowerDown                       = _SM1,
00101                         PowerSave                       = _SM1 | _SM0,
00102                         Standby                         = _SM2 | _SM1
00103                         
00104                 }; // enum SleepMode


Function Documentation

void AVRCpp::Sleeping::Disable (  )  [inline]

Definition at line 130 of file Sleeping.h.

00130 { ClearBits<__SLEEPING_REGISTER__>(_SE); }

void AVRCpp::Sleeping::Enable (  )  [inline]

Definition at line 129 of file Sleeping.h.

00129 { SetBits<__SLEEPING_REGISTER__>(_SE); }

void AVRCpp::Sleeping::FallAsleep (  )  [inline]

Definition at line 127 of file Sleeping.h.

00127 { Assembler::SLEEP(); }

uint8_t AVRCpp::Sleeping::GetSleepMode (  )  [inline]

Definition at line 133 of file Sleeping.h.

00133 { return SelectBits<__SLEEPING_REGISTER__>(_SM0 | _SM1 | _SM2); }

uint8_t AVRCpp::Sleeping::IsEnabled (  )  [inline]

Definition at line 131 of file Sleeping.h.

00131 { return IsBitsSet<__SLEEPING_REGISTER__>(_SE); }

void AVRCpp::Sleeping::SetSleepMode ( SleepMode  sleepMode  )  [inline]

Definition at line 134 of file Sleeping.h.

00134 { ChangeBits<__SLEEPING_REGISTER__>(_SM0 | _SM1 | _SM2, sleepMode); }

void AVRCpp::Sleeping::SetUp ( SleepMode  sleepMode,
EnabledFlag  enabled 
) [inline]

Definition at line 121 of file Sleeping.h.

00122                 {
00123                         ChangeBits<__SLEEPING_REGISTER__>(_SM0 | _SM1 | _SM2 | _SE, sleepMode | enabled);
00124                         
00125                 } // SetUp


Generated on Sat Sep 15 23:41:01 2007 for AVR C++ Lib for ATmega48 by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi