[Tinyos-help] Allocate a table in ROM
Benjamin Madore
bcmadore at cs.pitt.edu
Mon Mar 12 10:01:24 PDT 2007
On Mon, March 12, 2007 6:29 am, Imanol Padillo said:
> I have a table with constant values, so I need to allocate it in ROM for
> save RAM memory. How can I do the declaration of my table?
...
>
> With const declaration it seems that the table is allocated in RAM. Why have
> I to declarate my table?
I believe you want:
const struct Register ImageRegisterTable[] = {
{ 0x0000, 0x00 } ,
//more data ...
{ 0x03BF, 0x06 }
} ;__attribute((__progmem__))
but I am no C expert. This may not work, and there are likely other ways to
do it.
--
The difference between the right word and the almost right word is really a
large matter- it's the difference between a lightning bug and the lightning.
-Twain
More information about the Tinyos-help
mailing list