embedded_devices/
device.rs

1/// A device which supports any form of software-triggered reset.
2#[maybe_async_cfg::maybe(sync(feature = "sync"), async(feature = "async"))]
3#[allow(async_fn_in_trait)]
4pub trait ResettableDevice {
5    /// The error type which may occur when resetting the device
6    type Error: core::fmt::Debug;
7
8    /// Performs a best-effort soft-reset of the device.
9    async fn reset(&mut self) -> Result<(), Self::Error>;
10}