pub struct AsyncResetController<D: DelayNs> { /* private fields */ }Expand description
Async counterpart of super::ResetController. Owns an
embedded_hal_async::delay::DelayNs implementation and exposes
soft_reset as an async fn.
Implementations§
Source§impl<D: DelayNs> AsyncResetController<D>
impl<D: DelayNs> AsyncResetController<D>
Sourcepub fn new(delay: D) -> Self
pub fn new(delay: D) -> Self
Build a controller with the SOFT_RESET_TIMEOUT_MS default.
Sourcepub fn with_timeout(delay: D, timeout_ms: u32) -> Self
pub fn with_timeout(delay: D, timeout_ms: u32) -> Self
Build a controller with a caller-chosen timeout.
Sourcepub async fn soft_reset(&mut self) -> Result<(), ResetError>
pub async fn soft_reset(&mut self) -> Result<(), ResetError>
Issue the DMA software reset and .await the polling loop
until DMABUSMODE.SWR self-clears. Returns
ResetError::Timeout if the bit does not clear within
timeout_ms.
Sourcepub fn timeout_ms(&self) -> u32
pub fn timeout_ms(&self) -> u32
Configured timeout in milliseconds.
Auto Trait Implementations§
impl<D> Freeze for AsyncResetController<D>where
D: Freeze,
impl<D> RefUnwindSafe for AsyncResetController<D>where
D: RefUnwindSafe,
impl<D> Send for AsyncResetController<D>where
D: Send,
impl<D> Sync for AsyncResetController<D>where
D: Sync,
impl<D> Unpin for AsyncResetController<D>where
D: Unpin,
impl<D> UnsafeUnpin for AsyncResetController<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for AsyncResetController<D>where
D: UnwindSafe,
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