diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2022-12-13 16:45:49 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2022-12-13 16:45:49 -0700 |
commit | 540e0316aa425a8fbd126d31350dbe51fca92791 (patch) | |
tree | abc938b9b9f21b7d2357a18272d84c263d767142 /src/hal/clock.rs | |
parent | 8bb2d168044213ce9bd31a19efb6bab90f5c9722 (diff) | |
download | stm32l4-rust-master.tar.gz stm32l4-rust-master.tar.bz2 stm32l4-rust-master.zip |
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.rs | 10 |
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; |