I have the following variables:
#define X ... ... code unsigned char pin[X] = { ... }; // there are values here, no 0xFF ... struct { unsigned char pin[X]; } info;
and I need to copy the values from pin into info.pin. However, even direct assignment doesn't change the info.pin values. i.e.:
info.pin[0] = pin[0]; info.pin[1] = pin[1]; info.pin[2] = pin[2]; ... info.pin[X - 1] = pin[X - 1];
the watch window shows info.pin values are still 0xFF and indeed when another code that needs info.pin checks (after the assignment above of course), the values are still 0xFF. What do I have to do to make the values copied?
Sorry, the pin declaration should be:
unsigned char code pin[X] = { ... }; // there are values here, no 0xFF