danlehmann / arbitrary-int

A modern and lightweight implementation of arbitrary integers for Rust
MIT License
31 stars 12 forks source link

Support bitenum with bool #3

Closed danlehmann closed 1 year ago

danlehmann commented 1 year ago

bitfield! uses bool instead of u1, which is incompatible with bitenum. This currently makes it impossible to have an enum for a single bit, which can be useful.

An example: The Mini-UART on the Raspberry Pi has data size, where 0 means 7 bit and 1 means 8 bits. An enum is nicer than a bool here

danlehmann commented 1 year ago

Wrong project. This needs to go into bitbybit