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

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

Re: [avr-gcc-list] Get pointer of progmem data


From: Marc Wetzel
Subject: Re: [avr-gcc-list] Get pointer of progmem data
Date: Mon, 22 Apr 2002 19:53:58 +0200

Hmm,

looking at the pgmspace.h...

#define PRG_RDB(addr) _LPM((unsigned short)(addr))

it seems you are holding the adress right in your hand...

/Marc


At 11:26 22.04.2002 +0200, Ufficio Software wrote:
Hi,
 
Hi,ave placed a constant struct array in flash using PROGMEM directive.
Using PRG_RDB i can read init.

 
struct tmp
 {
 char b1;
 char c1;
 };

 
const struct tmp PROGMEM Keys[ ] =
 {
 { 0x01, 'a' },
 { 0x02, 'b' },
 { 0x04, 'c' },
 { 0x08, 'd' },
 };

 
How can i get the address of it ?
struct ps *p = &Keys[ 1 ];

 
Patrizio Zelotti
address@hidden

---
Marc R. Wetzel
Oppenhoffallee 145
52066 Aachen
Tel:   +49 241 7014155
Mobil: +49 177 3903870
mailto://mwse@gmx.de


reply via email to

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