avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Pgmspace.h Use


From: Branislav Katreniak
Subject: Re: [avr-gcc-list] Pgmspace.h Use
Date: Tue, 9 Aug 2005 12:40:31 +0200
User-agent: Mutt/1.5.9i

> for code portability reasons, I would like to avoid to call explicity the
> function pgm_read_byte() like in the following example :
> 
> const prog_char array[7] = {0x10,0x20,0x30,0x40,0x50,0x60,0x70};
> y = pgm_read_byte(&array[2]);
> // I would like to to keep the syntax y = array[2]; without having the array
> copied in the SRAM
> 
> Is there a way to do it ?

No, I think. But you can create some macros to read from code space
which makes this access portable.

 Brano

-- 
Branislav Katreniak
mailto: address@hidden




reply via email to

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