• bit field
    Hi All, I have a struct: union U { unsigned char c; struct { unsigned char bit0 : 1; unsigned char bit1 : 1; unsigned char bit2 : 1; . . . }S; }; } If I test multiple bits together...
  • Bit field order in C166 compiler
    Hi, I am new to C166 compiler. I would like to know how is the order of the bit field in a structure. i.e. the first member would be a LSB or MSB. Thanks in anticipation. Viral.
  • constant bit-fields in struct
    Hi All,, How can i declare constant bit fields in a struct ?? struct mystruct{ unsigned char xx:6; unsigned char yy:2; }mystruct; Let us say i want mystruct.yy to be a constant 00, how can...
  • sizeof of struct with bit Field
    please explain me why the sizeof (C51) returns 6 bytes for this struct instead of 5: typedef struct DEKO_COMM_HEADER { UINT16 m_uiMsgOpcode; UCHAR8 m_sblMsgPriority :2; UINT16 m_sblDataLength...
  • Typecasting pointer to a bit field
    Hi, Is it possible to typecast a pointer to a variable in xdata to a bit field with 13-bits? I've tried this, char xdata i _at_ 0x300; struct { unsigned short addr : 13; unsigned char flag1...