diff options
| author | Daniel Bevenius <[email protected]> | 2022-09-26 14:53:37 +0200 |
|---|---|---|
| committer | Daniel Bevenius <[email protected]> | 2022-09-26 14:53:37 +0200 |
| commit | 3b04ef265c0f47b160ca8e89ef0b8fefc4b7e6ec (patch) | |
| tree | 8d04ada640912a9eda352b866a04a3e7cdbdc46b /src | |
| parent | 7bbd4671d34dc80b44cbee2152de7d0b61056c01 (diff) | |
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`:
https://github.com/Infineon/wifi-host-driver/blob/40a7ec2273a950fbf89353d3eac98c5c1c2fd8cd/WiFi_Host_Driver/src/whd_cdc_bdc.c#L34-L35
https://github.com/Infineon/wifi-host-driver/blob/40a7ec2273a950fbf89353d3eac98c5c1c2fd8cd/WiFi_Host_Driver/src/whd_cdc_bdc.c#L447
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | src/structs.rs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs index b8ce2e2a2..d446313c0 100644 --- a/src/lib.rs +++ b/src/lib.rs | |||
| @@ -800,7 +800,7 @@ where | |||
| 800 | }; | 800 | }; |
| 801 | 801 | ||
| 802 | let bcd_header = BcdHeader { | 802 | let bcd_header = BcdHeader { |
| 803 | flags: 0x20, | 803 | flags: BDC_VERSION << BDC_VERSION_SHIFT, |
| 804 | priority: 0, | 804 | priority: 0, |
| 805 | flags2: 0, | 805 | flags2: 0, |
| 806 | data_offset: 0, | 806 | data_offset: 0, |
diff --git a/src/structs.rs b/src/structs.rs index ed5fc18df..6d4525a46 100644 --- a/src/structs.rs +++ b/src/structs.rs | |||
| @@ -53,6 +53,9 @@ pub struct CdcHeader { | |||
| 53 | } | 53 | } |
| 54 | impl_bytes!(CdcHeader); | 54 | impl_bytes!(CdcHeader); |
| 55 | 55 | ||
| 56 | pub const BDC_VERSION: u8 = 2; | ||
| 57 | pub const BDC_VERSION_SHIFT: u8 = 4; | ||
| 58 | |||
| 56 | #[derive(Clone, Copy)] | 59 | #[derive(Clone, Copy)] |
| 57 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 60 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 58 | #[repr(C)] | 61 | #[repr(C)] |
