Struct SHA

Source
pub struct SHA { /* private fields */ }

Implementations§

Source§

impl SHA

Source

pub const PTR: *const <SHA as Deref>::Target = {0x60089000 as *const <esp32c6::SHA as core::ops::Deref>::Target}

Pointer to the register block

Source

pub unsafe fn steal() -> SHA

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

Source

pub const fn ptr() -> *const <SHA as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

Source

pub fn mode(&self) -> &Reg<MODE_SPEC>

0x00 - Initial configuration register.

Source

pub fn t_string(&self) -> &Reg<T_STRING_SPEC>

0x04 - SHA 512/t configuration register 0.

Source

pub fn t_length(&self) -> &Reg<T_LENGTH_SPEC>

0x08 - SHA 512/t configuration register 1.

Source

pub fn dma_block_num(&self) -> &Reg<DMA_BLOCK_NUM_SPEC>

0x0c - DMA configuration register 0.

Source

pub fn start(&self) -> &Reg<START_SPEC>

0x10 - Typical SHA configuration register 0.

Source

pub fn continue_(&self) -> &Reg<CONTINUE_SPEC>

0x14 - Typical SHA configuration register 1.

Source

pub fn busy(&self) -> &Reg<BUSY_SPEC>

0x18 - Busy register.

Source

pub fn dma_start(&self) -> &Reg<DMA_START_SPEC>

0x1c - DMA configuration register 1.

Source

pub fn dma_continue(&self) -> &Reg<DMA_CONTINUE_SPEC>

0x20 - DMA configuration register 2.

Source

pub fn clear_irq(&self) -> &Reg<CLEAR_IRQ_SPEC>

0x24 - Interrupt clear register.

Source

pub fn irq_ena(&self) -> &Reg<IRQ_ENA_SPEC>

0x28 - Interrupt enable register.

Source

pub fn date(&self) -> &Reg<DATE_SPEC>

0x2c - Date register.

Source

pub fn h_mem(&self, n: usize) -> &Reg<H_MEM_SPEC>

0x40..0x60 - Sha H memory which contains intermediate hash or finial hash.

Source

pub fn h_mem_iter(&self) -> impl Iterator<Item = &Reg<H_MEM_SPEC>>

Iterator for array of: 0x40..0x60 - Sha H memory which contains intermediate hash or finial hash.

Source

pub fn m_mem(&self, n: usize) -> &Reg<M_MEM_SPEC>

0x80..0xc0 - Sha M memory which contains message.

Source

pub fn m_mem_iter(&self) -> impl Iterator<Item = &Reg<M_MEM_SPEC>>

Iterator for array of: 0x80..0xc0 - Sha M memory which contains message.

Trait Implementations§

Source§

impl Debug for SHA

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Deref for SHA

Source§

type Target = <SHA as Deref>::Target

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<SHA as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for SHA

Source§

fn deref_mut(&mut self) -> &mut <SHA as Deref>::Target

Mutably dereferences the value.
Source§

impl Peripheral for SHA

Source§

type P = SHA

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&mut self) -> <SHA as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more

Auto Trait Implementations§

§

impl Freeze for SHA

§

impl RefUnwindSafe for SHA

§

impl Send for SHA

§

impl Sync for SHA

§

impl Unpin for SHA

§

impl UnwindSafe for SHA

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.