Merge pull request #26 from danbev/bdc_version_const

Add constants for BDC_VERSION
This commit is contained in:
Dario Nieuwenhuis 2022-09-26 15:07:53 +02:00 committed by GitHub
commit cb6d1fc514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -800,7 +800,7 @@ where
};
let bcd_header = BcdHeader {
flags: 0x20,
flags: BDC_VERSION << BDC_VERSION_SHIFT,
priority: 0,
flags2: 0,
data_offset: 0,

View File

@ -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)]