Add constants for BDC_VERSION

This commit adds two constants intended to be used with the
bdc_header.flags field. I believe these are the correct values after
looking at following lines in `whd_cdc_bdc.c`:

40a7ec2273/WiFi_Host_Driver/src/whd_cdc_bdc.c (L34-L35)
40a7ec2273/WiFi_Host_Driver/src/whd_cdc_bdc.c (L447)
This commit is contained in:
Daniel Bevenius 2022-09-26 14:53:37 +02:00
parent 7bbd4671d3
commit 3b04ef265c
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -53,6 +53,9 @@ pub struct CdcHeader {
} }
impl_bytes!(CdcHeader); impl_bytes!(CdcHeader);
pub const BDC_VERSION: u8 = 2;
pub const BDC_VERSION_SHIFT: u8 = 4;
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[repr(C)] #[repr(C)]