common: Implement clock::reset().
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 17 Nov 2019 20:34:38 +0000 (21:34 +0100)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000 (20:38 +0100)
This puts the MCG back into FBE mode.

src/common/clock.rs

index 3d46016cb0558c86c45dc8483da96eb8ac932f17..659e572d3fe26d7baaa3547e5c7ac9b00a2e1719 100644 (file)
@@ -164,6 +164,11 @@ pub unsafe fn configure() {
     });
 }
 
+pub unsafe fn reset() {
+    switch_to_pbe();
+    switch_to_fbe();
+}
+
 pub unsafe fn configure_usb() {
     let mut scgc4 = Reg32::new(SIM_SCGC4);
     scgc4.modify(|v| v & !SIM_SCGC4_USBOTG);