fixed byteorder

pull/13/head
Sascha Ittner 2016-08-28 17:08:33 +02:00
parent e8ae04c97b
commit db428e77eb
1 changed files with 11 additions and 26 deletions

View File

@ -59,33 +59,18 @@ typedef struct CC_PACKED
union {
uint16_t reg;
struct {
#if defined(EC_LITTLE_ENDIAN)
uint8_t wrEnable:1;
uint8_t reserved:4;
uint8_t eeEmulated:1;
uint8_t eightByteRead:1;
uint8_t twoByteAddr:1;
uint8_t cmdReg:3;
uint8_t csumErr:1;
uint8_t eeLoading:1;
uint8_t ackErr:1;
uint8_t wrErr:1;
uint8_t busy:1;
#endif
uint8_t wrEnable:1;
uint8_t reserved:4;
uint8_t eeEmulated:1;
uint8_t eightByteRead:1;
uint8_t twoByteAddr:1;
#if defined(EC_BIG_ENDIAN)
uint8_t busy:1;
uint8_t wrErr:1;
uint8_t ackErr:1;
uint8_t eeLoading:1;
uint8_t csumErr:1;
uint8_t cmdReg:3;
uint8_t twoByteAddr:1;
uint8_t eightByteRead:1;
uint8_t eeEmulated:1;
uint8_t reserved:4;
uint8_t wrEnable:1;
#endif
uint8_t cmdReg:3;
uint8_t csumErr:1;
uint8_t eeLoading:1;
uint8_t ackErr:1;
uint8_t wrErr:1;
uint8_t busy:1;
} bits;
} contstat;