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

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

Re: [avr-libc-dev] Why include <ina90.h> from <avr/pgmspace.h>?


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Why include <ina90.h> from <avr/pgmspace.h>?
Date: Mon, 7 Oct 2002 22:10:38 +0200
User-agent: Mutt/1.2.5i

As E. Weddington wrote:

> > At the end of avr/io.h is this:
> > ...
> > Which might be close, but not quite, what you're thinking.
> 
> Spot on. So... it's a warning not an error. But you'd have to take 
> into account the above when including <io.h> without a defined device 
> type.

I thought of something that would turn off this warning iff a
specific macro is defined, like __COMPILING_LIBC.  Then, we can
define this macro from the cc command line in our build environment,
and thus make #include <avr/io.h> define as many IO registers as
can safely be defined without becoming device-dependent.  In
particular, i've got things like SREG and SPL/SPH in mind.  This
would eventually allow us to remove the magic number 0x5d from
the implementation of malloc().

One of Ted's goals (IIRC) was it to centralize those definitions
that can be centralized anyway, to prevent their duplication in
each and any ioXXX.h file.

As long as ELPM is not used inside the library implementation, we
don't need to care for whether RAMPZ is really declared while
compiling the library.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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