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,
impl<'d, C> AesDma<'d, C>where C: ChannelTypes, <C as ChannelTypes>::P: AesPeripheral,
pub fn write_key(&mut self, key: &[u8])
pub fn write_block(&mut self, block: &[u8])
sourcepub 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>,
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.
pub fn reset_aes(&self)
pub fn set_cipher_mode(&self, mode: CipherMode)
pub fn set_mode(&self, mode: Mode)
pub fn finish_transform(&self)
Trait Implementations§
source§impl<'d, C> Debug for AesDma<'d, C>where
C: ChannelTypes,
<C as ChannelTypes>::P: AesPeripheral,
impl<'d, C> Debug for AesDma<'d, C>where C: ChannelTypes, <C as ChannelTypes>::P: AesPeripheral,
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,
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,
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> 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