you can either define a structure with bitfields, which always sounds the cleanest way on paper but turns out to be a nightmare of implementation-defined features and almost completely unportable, or you do it the simple way with masks and shifts - macros are the common implementation:
#define QR(f) (f & 0x0001)
#define OPCODE(f) ((f & 0x001E) >> 1)
#define AA(f) ((f & 0x0020) >> 5)
...etc
This is of course assuming any necessary endianness correction has been done already (so the two bytes of the uint16_t
are in the correct order to be interpreted this way)
Afterthought: the one-bit flags don't really need to be shifted either - once they're masked they're going to be zero or non-zero, which is enough for testing them in C.