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

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

Re: [avr-libc-dev] Progmem types compatibility


From: David Brown
Subject: Re: [avr-libc-dev] Progmem types compatibility
Date: Tue, 10 Jan 2012 09:20:23 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 10/01/2012 09:08, Joerg Wunsch wrote:
As Jan Waclawek wrote:

Just want to remark that these issues had been discussed already in
the thread stemming from
http://lists.nongnu.org/archive/html/avr-libc-dev/2011-09/msg00025.html
...

And the outcome was that the macro solution is not really suitable
as a replacement.  To quote Johann:

prog_char as a macro is dreaded.

const prog_char * const p = NULL;

puts p in progmem so it's broken by design. With that users will be
taken for a ride.

Fair enough. Macros are better for some purposes, but they can really mess things up sometimes. I can't see any way to get the effect you want.


I agree that having typedefs for the named address space
implementation might be a good thing.  They should probably start
with flash_ (rather than prog_) then, to clearly indicate they are
*different*, and need a different usage.


That would be ideal, as far as I can see.

mvh.,

David



reply via email to

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