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

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

Re: [avr-libc-dev] [RFC] Sleeping BOD API


From: Dmitry K.
Subject: Re: [avr-libc-dev] [RFC] Sleeping BOD API
Date: Fri, 6 Feb 2009 17:22:43 +1000
User-agent: KMail/1.5

On Friday 06 February 2009 09:10, Weddington, Eric wrote:
[...]
> +#define sleep_bod_disable()  \
> +(__extension__({             \
> +    __asm__ __volatile__ (   \
> +        "ori  %0,%1" \
> +        : "+d" (MCUCR) \
> +        : "i" (_BV(BODS) | _BV(BODSE)) \
> +    ); \
> +    __asm__ __volatile__ (   \
> +        "andi  %0,%1" \
> +        : "=d" (MCUCR) \
> +        : "i" (~_BV(BODSE)) \
> +    ); \
> +}))

Hmm...
It is interesting to omit IN/OUT instruction in such manner.
I will check this for all Avr-gcc versions.

Thanks, this is new for me.
Dmitry.





reply via email to

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