source: trunk/Softwares/Basic_test.or32/src/c/func_endianness.c @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 326 bytes
Line 
1#include <stdio.h>
2#include "func_endianness.h"
3
4bool endianness ()
5{
6  union TestEndian test_endian;
7 
8  test_endian.total = 0xFF;
9 
10  if (test_endian.octets.octet1 == 0xFF) 
11    {
12      printf("Little Endian\n");
13      return LittleEndian;
14    }
15  else 
16    {
17      printf("Big Endian\n");
18      return BigEndian;
19    }
20}
Note: See TracBrowser for help on using the repository browser.