uracoli-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [uracoli-devel] Sleeping


From: Joerg Wunsch
Subject: Re: [uracoli-devel] Sleeping
Date: Wed, 16 May 2012 18:31:16 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

As Daniel Thiele wrote:

> Acc. to datasheet, sleep_enable() has to be set /just before/ the
> sleep_cpu() instruction:

No, it's only recommended, but not necessary.

I'd recommend using sleep_mode() rather than the individual
step-by-step macros anyway.  Usually, my main loop looks like:

  for (;;) {
    ...
    sleep_mode();
  }

Depending on the actual application state, it is then toggled
between set_sleep_mode(SLEEP_MODE_IDLE) and SLEEP_MODE_PWRSAVE.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]