pub struct SHA { /* private fields */ }
Expand description
SHA (Secure Hash Algorithm) Accelerator
Implementations§
source§impl SHA
impl SHA
sourcepub const PTR: *const RegisterBlock = {0x6003b000 as *const sha::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x6003b000 as *const sha::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
Methods from Deref<Target = RegisterBlock>§
sourcepub fn dma_block_num(&self) -> &DMA_BLOCK_NUM
pub fn dma_block_num(&self) -> &DMA_BLOCK_NUM
0x0c - DMA configuration register 0.
sourcepub fn dma_continue(&self) -> &DMA_CONTINUE
pub fn dma_continue(&self) -> &DMA_CONTINUE
0x20 - DMA configuration register 2.
sourcepub fn h_mem(&self, n: usize) -> &H_MEM
pub fn h_mem(&self, n: usize) -> &H_MEM
0x40..0x60 - Sha H memory which contains intermediate hash or finial hash.
sourcepub fn h_mem_iter(&self) -> impl Iterator<Item = &H_MEM>
pub fn h_mem_iter(&self) -> impl Iterator<Item = &H_MEM>
Iterator for array of: 0x40..0x60 - Sha H memory which contains intermediate hash or finial hash.
sourcepub fn m_mem_iter(&self) -> impl Iterator<Item = &M_MEM>
pub fn m_mem_iter(&self) -> impl Iterator<Item = &M_MEM>
Iterator for array of: 0x80..0xc0 - Sha M memory which contains message.