[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] depricated.h: outp() arguments order?
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] depricated.h: outp() arguments order? |
Date: |
Tue, 30 May 2006 08:28:44 +1100 |
User-agent: |
KMail/1.5 |
On Monday 29 May 2006 08:22, Dmitry K. wrote:
> Hi.
>
> In 'compat/depricated.h' outp() is defined as:
> outp(port,val): port <-- val.
Possibly, it is a misprint in 'depricated.h'.
Look the Avr-libc-1.0.5, sfr_defs.h:
/** \def outb
\ingroup avr_sfr
\deprecated
\code #include <avr/io.h>\endcode
For backwards compatibility only. This macro will eventually be removed.
\par
<b>Use direct access in new programs</b>.
\note The order of the arguments was switched in older versions of
avr-libc (versions <= 20020203). */
#define outb(sfr, val) (_SFR_BYTE(sfr) = (val))
/* The outb/outw macros now have the correct order of arguments. */
And below:
/** \def outp
\ingroup avr_sfr
\deprecated
For backwards compatibility only. This macro will eventually be removed.
\par
<b>Use direct access in new programs</b>. */
#define outp(val, sfr) outb(sfr, val)
Dmitry.