I\'m new to working with bits. I\'m trying to work with an existing protocol, which can send three different types of messages.
Type 1 is a 16-bit structure:
<
You shouldn't use C structure bitfields because the physical layout of bitfields is undefined. While you could figure out what your compiler is doing and get your layout to match the underlying data, the code may not work if you switch to a different compiler or even update your compiler.
I know it's a pain, but do the bit manipulation yourself.