Skip to content

Commit

Permalink
Fix SHA H_MEM dimension (#177)
Browse files Browse the repository at this point in the history
* fix: Fix SHA H_MEM dimension

* fix: Fix SHA H_MEM dimension - Sources
  • Loading branch information
SergioGasquez authored Dec 13, 2023
1 parent 3ac8bf0 commit 3b27982
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
7 changes: 4 additions & 3 deletions esp32c2/src/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub struct RegisterBlock {
irq_ena: IRQ_ENA,
date: DATE,
_reserved12: [u8; 0x10],
h_mem: [H_MEM; 16],
h_mem: [H_MEM; 8],
_reserved13: [u8; 0x20],
m_mem: [M_MEM; 16],
}
impl RegisterBlock {
Expand Down Expand Up @@ -79,13 +80,13 @@ impl RegisterBlock {
pub const fn date(&self) -> &DATE {
&self.date
}
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub const fn h_mem(&self, n: usize) -> &H_MEM {
&self.h_mem[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub fn h_mem_iter(&self) -> impl Iterator<Item = &H_MEM> {
self.h_mem.iter()
Expand Down
2 changes: 1 addition & 1 deletion esp32c2/svd/patches/esp32c2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ECC:
SHA:
_modify:
"H_MEM*":
dim: 16
dim: 8
dimIncrement: 0x4
size: 0x20
"M_MEM*":
Expand Down
7 changes: 4 additions & 3 deletions esp32c3/src/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub struct RegisterBlock {
irq_ena: IRQ_ENA,
date: DATE,
_reserved12: [u8; 0x10],
h_mem: [H_MEM; 16],
h_mem: [H_MEM; 8],
_reserved13: [u8; 0x20],
m_mem: [M_MEM; 16],
}
impl RegisterBlock {
Expand Down Expand Up @@ -79,13 +80,13 @@ impl RegisterBlock {
pub const fn date(&self) -> &DATE {
&self.date
}
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub const fn h_mem(&self, n: usize) -> &H_MEM {
&self.h_mem[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub fn h_mem_iter(&self) -> impl Iterator<Item = &H_MEM> {
self.h_mem.iter()
Expand Down
2 changes: 1 addition & 1 deletion esp32c3/svd/patches/esp32c3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RSA:
SHA:
_modify:
"H_MEM*":
dim: 16
dim: 8
dimIncrement: 0x4
size: 0x20
"M_MEM*":
Expand Down
7 changes: 4 additions & 3 deletions esp32c6/src/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub struct RegisterBlock {
irq_ena: IRQ_ENA,
date: DATE,
_reserved12: [u8; 0x10],
h_mem: [H_MEM; 16],
h_mem: [H_MEM; 8],
_reserved13: [u8; 0x20],
m_mem: [M_MEM; 16],
}
impl RegisterBlock {
Expand Down Expand Up @@ -79,13 +80,13 @@ impl RegisterBlock {
pub const fn date(&self) -> &DATE {
&self.date
}
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub const fn h_mem(&self, n: usize) -> &H_MEM {
&self.h_mem[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub fn h_mem_iter(&self) -> impl Iterator<Item = &H_MEM> {
self.h_mem.iter()
Expand Down
2 changes: 1 addition & 1 deletion esp32c6/svd/patches/esp32c6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ RSA:
SHA:
_modify:
"H_MEM*":
dim: 16
dim: 8
dimIncrement: 0x4
size: 0x20
"M_MEM*":
Expand Down
7 changes: 4 additions & 3 deletions esp32h2/src/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub struct RegisterBlock {
irq_ena: IRQ_ENA,
date: DATE,
_reserved12: [u8; 0x10],
h_mem: [H_MEM; 16],
h_mem: [H_MEM; 8],
_reserved13: [u8; 0x20],
m_mem: [M_MEM; 16],
}
impl RegisterBlock {
Expand Down Expand Up @@ -79,13 +80,13 @@ impl RegisterBlock {
pub const fn date(&self) -> &DATE {
&self.date
}
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub const fn h_mem(&self, n: usize) -> &H_MEM {
&self.h_mem[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x40..0x80 - Sha H memory which contains intermediate hash or finial hash."]
#[doc = "0x40..0x60 - Sha H memory which contains intermediate hash or finial hash."]
#[inline(always)]
pub fn h_mem_iter(&self) -> impl Iterator<Item = &H_MEM> {
self.h_mem.iter()
Expand Down
2 changes: 1 addition & 1 deletion esp32h2/svd/patches/esp32h2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ RSA:
SHA:
_modify:
"H_MEM*":
dim: 16
dim: 8
dimIncrement: 0x4
size: 0x20
"M_MEM*":
Expand Down

0 comments on commit 3b27982

Please sign in to comment.