Struct stm32l0xx_hal::aes::Tx
source · [−]pub struct Tx(_);
Expand description
Can be used to write data to the AES peripheral
You can access this struct via Stream
.
Implementations
sourceimpl Tx
impl Tx
sourcepub fn write(&mut self, block: &Block) -> Result<(), Error>
pub fn write(&mut self, block: &Block) -> Result<(), Error>
Write a block to the AES peripheral
Please note that only one block can be written before you need to read
the processed block back using [Read::read
]. Calling this method
multiple times without calling [Read::read
] in between will result in
an error to be returned.
sourcepub fn write_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: Deref + 'static,
Buffer::Target: AsSlice<Element = u8>,
Channel: Channel,
pub fn write_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: Deref + 'static,
Buffer::Target: AsSlice<Element = u8>,
Channel: Channel,
Writes the provided buffer to the AES peripheral using DMA
Returns a DMA transfer that is ready to be started. It needs to be started for anything to happen.
Panics
Panics, if the buffer length is larger than u16::max_value()
.
The AES peripheral works with 128-bit blocks, which means the buffer length must be a multiple of 16. Panics, if this is not the case.
Panics, if the buffer is not aligned to a word boundary.
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more