title: Converting a UINT16 value into a UINT8 array[2]
body: <p>This question is basically the second half to my other <a href="https://stackoverflow.com/questions/1288761/uint16-value-appears-to-be-backwards-when-printing/1288775#1288775">Question</a></p>
  
  <p>How can I convert a UINT16 value, into a UINT8 * array without a loop and avoiding endian problems. </p>
  
  <p>Basically I want to do something like this:</p>
  
  <pre><code>UINT16 value = 0xAAFF;
  UINT8 array[2] = value;
  </code></pre>
  
  <p>The end result of this is to store value into a UINT8 array while avoiding endian conversion.</p>
  
  <pre><code>UINT8 * mArray;
  memcpy(&amp;mArray[someOffset],&amp;array,2);
  </code></pre>
  
  <p>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. </p>