summaryrefslogtreecommitdiff
path: root/src/hal/clock.rs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-12-13 16:45:49 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-12-13 16:45:49 -0700
commit540e0316aa425a8fbd126d31350dbe51fca92791 (patch)
treeabc938b9b9f21b7d2357a18272d84c263d767142 /src/hal/clock.rs
parent8bb2d168044213ce9bd31a19efb6bab90f5c9722 (diff)
downloadstm32l4-rust-master.tar.gz
stm32l4-rust-master.tar.bz2
stm32l4-rust-master.zip
Experimental Gpio.HEADmaster
This rapidly blinks the sysled on the stm32. This shows the ability to manipulate memory mapped registers.
Diffstat (limited to 'src/hal/clock.rs')
-rw-r--r--src/hal/clock.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hal/clock.rs b/src/hal/clock.rs
new file mode 100644
index 0000000..5c97a91
--- /dev/null
+++ b/src/hal/clock.rs
@@ -0,0 +1,10 @@
+struct Pwr {
+ cr : u32,
+ csr : u32,
+}
+
+extern "C" {
+ static mut __Pwr_base : u32;
+}
+
+static PWR: *mut Pwr = __Pwr_base as *mut Pwr;