mvbitfield 0.2.0

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

bitfield! {
    struct BinaryWidth: 0b10 {
        x: 2,
    }

    struct OctalWidth: 0o10 {
        x: 8,
    }

    struct HexWidth: 0x10 {
        x: 16,
    }
}