[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Getting all 17bits of an objects address ?
From: |
Anton Erasmus |
Subject: |
Re: [avr-gcc-list] Getting all 17bits of an objects address ? |
Date: |
Tue, 26 Nov 2002 21:45:35 +0200 |
On 02/11/26 at 08:01 Roland Zitzke wrote:
>Sent: Monday, November 25, 2002 6:21 PM
>Subject: [avr-gcc-list] Getting all 17bits of an objects address ?
>
>
>getting the full 17bits
>> of a array defined in program memory ?
>I have exactly the same problem.
>It would be handy to have a macro to store a 17 bit full pointer into a
>long
>variable and another macro
>PRG_RDB_EX which takes such a pointer and returns the FLASH byte at that
>position.
>This would allow users of atmega103 and 128 to use more than 64k as data
>memory.
>This macro would need to use the ELPM instruction and use more cyles and
>therefore this should only be an option - not the general case.
>/Roland
>
Hi,
The __elpm_inline function or _ELPM macro in
pgmspace.h takes a long argument as the address of the byte
to read from flash. The problem is getting the fullt 17bit address
at runtime.
Regards
Anton Erasmus
avr-gcc-list at http://avr1.org