diff --git a/src/lib.rs b/src/lib.rs index b8ce2e2a..d446313c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -800,7 +800,7 @@ where }; let bcd_header = BcdHeader { - flags: 0x20, + flags: BDC_VERSION << BDC_VERSION_SHIFT, priority: 0, flags2: 0, data_offset: 0, diff --git a/src/structs.rs b/src/structs.rs index ed5fc18d..6d4525a4 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -53,6 +53,9 @@ pub struct CdcHeader { } impl_bytes!(CdcHeader); +pub const BDC_VERSION: u8 = 2; +pub const BDC_VERSION_SHIFT: u8 = 4; + #[derive(Clone, Copy)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(C)]