Commit graph

632 commits

Author SHA1 Message Date
Nic0w eb4ebc782a Cargo fmt pass. 2021-04-29 20:35:47 +02:00
Nic0w e91e124484 Merge branch 'pll' of github.com:Nic0w/rp-hal into pll 2021-04-29 20:21:02 +02:00
Nic0w eb376cf47b Using modify() to clear specific bits instead of a blanket 0 on all bits. 2021-04-29 20:16:52 +02:00
Nic0w 5726bef879 Fix typo on post_div check
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-29 20:16:52 +02:00
Nic0w 20c35d5e14 Fix type conversion issue 2021-04-29 20:16:52 +02:00
Nic0w 649998189f Move PLL parameters into a struct to help testability and reconfiguration of the PLL. 2021-04-29 20:16:52 +02:00
Nic0w 9be7c41400 Working implementation of a PLL HAL. 2021-04-29 20:16:52 +02:00
9names 48dd8069b8
Merge pull request #30 from 9names/fix_xosc_warning
Remove unnecessary unsafe block + cargo fmt XOSC
2021-04-29 17:53:22 +10:00
9names 010a5cabf3 Remove redundant field name 2021-04-29 11:19:47 +10:00
9names f21648de93 Autoformatted using cargo fmt 2021-04-29 11:15:41 +10:00
9names 1b42913077 Remove unneeded unsafe 2021-04-29 11:11:11 +10:00
9names 3bdc338a0d
Merge pull request #29 from tdittr/feature/doc-tests-in-ci
Add `cargo test` to CI run and fix an error found by it
2021-04-28 14:02:07 +10:00
9names f728de5efb
Merge pull request #25 from Nic0w/xosc
Working HAL for the XOSC
2021-04-28 14:01:10 +10:00
tdittr 39f02c4a44 Add cargo test to CI run and fix an error found by it
Besides the normal usage of unit-tests this also ensures that
example in doc-comments do at least compile.
2021-04-27 12:08:47 +02:00
Nic0w f3fba80a71 Implement embedded_hal::serial traits for the UART. 2021-04-26 22:05:37 +02:00
Nic0w 50a428e2ad Error needs to derive Debug if we want to unwrap. 2021-04-26 21:25:52 +02:00
Jennifer Wilcox a4b15a3547 Fix ARM toolchain apt package name 2021-04-26 12:06:57 -05:00
Jennifer Wilcox 09d9247f2f apt-get requires sudo 2021-04-26 12:05:24 -05:00
Jennifer Wilcox 0badff4f1c Install arm-none-eabi-gcc in CI 2021-04-26 12:04:11 -05:00
Jennifer Wilcox d738626f70 Also check examples
A quick check on my machine showed that just `cargo check --workspace`
didn't verify the examples. Quite silly.
2021-04-26 12:00:23 -05:00
Jennifer Wilcox 0ff51520f5 Merge branch 'main' of github.com:rp-rs/rp-hal into basic-gpio 2021-04-26 11:57:19 -05:00
9names ca8273b2c5
Merge pull request #23 from Nitori-/ci
Add CI checks
2021-04-26 20:47:20 +10:00
Nic0w 920d0dc897 Merge branch 'uart' of github.com:Nic0w/rp-hal into uart 2021-04-26 09:20:22 +02:00
Nic0w 4d949f7310 Multiple changes addressing @tdittr 's comments. 2021-04-26 09:14:32 +02:00
Nic0w aa3fe8fd20 Disable the UART for real when disabling UART. 2021-04-25 20:25:29 +02:00
Nic0w c50a5b6001 Cosmetics. 2021-04-25 20:24:56 +02:00
Nic0w f9254fdffa
Increment byte_written after write has happened.
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 20:00:56 +02:00
Nic0w 2462c430b9
Fix typo on post_div check
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 19:48:09 +02:00
Nic0w c3bc1bbaf8 Fix type conversion issue 2021-04-25 19:45:45 +02:00
Jennifer Wilcox e9721e14c2 Pin ubuntu version 2021-04-25 12:24:47 -05:00
Jennifer Wilcox c4ae152fda
Update rp2040-hal/src/gpio.rs
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 12:17:05 -05:00
Jennifer Wilcox eaea9ae1ed Concentrate the unsafe register constructs
This moves almost all of the unsafe stuff together. The last remaining bit is going to need a PAC fix.
2021-04-25 12:13:44 -05:00
Jennifer Wilcox 8290368c10 Pull pads out of reset and wait
We're technically supposed to wait for these resets to finish before poking at registers. This seems to fix the instability I was seeing on the input example especially (TBH I have no idea how it ever worked)
2021-04-25 11:43:44 -05:00
Jennifer Wilcox 7e45c96a65 Do reset in a good way instead of a wacky way 2021-04-25 11:17:33 -05:00
Jennifer Wilcox b3b7677f82 More review comments 2021-04-25 11:13:21 -05:00
Nic0w 6157ce552f Move PLL parameters into a struct to help testability and reconfiguration of the PLL. 2021-04-25 17:51:03 +02:00
Jennifer Wilcox 037fc665b2
Apply suggestions from code review
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 10:15:32 -05:00
Nic0w 2a704a73f0 Adding blocking helper method to setup the XOSC easily. 2021-04-25 16:34:48 +02:00
Nic0w b9080d0a92 Working implementation of an UART HAL. 2021-04-25 10:51:46 +02:00
Nic0w ff418b0453 Working implementation of a PLL HAL. 2021-04-25 10:12:38 +02:00
Nic0w b0de7c9be6 Ignores Cargo.lock and target/*. 2021-04-25 09:46:53 +02:00
Nic0w 8f6aea6a31 Fix compilation issues. 2021-04-25 09:03:20 +02:00
Nic0w 72694a07b5 Fix frequency range check. 2021-04-25 08:58:43 +02:00
Jennifer Wilcox cb51448089
Apply suggestions from code review
Co-authored-by: Émile Grégoire <eg@emilegregoire.ca>
2021-04-24 20:17:42 -05:00
Jennifer Wilcox cc1a1bee2c Also build all examples
My other PR has some examples. It turns out `cargo check --all` doesn't
actually check _all_ buildable things :(
2021-04-24 18:46:07 -05:00
Jennifer Wilcox 422a45fbc5 Add documentation 2021-04-24 18:41:12 -05:00
Jennifer Wilcox 94f67f7eca Finish configuration options for IOs 2021-04-24 18:03:03 -05:00
Nic0w d5cbd44ade Fixing calculation bug pointed out by @tdittr 2021-04-25 00:36:46 +02:00
Jennifer Wilcox 3536604b9e Block input reads on Unknown state 2021-04-24 17:28:33 -05:00
Nic0w 568cafe2d1 Multiple changes related to @tdittr 's comments 2021-04-24 23:38:49 +02:00