Hello
To save RAM I defined an array of struct as const, so the array will not be copied from flash into RAM.
struct stMyStruct = {unsigned short usElement1[6],
unsigned short usElement2[6],
...}; (28 Elements)
const struct stMyStruct MyStruct[2] = {{{1, 2, 3, 4, 5, 6},
{1, 2, 3, 4, 5, 6},
{...}},
{{1, 2, 3, 4, 5, 6},
{1, 2, 3, 4, 5, 6},
{...}}};
When I read data from this struct array, i always get the address of the chosen element, instead of the data.
Is it not possible to read data directly from flash?
I also tried to resolve this "pointer", but without success.
Temp = *(unsigned short *) MyStruct[0].usElement1[0];
Greets
Phil