RKTK API Docs RKTK Home Repo

Trait SystemDriver

Source
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§

Source

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.

Source

fn reset(&self)

Source

fn reset_to_bootloader(&self)

Reset to the bootloader (typically uf2 flash mode)

Source

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.

Implementors§