AVRCpp::Sleeping Namespace Reference

Power management and sleep modes. More...


Enumerations

enum  EnabledFlag {
  Disabled = 0x00,
  Enabled = 0x20
}
enum  SleepMode {
  Idle = 0x00,
  ADCNoiseReduction = 0x8,
  PowerDown = 0x10,
  PowerSave = 0x10 | 0x8,
  Standby = 0x4 | 0x10,
  ExtendedStandby = 0x4 | 0x10 | 0x8
}

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 
ExtendedStandby 

Definition at line 83 of file Sleeping.h.

00084                 {
00085                         Idle                            = 0x00, 
00086                         ADCNoiseReduction       = _SM0,
00087                         PowerDown                       = _SM1,
00088                         PowerSave                       = _SM1 | _SM0,
00089                         Standby                         = _SM2 | _SM1,
00090                         ExtendedStandby         = _SM2 | _SM1 | _SM0
00091                         
00092                 }; // 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:09 2007 for AVR C++ Lib for ATmega64 by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi