rktk/drivers/interface/system.rs
1use embassy_time::Duration;
2
3/// Driver to interact with the system
4pub trait SystemDriver {
5 /// Reboot the system if double-reset is detected.
6 ///
7 /// Implement this only for chips that require this feature (e.g. RP2040).
8 /// There is no need to implement this if the feature is already implemented, such as the nRF52840 uf2 bootloader.
9 async fn double_reset_usb_boot(&self, _timeout: Duration) {}
10
11 fn reset(&self) {}
12
13 /// Reset to the bootloader (typically uf2 flash mode)
14 fn reset_to_bootloader(&self) {}
15
16 async fn power_off(&self) {}
17}