pub trait SystemDriver {
// Provided methods
async fn double_reset_usb_boot(&self, _timeout: Duration) { ... }
fn reset(&self) { ... }
fn reset_to_bootloader(&self) { ... }
async fn power_off(&self) { ... }
}
Expand description
Driver to interact with the system
Provided Methods§
Sourceasync fn double_reset_usb_boot(&self, _timeout: Duration)
async fn double_reset_usb_boot(&self, _timeout: Duration)
Reboot the system if double-reset is detected.
Implement this only for chips that require this feature (e.g. RP2040). There is no need to implement this if the feature is already implemented, such as the nRF52840 uf2 bootloader.
fn reset(&self)
Sourcefn reset_to_bootloader(&self)
fn reset_to_bootloader(&self)
Reset to the bootloader (typically uf2 flash mode)
async fn power_off(&self)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.