There are many ways to do this but the most important thing will be how you process the data.
To do this you will need a bitfield structure (or, if you are feeling brave, you could manually mask out the bits for each field individually).
So in your case you might like a structure like this:
Strictly speaking, C does not define bit field order at all. So it seems structure bit field is (almost useless concept. Better use shift and mask (bitwise ops) approach: it's more safe method for the platform-dependent operations...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.