Hi there!
I've got the following problem. I have to read an integer value out of a
2 byte data block. The structure is like following:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x y |---- numeric data ----|
Bit 15 and 14 are just some flags. I've got to get the numeric data
encoded in the bits 13-0.
I tried this:
struct BitField
{
unsigned short x: 1;
unsigned short y: 1;
unsigned short value: 14;
};
struct BitField *testField= (struct BitField*)aValue;
aValue->value...
But this didn't work.
Does someone knows how to get the numeric data???
Thanks a lot for your help!