Hi guys. I try to explain this as best I can. Here is the situation: I have a microprocessor app and programming software for the micro, with identical memory mapping.
In my programming software, there is form with indices 0, 1, 2, casted to an enum
And then the parameter gets written to the processor memory.Code:enum { 0, X 1, Y 2, Z }
However, by accident, in the embedded code the enum was accidently defined as
Here is whats happening: If I program X or Z to the embedded app and read it in my embedded app, both are seen as '0'. Y is seen as '1' as expected. Why is the underlying reason for this? C++ seems to be handling enums differently than i thought.Code:enum { 0, Z 1, Y 2, X }