mvbitfield 0.2.0

Generates types to work with bit-aligned fields.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use mvbitfield::prelude::*;

bitfield! {
    // This struct's field has the same primitive type as the struct. This used
    // to trip a Clippy lint in the generated code.
    #[lsb_first]
    pub struct MyStruct: 28 {
        pub my_field: 20 as U20,
        ..
    }
}