Bit fields
joelreymont opened this issue · 2 comments
joelreymont commented
It would be super-helpful to have bit fields like in Deku.
As it stands, I have to create 3 fields to deal with 2 bit fields stored in a 16-bit int:
- Two calculated bit fields calculated on read,
- A temporary 16-bit field that I read but don't store and that's used to calculated the bit fields,
- A bunch of annotations to state what's calculated and skipped on read and write.
v1gnesh commented
Bit fields with both support for both endianness.
bilge may fit the bill :)
csnover commented
Thanks for your report! This looks like a duplicate of #192/#222, so I’d recommend to start there. There is also documentation on how to handle bit fields with modular-bitfield. If you are still having trouble, please open a Q&A that shows the format you are parsing so someone can give a more detailed recommendation. Thanks!