• Struct in union
    Hi I have some problems with struct inside a union This is my code. union{ unsigned char id_byte[2]; struct { unsigned char DLC:4; unsigned char RTR:1; unsigned int identifier:11; }del_element;...
  • UNION and STRUCT
    I'd like to make a definition of union in one file and call it from others. Union needs to consists structures in it. Is it possible? Thank you, Goran
  • struct & union definations
    I am using struct in my code. with LPC1317. Now if I write: typedef struct { uint32_t f; union { uint32_t ADR[3]; struct { uint32_t ADR1; uint32_t ADR2; uint32_t ADR3; }; // warning...
  • The bit struct in union
    Hello! I want to set one byte by bit. the follow works. But: (1) Why this union takes 2 bytes? union BPS_FORMAT { struct { unsigned format :8; }getbyte; struct { unsigned StopBitLen :1;...
  • Question about structs and unions
    Hello there, I've faced a problem that I couldn't solve. I hope you people can help me. I want to memcpy to a struct the datum in an array. I've done it before, and it goes like this: memcpy...