union中的各个字段共享同一块内存区域
typedef union
{
undigned short int value;
unfigned char bytes[2];
}to;
to typeorder;
typeorder.value = 0xabcd;
那么:
bytes[0] = 0xcd;
bytes[1] = 0xab; //如果是Low endian的话