pub struct AES { /* private fields */ }
Expand description
AES (Advanced Encryption Standard) Accelerator
Implementations§
source§impl AES
impl AES
sourcepub const PTR: *const RegisterBlock = {0x6003a000 as *const aes::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x6003a000 as *const aes::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 key_iter(&self) -> impl Iterator<Item = &KEY>
pub fn key_iter(&self) -> impl Iterator<Item = &KEY>
Iterator for array of: 0x00..0x20 - Key material key_%s configure register
sourcepub fn text_in(&self, n: usize) -> &TEXT_IN
pub fn text_in(&self, n: usize) -> &TEXT_IN
0x20..0x30 - source text material text_in_%s configure register
sourcepub fn text_in_iter(&self) -> impl Iterator<Item = &TEXT_IN>
pub fn text_in_iter(&self) -> impl Iterator<Item = &TEXT_IN>
Iterator for array of: 0x20..0x30 - source text material text_in_%s configure register
sourcepub fn text_out(&self, n: usize) -> &TEXT_OUT
pub fn text_out(&self, n: usize) -> &TEXT_OUT
0x30..0x40 - result text material text_out_%s configure register
sourcepub fn text_out_iter(&self) -> impl Iterator<Item = &TEXT_OUT>
pub fn text_out_iter(&self) -> impl Iterator<Item = &TEXT_OUT>
Iterator for array of: 0x30..0x40 - result text material text_out_%s configure register
sourcepub fn iv_mem(&self, n: usize) -> &IV_MEM
pub fn iv_mem(&self, n: usize) -> &IV_MEM
0x50..0x60 - The memory that stores initialization vector
sourcepub fn iv_mem_iter(&self) -> impl Iterator<Item = &IV_MEM>
pub fn iv_mem_iter(&self) -> impl Iterator<Item = &IV_MEM>
Iterator for array of: 0x50..0x60 - The memory that stores initialization vector
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: 0x60..0x70 - The memory that stores GCM hash subkey
sourcepub fn j0_mem_iter(&self) -> impl Iterator<Item = &J0_MEM>
pub fn j0_mem_iter(&self) -> impl Iterator<Item = &J0_MEM>
Iterator for array of: 0x70..0x80 - The memory that stores J0
sourcepub fn t0_mem_iter(&self) -> impl Iterator<Item = &T0_MEM>
pub fn t0_mem_iter(&self) -> impl Iterator<Item = &T0_MEM>
Iterator for array of: 0x80..0x90 - The memory that stores T0
sourcepub fn dma_enable(&self) -> &DMA_ENABLE
pub fn dma_enable(&self) -> &DMA_ENABLE
0x90 - DMA-AES working mode register
sourcepub fn block_mode(&self) -> &BLOCK_MODE
pub fn block_mode(&self) -> &BLOCK_MODE
0x94 - AES cipher block mode register
sourcepub fn aad_block_num(&self) -> &AAD_BLOCK_NUM
pub fn aad_block_num(&self) -> &AAD_BLOCK_NUM
0xa0 - Additional Authential Data block number register
sourcepub fn remainder_bit_num(&self) -> &REMAINDER_BIT_NUM
pub fn remainder_bit_num(&self) -> &REMAINDER_BIT_NUM
0xa4 - AES remainder bit number register