source:
trunk/Softwares/Basic_test.or32/src/c/func_endianness.c
@
68
Last change on this file since 68 was 2, checked in by , 18 years ago | |
---|---|
File size: 326 bytes |
Rev | Line | |
---|---|---|
[2] | 1 | #include <stdio.h> |
2 | #include "func_endianness.h" | |
3 | ||
4 | bool 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.