avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] dox status and next release


From: E. Weddington
Subject: Re: [avr-libc-dev] dox status and next release
Date: Fri, 18 Oct 2002 14:53:49 -0600

On 14 Oct 2002 at 22:44, Joerg Wunsch wrote:

> Btw., we currently have nothing that could be used in C code to cause
> a sleep instruction, except of _SLEEP() in ina90.h.  Although it's
> basically a simple inline asm statement, i think we should provide a C
> equivalent for it.  The question is: how to name it, and which header
> file to put it into?  The name sleep(), although not reserved by the
> standard, is usually (i. e. in Unix, and thus in C dialects that mimic
> some aspects of the Unix API) meant to suspend program execution for a
> number of seconds that is going to be passes as an argument to this
> function, therefore i think it's merely a poor choice.  suspend()?
> avr_sleep()?  mcu_sleep()?
> 
> Every AVR datasheet mentions that SE (sleep enable) should only be set
> immediately before entering sleep mode.  This would warrant to extend
> the functionality of this macro to do this.  We could finally also
> provide macros to give the various sleep modes more descriptive names,
> but they are fairly device-dependant.  However, then it's probably
> worth to put all this into a file of its own, like <avr/sleep.h>...
 
IMHO, I don't mind sleep(), because we don't run Unix on the AVR and 
it's not reserved by a standard. But if that's a bother, then I'll 
vote for avr_sleep().

<avr/sleep.h> sounds like a good location.

Inline it?

Eric




reply via email to

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