Grant Edwards wrote:
And that's definitely not my goal, because the device should
be battery driven.

If you want to go to sleep, that would probably be handled
"above" the protothreads level -- by the main loop that calls
the protothreads.

That main loop would go to sleep, and when it wakes up it could
either just call all of the protothreads once, or it could be
smarter and look at the event that caused it to wake up and
call only the threads that might care about that event.

Very well put - this is precisely the way to do it.

/adam
--
Adam Dunkels <[email protected]>
http://www.sics.se/~adam/


Reply via email to