Quote:
|
Originally Posted by Chris Bright
When the array is stored in the ROM does that mean the array has to be global?
|
No, it doesn't have to be global. If it's outside a function, it will have global scope by default. But you can restrict its visibility to the file only by assigning it "static" storage class. You can also hide the array inside a function. It compiled cleanly when I defined it as "static rom const unsigned char speed_array[256]..." inside a function. (Thank you Arthur(Ssbfalcon) for pointing out that all the data values in the array would fit in char sized elements.)