diff --git a/esp32/src/wifi.rs b/esp32/src/wifi.rs index f846506af..9f602c531 100644 --- a/esp32/src/wifi.rs +++ b/esp32/src/wifi.rs @@ -3,7 +3,7 @@ #[doc = "Register block"] pub struct RegisterBlock { filter_bank: [FILTER_BANK; 2], - _reserved1: [u8; 0x44], + _reserved1: [u8; 0x04], rx_ctrl: RX_CTRL, rx_descr_base: RX_DESCR_BASE, rx_descr_next: RX_DESCR_NEXT, @@ -46,13 +46,13 @@ pub struct RegisterBlock { crypto_key_entry: [CRYPTO_KEY_ENTRY; 16], } impl RegisterBlock { - #[doc = "0x00..0x40 - Filter banks for frame reception. Bank zero is for the BSSID and bank one for the RA. Each filter bank has registers for two interfaces."] + #[doc = "0x00..0x80 - Filter banks for frame reception. Bank zero is for the BSSID and bank one for the RA. Each filter bank has registers for two interfaces."] #[inline(always)] pub const fn filter_bank(&self, n: usize) -> &FILTER_BANK { &self.filter_bank[n] } #[doc = "Iterator for array of:"] - #[doc = "0x00..0x40 - Filter banks for frame reception. Bank zero is for the BSSID and bank one for the RA. Each filter bank has registers for two interfaces."] + #[doc = "0x00..0x80 - Filter banks for frame reception. Bank zero is for the BSSID and bank one for the RA. Each filter bank has registers for two interfaces."] #[inline(always)] pub fn filter_bank_iter(&self) -> impl Iterator { self.filter_bank.iter() diff --git a/esp32/src/wifi/filter_bank.rs b/esp32/src/wifi/filter_bank.rs index dbfbfe4a1..cac866ef2 100644 --- a/esp32/src/wifi/filter_bank.rs +++ b/esp32/src/wifi/filter_bank.rs @@ -5,11 +5,11 @@ pub struct FILTER_BANK { addr_low: (), _reserved1: [u8; 0x04], addr_high: (), - _reserved2: [u8; 0x0c], + _reserved2: [u8; 0x1c], mask_low: (), _reserved3: [u8; 0x04], mask_high: (), - _reserved_end: [u8; 0x0c], + _reserved_end: [u8; 0x1c], } impl FILTER_BANK { #[doc = "0x00..0x08 - First 4 bytes of BSSID MAC address filter"] @@ -40,33 +40,33 @@ impl FILTER_BANK { (0..2) .map(move |n| unsafe { &*(self as *const Self).cast::().add(4).add(8 * n).cast() }) } - #[doc = "0x10..0x18 - First 4 bytes of BSSID MAC address filter mask"] + #[doc = "0x20..0x28 - First 4 bytes of BSSID MAC address filter mask"] #[inline(always)] pub const fn mask_low(&self, n: usize) -> &MASK_LOW { #[allow(clippy::no_effect)] [(); 2][n]; - unsafe { &*(self as *const Self).cast::().add(16).add(8 * n).cast() } + unsafe { &*(self as *const Self).cast::().add(32).add(8 * n).cast() } } #[doc = "Iterator for array of:"] - #[doc = "0x10..0x18 - First 4 bytes of BSSID MAC address filter mask"] + #[doc = "0x20..0x28 - First 4 bytes of BSSID MAC address filter mask"] #[inline(always)] pub fn mask_low_iter(&self) -> impl Iterator { (0..2) - .map(move |n| unsafe { &*(self as *const Self).cast::().add(16).add(8 * n).cast() }) + .map(move |n| unsafe { &*(self as *const Self).cast::().add(32).add(8 * n).cast() }) } - #[doc = "0x14..0x1c - last 2 bytes of BSSID MAC address filter mask"] + #[doc = "0x24..0x2c - last 2 bytes of BSSID MAC address filter mask"] #[inline(always)] pub const fn mask_high(&self, n: usize) -> &MASK_HIGH { #[allow(clippy::no_effect)] [(); 2][n]; - unsafe { &*(self as *const Self).cast::().add(20).add(8 * n).cast() } + unsafe { &*(self as *const Self).cast::().add(36).add(8 * n).cast() } } #[doc = "Iterator for array of:"] - #[doc = "0x14..0x1c - last 2 bytes of BSSID MAC address filter mask"] + #[doc = "0x24..0x2c - last 2 bytes of BSSID MAC address filter mask"] #[inline(always)] pub fn mask_high_iter(&self) -> impl Iterator { (0..2) - .map(move |n| unsafe { &*(self as *const Self).cast::().add(20).add(8 * n).cast() }) + .map(move |n| unsafe { &*(self as *const Self).cast::().add(36).add(8 * n).cast() }) } } #[doc = "ADDR_LOW (rw) register accessor: First 4 bytes of BSSID MAC address filter\n\nYou can [`read`](crate::Reg::read) this register and get [`addr_low::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`addr_low::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@addr_low`] module"] diff --git a/esp32/svd/patches/esp32-wifi.yaml b/esp32/svd/patches/esp32-wifi.yaml index c1d976fb2..ab1d9627c 100644 --- a/esp32/svd/patches/esp32-wifi.yaml +++ b/esp32/svd/patches/esp32-wifi.yaml @@ -190,7 +190,7 @@ WIFI: _clusters: FILTER_BANK%s: dim: 2 - dimIncrement: 0x20 + dimIncrement: 0x40 addressOffset: 0x0 description: " Filter banks for frame reception. Bank zero is for the BSSID and bank one for the RA. @@ -218,13 +218,13 @@ WIFI: dim: 2 dimIncrement: 0x8 description: First 4 bytes of BSSID MAC address filter mask - addressOffset: 0x10 + addressOffset: 0x20 access: read-write MASK_HIGH%s: dim: 2 dimIncrement: 0x8 description: last 2 bytes of BSSID MAC address filter mask - addressOffset: 0x14 + addressOffset: 0x24 access: read-write fields: MASK: