obcsim/msp_endian.c
unsigned long from_bigendian32(const unsigned char *src)
{
  unsigned long res = 0;
  unsigned char i;
  for (i = 0; i < 4; i++) {
    res = res << 8;
    res += *(src + i);
  }

  return res;
}
/*
   Converts the 4 bytes stored at the pointer into a 32-bit unsigned integer
   based on a Big Endian byte order.
*/
Converts the 4 bytes stored at the pointer into a 32-bit unsigned integer
based on a Big Endian byte order.
Converts the 4 bytes stored at the pointer into a 32 - bit unsigned integer based on a Big Endian byte order .
unsigned long from_bigendian32(const unsigned char *src)
{
  unsigned long res = 0;
  unsigned char i;
  for (i = 0; i < 4; i++) {
    res = res << 8;
    res += *(src + i);
  }
  return res;
}
unsigned long from_bigendian32 ( const unsigned char * src ) { unsigned long res = 0 ; unsigned char i ; for ( i = 0 ; i < 4 ; i ++ ) { res = res << 8 ; res += * ( src + i ) ; } return res ; }
Converts the 4 bytes stored at the pointer into a 32-bit unsigned integer
based on a Big Endian byte order.
Converts the 4 bytes stored at the pointer into a 32 - bit unsigned integer based on a Big Endian byte order .