projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6f292a
)
common: Implement clock::reset().
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 17 Nov 2019 20:34:38 +0000
(21:34 +0100)
committer
Tilman 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
patch
|
blob
|
history
diff --git
a/src/common/clock.rs
b/src/common/clock.rs
index 3d46016cb0558c86c45dc8483da96eb8ac932f17..659e572d3fe26d7baaa3547e5c7ac9b00a2e1719 100644
(file)
--- a/
src/common/clock.rs
+++ b/
src/common/clock.rs
@@
-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);