/* Stores a 32-bit value into a byte buffer taking into account Intel or Motorola byte ordering.  */
static void XcpLoaderSetOrderedLong(uint32_t value, uint8_t *data)
/* Stores a 32-bit value into a byte buffer taking into account Intel or Motorola byte ordering.  */
static void XcpLoaderSetOrderedLong(uint32_t value, uint8_t *data)
{
  assert(data != NULL);
  if (data != NULL)
  {
    if (xcpSlaveIsIntel)
    {
      data[3] = (uint8_t)(value >> 24);
      data[2] = (uint8_t)(value >> 16);
      data[1] = (uint8_t)(value >>  8);
      data[0] = (uint8_t)value;
    }
    else
    {
      data[0] = (uint8_t)(value >> 24);
      data[1] = (uint8_t)(value >> 16);
      data[2] = (uint8_t)(value >>  8);
      data[3] = (uint8_t)value;
    }
  }
}