|
From: | Bjarne Laursen |
Subject: | Re: [avr-gcc-list] Sleep mode |
Date: | Tue, 24 Aug 2004 07:28:56 +0200 |
At 18:11 23-08-2004, you wrote:
address@hidden wrote:Hello, I want to stop the execution of my program with a sleep mode. Is this correct?? set_sleep_mode(SLEEP_MODE_IDLE); while(1){ while(!bit) { sleep_mode() } bit=false;
Let's say we need the flag because the interrupt not allways should result in main code startup. Maybe we have other interrupts.
What will happen if the interrupt occurs... while(!bit) { /'* here */ sleep_mode() Would we not enter sleep mode with the bit set. If so how can this be avoided.
[Prev in Thread] | Current Thread | [Next in Thread] |