pub struct AesEcbRegistersManager {
pub registers: StaticRef<AesEcbRegisters>,
/* private fields */
}Expand description
Wrapper for managing MMIO for the AES ECB peripheral.
Fields§
§registers: StaticRef<AesEcbRegisters>MMIO registers for the AES ECB peripheral.
Implementations§
Source§impl AesEcbRegistersManager
impl AesEcbRegistersManager
Sourcepub unsafe fn new(regs: StaticRef<AesEcbRegisters>) -> AesEcbRegistersManager
pub unsafe fn new(regs: StaticRef<AesEcbRegisters>) -> AesEcbRegistersManager
Create a new AES registers manager.
§Safety
This is only valid on an nrf5x-based MCU. This must only be called once as having multiple interfaces to DMA registers is not safe. This must be the only way the AES DMA registers are controlled.
Sourcepub fn start_ecb_dma(&self, buf: &'static mut [u8]) -> Result<(), ()>
pub fn start_ecb_dma(&self, buf: &'static mut [u8]) -> Result<(), ()>
Start an ECB encryption with DMA.
The buffer must cover the full 48-byte ECB data block: bytes 0–15 = key, bytes 16–31 = plaintext/counter, bytes 32–47 = ciphertext output.
§Return
Ok(()) on successfully starting the DMA operation. Err(()) if DMA
is already busy.
pub fn finish_ecb_dma(&self) -> Option<&'static mut [u8]>
pub fn dma_pending(&self) -> bool
Auto Trait Implementations§
impl !Freeze for AesEcbRegistersManager
impl !RefUnwindSafe for AesEcbRegistersManager
impl !Send for AesEcbRegistersManager
impl !Sync for AesEcbRegistersManager
impl Unpin for AesEcbRegistersManager
impl UnsafeUnpin for AesEcbRegistersManager
impl !UnwindSafe for AesEcbRegistersManager
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