1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use bebytes_derive::BeBytes; #[cfg(not(feature = "std"))] extern crate alloc; #[derive(BeBytes, Debug, PartialEq, Copy, Clone)] struct U16 { #[bits(1)] first: u8, #[bits(14)] second: u16, #[bits(1)] fourth: u8, } fn main() {}