This question is basically the second half to my other Question
How can I convert a UINT16 value, into a UINT8 * array without a loop and avoiding endian problems.
Basically I want to do something like this:
UINT16 value = 0xAAFF;
UINT8 array[2] = value;
The end result of this is to store value into a UINT8 array while avoiding endian conversion.
UINT8 * mArray;
memcpy(&mArray[someOffset],&array,2);
When I simply do memcpy with the UINT16 value, it converts to little-endian which ruins the output. I am trying to avoid using endian conversion functions, but think I may just be out of luck.