pub struct Sha<'d> { /* private fields */ }Expand description
The SHA Accelerator driver instance
Implementations§
Source§impl<'d> Sha<'d>
impl<'d> Sha<'d>
Sourcepub fn new(sha: impl Peripheral<P = SHA> + 'd) -> Self
pub fn new(sha: impl Peripheral<P = SHA> + 'd) -> Self
Create a new instance of the SHA Accelerator driver.
Sourcepub fn start<'a, A: ShaAlgorithm>(
&'a mut self,
) -> ShaDigest<'d, A, &'a mut Self>
pub fn start<'a, A: ShaAlgorithm>( &'a mut self, ) -> ShaDigest<'d, A, &'a mut Self>
Start a new digest.
Sourcepub fn start_owned<A: ShaAlgorithm>(self) -> ShaDigest<'d, A, Self>
pub fn start_owned<A: ShaAlgorithm>(self) -> ShaDigest<'d, A, Self>
Start a new digest and take ownership of the driver. This is useful for storage outside a function body. i.e. in static or struct.
Trait Implementations§
Source§impl InterruptConfigurable for Sha<'_>
impl InterruptConfigurable for Sha<'_>
Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Set the interrupt handler Read more
Auto Trait Implementations§
impl<'d> Freeze for Sha<'d>
impl<'d> RefUnwindSafe for Sha<'d>
impl<'d> Send for Sha<'d>
impl<'d> Sync for Sha<'d>
impl<'d> Unpin for Sha<'d>
impl<'d> !UnwindSafe for Sha<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more