Struct UarteRegistersManager
pub struct UarteRegistersManager { /* private fields */ }Expand description
Wrapper for managing MMIO for UARTE.
Implementations§
§impl UarteRegistersManager
impl UarteRegistersManager
pub unsafe fn new_uarte0() -> UarteRegistersManager
pub unsafe fn new_uarte0() -> UarteRegistersManager
Create a DMA-enabled register manager for UARTE.
§Safety
This controls DMA hardware. As such, it must be unique. This requires:
- This constructor must be called at most once.
- There must not be any other code that accesses the DMA buffer and length registers.
pub fn start_tx_dma(&self, buf: SubSliceMut<'static, u8>) -> Result<(), ()>
pub fn start_tx_dma(&self, buf: SubSliceMut<'static, u8>) -> Result<(), ()>
Start a UART transmission with DMA.
§Return
Ok(()) on successfully starting the DMA operation. Err(()) if the
DMA is busy and the operation could not be started.
pub fn finish_tx_dma(&self) -> Option<(SubSliceMut<'static, u8>, usize)>
pub fn tx_dma_pending(&self) -> bool
pub fn start_rx_dma(&self, buf: SubSliceMut<'static, u8>) -> Result<(), ()>
pub fn start_rx_dma(&self, buf: SubSliceMut<'static, u8>) -> Result<(), ()>
Start a UART reception with DMA.
§Return
Ok(()) on successfully starting the DMA operation. Err(()) if the
DMA is busy and the operation could not be started.
pub fn finish_rx_dma(&self) -> Option<(SubSliceMut<'static, u8>, usize)>
pub fn rx_dma_pending(&self) -> bool
Auto Trait Implementations§
impl !Freeze for UarteRegistersManager
impl !RefUnwindSafe for UarteRegistersManager
impl !Send for UarteRegistersManager
impl !Sync for UarteRegistersManager
impl !UnwindSafe for UarteRegistersManager
impl Unpin for UarteRegistersManager
impl UnsafeUnpin for UarteRegistersManager
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