Struct esp32c3_hal::aes::dma::AesDma

source ·
pub struct AesDma<'d, C>where
    C: ChannelTypes,
    <C as ChannelTypes>::P: AesPeripheral,{
    pub aes: Aes<'d>,
    /* private fields */
}
Expand description

A DMA capable AES instance.

Fields§

§aes: Aes<'d>

Implementations§

source§

impl<'d, C> AesDma<'d, C>where C: ChannelTypes, <C as ChannelTypes>::P: AesPeripheral,

source

pub fn write_key(&mut self, key: &[u8])

source

pub fn write_block(&mut self, block: &[u8])

source

pub fn process<TXBUF, RXBUF>( self, words: TXBUF, read_buffer: RXBUF, mode: Mode, cipher_mode: CipherMode, key: [u8; 16] ) -> Result<AesDmaTransferRxTx<'d, C, RXBUF, TXBUF>, DmaError>where TXBUF: ReadBuffer<Word = u8>, RXBUF: WriteBuffer<Word = u8>,

Perform a DMA transfer.

This will return a AesDmaTransferRxTx owning the buffer(s) and the AES instance. The maximum amount of data to be sent/received is 32736 bytes.

source

pub fn reset_aes(&self)

source

pub fn set_cipher_mode(&self, mode: CipherMode)

source

pub fn set_mode(&self, mode: Mode)

source

pub fn finish_transform(&self)

Trait Implementations§

source§

impl<'d, C> Debug for AesDma<'d, C>where C: ChannelTypes, <C as ChannelTypes>::P: AesPeripheral,

source§

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

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

impl<'d, C, RXBUF, TXBUF> DmaTransferRxTx<RXBUF, TXBUF, AesDma<'d, C>> for AesDmaTransferRxTx<'d, C, RXBUF, TXBUF>where C: ChannelTypes, <C as ChannelTypes>::P: AesPeripheral,

source§

fn wait( self ) -> Result<(RXBUF, TXBUF, AesDma<'d, C>), (DmaError, RXBUF, TXBUF, AesDma<'d, C>)>

Wait for the DMA transfer to complete and return the buffers and the AES instance.

source§

fn is_done(&self) -> bool

Check if the DMA transfer is complete

Auto Trait Implementations§

§

impl<'d, C> RefUnwindSafe for AesDma<'d, C>where <C as ChannelTypes>::Rx<'d>: RefUnwindSafe, <C as ChannelTypes>::Tx<'d>: RefUnwindSafe,

§

impl<'d, C> Send for AesDma<'d, C>where <C as ChannelTypes>::Rx<'d>: Send, <C as ChannelTypes>::Tx<'d>: Send,

§

impl<'d, C> Sync for AesDma<'d, C>where <C as ChannelTypes>::Rx<'d>: Sync, <C as ChannelTypes>::Tx<'d>: Sync,

§

impl<'d, C> Unpin for AesDma<'d, C>where <C as ChannelTypes>::Rx<'d>: Unpin, <C as ChannelTypes>::Tx<'d>: Unpin,

§

impl<'d, C> !UnwindSafe for AesDma<'d, C>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.