Commit graph

7 commits

Author SHA1 Message Date
Hmvp
ffa97842e2
Improve clock frequency stuff for uninitialized clocks and add some examples (#64)
* Improve clock frequency stuff for uninitialized clocks

- Made clocks singletons so the frequency handling actually works as expected
- Added initial frequencies
- Improved the docs
- Added a Clock trait

* Add pico examples.

These have the benefit of knowing which external crystal is attached.
Even though it always should be a 12 MHz crystal.
Thus we can setup the clocks properly

I also changed the rp2040 examples to work out of the box for pico boards since that will probably be used most of the time
2021-07-26 20:24:58 +10:00
Hmvp
f310d92b64
Refactor clocks (#54)
* Remove unneeded lines

* Reduce macro boilerplate

* Refactor clocks
2021-07-08 20:58:48 +10:00
Hmvp
614180eda3
Clock init (#49)
Add preliminary clock init function
2021-07-07 01:30:44 +10:00
Hmvp
e7c2ef39c4 Add missing clocks
Also reorderd the macro invocations to match the datasheet
2021-06-29 19:35:08 +10:00
Andrea Nall
90a6f8414d fix clippy, run fmt 2021-06-27 14:50:06 +10:00
Nic0w
4220b45c24 Cargo fmt 2021-06-27 14:50:06 +10:00
Nic0w
ef7f8fe9b7 Initial commit on clocks 2021-06-27 14:50:06 +10:00