1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #ifndef __TYPEDEFINE_H__
- #define __TYPEDEFINE_H__
- typedef union {
- struct
- {
- unsigned char b0:1;
- unsigned char b1:1;
- unsigned char b2:1;
- unsigned char b3:1;
- unsigned char b4:1;
- unsigned char b5:1;
- unsigned char b6:1;
- unsigned char b7:1;
- }bits;
- unsigned char value;
- unsigned char bytes[1];
- } byte_bits_t;
- typedef union {
- struct
- {
- unsigned char b0:1;
- unsigned char b1:1;
- unsigned char b2:1;
- unsigned char b3:1;
- unsigned char b4:1;
- unsigned char b5:1;
- unsigned char b6:1;
- unsigned char b7:1;
- unsigned char b8:1;
- unsigned char b9:1;
- unsigned char b10:1;
- unsigned char b11:1;
- unsigned char b12:1;
- unsigned char b13:1;
- unsigned char b14:1;
- unsigned char b15:1;
- } bits;
- unsigned short value;
- unsigned char bytes[2];
- } word_bits_t;
- typedef union {
- struct
- {
- unsigned char b0:1;
- unsigned char b1:1;
- unsigned char b2:1;
- unsigned char b3:1;
- unsigned char b4:1;
- unsigned char b5:1;
- unsigned char b6:1;
- unsigned char b7:1;
- unsigned char b8:1;
- unsigned char b9:1;
- unsigned char b10:1;
- unsigned char b11:1;
- unsigned char b12:1;
- unsigned char b13:1;
- unsigned char b14:1;
- unsigned char b15:1;
- unsigned char b16:1;
- unsigned char b17:1;
- unsigned char b18:1;
- unsigned char b19:1;
- unsigned char b20:1;
- unsigned char b21:1;
- unsigned char b22:1;
- unsigned char b23:1;
- unsigned char b24:1;
- unsigned char b25:1;
- unsigned char b26:1;
- unsigned char b27:1;
- unsigned char b28:1;
- unsigned char b29:1;
- unsigned char b30:1;
- unsigned char b31:1;
- } bits;
- unsigned int value;
- unsigned char bytes[4];
- } dword_bits_t;
- //#define NULL (void *)0
- #endif
|